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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 SaveToFilePDF aspect ratio
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

1018 Posts

Posted - Dec 02 2025 :  06:40:01  Show Profile  Reply
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.

xequte

39298 Posts

Posted - Dec 02 2025 :  23:13:38  Show Profile  Reply
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
Go to Top of Page

PeterPanino

1018 Posts

Posted - Dec 03 2025 :  01:40:24  Show Profile  Reply
"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!

Go to Top of Page

xequte

39298 Posts

Posted - Dec 03 2025 :  21:09:43  Show Profile  Reply
OK, I see. I will update the documentation.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: