FileSize Difference between PDFCreator and PDFConvertor

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
chrisM
Posts: 13
Joined: Wed Oct 01 2003

FileSize Difference between PDFCreator and PDFConvertor

Post by chrisM »

Hi,
I have a JPG file (approx 490K - a page image from a scanner) that I want to convert to a PDF file.
I am using PDFCreator to build up a PDF file. The code looks somthing like:
PDF1.ObjectAttribute("pic1", "FileName") = "MyFile.jpg"
PDF1.ObjectAttribute("pic1", "Compression") = 1
PDF1.ObjectAttribute("pic1", "LEFT") = 0
PDF1.ObjectAttribute("pic1", "TOP") = 0
PDF1.ObjectAttribute("pic1", "RIGHT") = .PageWidth
PDF1.ObjectAttribute("pic1", "BOTTOM") = .PageLength
PDF1.Encrypt("abc", "abc", &HFFFFFFC0 + 4)
PDF1.Save("MyPDF.PDF", 0)

The file thus created is about 143K. However if I open "MyFile.jpg" in an image editing program and print it out to the Amyuni PDF printer (as supplied by PDFConvertor) the PDF thus generated is about 75K (ie half the size) any suggestions as to what is causing the difference? The one in PDFCreator is encrypted. (does that add much of an overhead to file size?). Also any suggestions to make the filesize from PDFCreator an absolute minimum in the above examplewoudl be gratefully received...

Regards,

chrisM
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

You are saving the file in Design and View mode, this will keep all the design information in the file and will generated a large pdf file.

To get a smaller pdf file please save the file in View mode only by using 1 istead of 0.

Please note that you can save the document in Design mode only by using 2 as second parameter of the save command but in this case the file can viewed only using our PDF Creator.

Also please note that you can use Jpeg Compression in the PDF Creator to compress the Jpeg image

Hope this helps.
chrisM
Posts: 13
Joined: Wed Oct 01 2003

Post by chrisM »

Hi,

Thanks for you response. I must be doing somthing wrong though, as if I change the save mode to 1, I get a tiny file (1K !) but when I try to open it, it is a blank page. If I save as ,2 I get a file which is about the size that PDF Convertor creates which is an improvement, but any idea as to why the View only save is not working. Do I need some command to 'finalize' the document before I save it or somthing?

Regards,

chrisM
Post Reply