ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Normalize PDF page width & height

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
aleatprog Posted - Jul 12 2023 : 10:42:02
Hi,

merging a PDF data output (992x1403px; 49kb) with a PDF scan (2760x3898px; 160Kb), MIO.SaveToFile generates the following PDF output (206Kb):





Normalizing these page sizes with TIOParams.PDF_PaperSize, the PDF output is 992x1403px for both pages but 34,7Mb as they are no longer text but images now.





Following the code I used to generate the normalized output:

ImageEnMView1.MIO.Params[0].PDF_PaperSize := iepA4;
ImageEnMView1.MIO.Params[0].PDF_ImageOptions := [iepioShrinkOnly, iepioCentered];
ImageEnMView1.MIO.DuplicateCompressionInfo(True);
ImageEnMView1.MIO.SaveToFile('c:\...\output.pdf', False);


Is there a way to normalize the page sizes inside a PDF document maintaining the text and obtaining a similar file size as the original (206Kb)?

Ale
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 13 2023 : 19:04:13
Hi Ale

If you are using IEVision's TIEVisionSearchablePDFGenerator class:

https://www.imageen.com/help/TIEVisionSearchablePDFGenerator.html

Then the PDF page will be created at the size and DPI of the image (i.e. Width x Height / Dpi). You can set the DPI of the image before adding the page (i.e. calling TIEVisionSearchablePDFGenerator.addPage) to scale it:

https://www.imageen.com/help/TIEVisionImage.setDPI.html


For the PDF Viewer, the size of the PDF page as displayed on-screen and when output to bitmap is controlled by IEGlobalSettings().PdfViewerDefaults.DPI:

https://www.imageen.com/help/TIEGlobalSettings.PdfViewerDefaults.html



Nigel
Xequte Software
www.imageen.com
aleatprog Posted - Jul 13 2023 : 09:11:10
Hi Nigel,

TIOParams.PDF_PaperSize is ok for PDF images generated by scanner. For searchable PDF, is there a function for normalizing or resizing PDF pages in ImageEnView.PdfViewer?

Ale
xequte Posted - Jul 12 2023 : 23:24:59
Hi Ale

I'm afraid ImageEn does not have native support for loading PDF files. It can only import them as images. Please see the PDF section at:

http://www.imageen.com/help/File_Formats.html#PDF



Nigel
Xequte Software
www.imageen.com