synopse / SynPDF

Synopse PDF engine is a fully featured Open Source PDF document creation library for Delphi, embedded in one unit
295 stars 106 forks source link

Multipage TIF to PDF #34

Open tothpaul opened 4 years ago

tothpaul commented 4 years ago

Hello,

Is it possible with SynPDF to convert a multpage TIF to PDF using the CCITTFaxDecode format ?

XnView can do that, the PDF has almost the same size than the TIF

9 0 obj
<<
/Type /XObject
/Subtype /Image
/Name /Im0
/Filter [ /CCITTFaxDecode ]
/DecodeParms [ << /K -1 /Columns 2448 /Rows 3498 >> ]
/Width 2448
/Height 3498
/ColorSpace 11 0 R
/BitsPerComponent 1
/Length 10 0 R
>>
stream
DelphiWorlds commented 3 years ago

I happened across this issue while looking for alternatives to this:

https://github.com/FSharpCSharp/reportman-delphi/blob/master/rpgraphiccompression.pas

Which I might end up using anyway

d4lyric commented 1 year ago

Modify your code here: constructor TPdfImage.Create(aDoc: TPdfDocument; aImage: TGraphic; DontAddToFXref: boolean); Other types of images will be converted to TBitmap except JPEG in above constructor, and that's why you can't have the same size after the conversion from TIF files.