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
 SaveToFilePDF aspect ratio

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
PeterPanino Posted - Dec 02 2025 : 06:40:01
IO.SaveToFilePDF without parameters uses default parameters (PDF_PaperWidth 595 = A4, PDF_PaperHeight 842 = A4).

This always sets the PDF height to A4 regardless of the native image height.

Keeping the aspect ratio: Setting PDF_PaperWidth to the desired format (e.g., 595 for A4) and PDF_PaperHeight to 0 keeps the aspect ratio of the PDF output to that of the original image:

ImageEnView1.IO.Params.PDF_PaperWidth  := 595;
ImageEnView1.IO.Params.PDF_PaperHeight := 0;


However, this is not mentioned in the CHM documentation.
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 03 2025 : 21:09:43
OK, I see. I will update the documentation.


Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Dec 03 2025 : 01:40:24
"If either PDF_PaperWidth or PDF_PaperHeight are 0, the page will be output at the size of the image."

That's what I implicitly said.

The documentation says:

"If you set PDF_PaperWidth AND PDF_PaperHeight to 0 the page will be output at the size of the image. Note: This may create huge pages!"

However, according to my tests (and what I said implicitly), setting only "PDF_PaperHeight to 0" (while setting PDF_PaperWidth to 595) sets the PDF dimensions to those of the original image. No "huge pages" are created.

BTW: In my opinion, the ImageEn Library is the best VCL image library on the market. Thank you for that!

xequte Posted - Dec 02 2025 : 23:13:38
Hi Peter

Sorry, that is not quite correct. If either PDF_PaperWidth or PDF_PaperHeight are 0, the page will be output at the size of the image.

This is explained in the documentation:

https://www.imageen.com/help/TIOParams.PDF_PaperWidth.html

Nigel
Xequte Software
www.imageen.com