#1 2013-09-13 16:52:12

gavinsbtm
Member
Registered: 2013-09-11
Posts: 2

TGDIPages & Jpeg Compression

Hi, Sorry if this has been answered elsewhere but I can't find the help I need.

I am using TGDIPages to create a PDF document by calling  pdfDoc.ExportPDF('test.pdf', false, true).
The resulting PDF is quite large in filesize as it contains several JPEG images.

I have seen references to TPdfDocumentGDI.ForceJpegCompression but how do you use this on an instance of TGDIPages?

Thanks

Offline

#2 2013-09-16 09:25:01

gavinsbtm
Member
Registered: 2013-09-11
Posts: 2

Re: TGDIPages & Jpeg Compression

To answer my own question...

I was using TGDIPages from SQLite3Pages.dcu which is the stand alone report generator. By including mORMotReport.dcu, ExportPDFForceJPEGCompression is available.

Setting ExportPDFForceJPEGCompression := 60 took my PDF document from 30+mb to 2mb.

Offline

#3 2013-09-17 05:07:50

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,237
Website

Re: TGDIPages & Jpeg Compression

Yes, as stated by the project site in http://synopse.info/fossil/wiki?name=Downloads it is always a good idea to always check the latest "unstable" version.

It is much more stable and feature-rich than the 1.17, thanks to the regression tests and feedback from users.

It is certainly time to switch to 1.18 as "official/stable" version.
I'm about to add SpiderMonkey support thanks to mpv - see http://synopse.info/forum/viewtopic.php?pid=8521#p8521
This is probably the latest feature included in the 1.18 branch.

Offline

Board footer

Powered by FluxBB