Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / Converters / Image2PDF - EMF page dimensions incorrect?
Author Message
Nicholas Piasecki
Member
# Posted: 5 Oct 2009 20:27


Let's say that I have an EMF with

- an rclFrame of { 0, 0, 21590, 27940 }
- a szlDevice of { 1280, 800 }
- a szlMillimeters of { 320, 240 }

Okay, so the rclFrame tells me that the size of the EMF should be

- 21590 / 2540 = 8.5 inches wide
- 27940 / 2540 = 11 inches tall

But my actual PDF output from Image2PDF Pilot ends up being 10.15" x 10.95" which is not expected. Is Image2PDF doing something weird in the DPI calculation? If my math is right, the horizontal and vertical DPI is not the same:

Horizontal DPI: (1280 * 25.4) / 320 = 101.600

Vertical DPI: (800 * 25.4) / 240 = 84.667

The 10.95" for the height is close to the 11" target -- I guess that's a rounding error when drawing on a device context from the reference device -- but the 10.15" is weird. If I run the same EMF under Image2PDF on a differently sized monitor, I can get different output, like 8.61" x 11.09".

Is there anything I can do to ensure that I always get 8.5" x 11" output? What am I missing? Thanks!

Nicholas Piasecki
Member
# Posted: 5 Oct 2009 21:18


Hmm. Some more thoughts on this. Rounding the DPI values,

102 / 85 = 1.2 * 8.5 = 10.2 which is about 10.15"

It seems as though that Image2PDF has scaled the horizontal dimension for some reason.

Nicholas Piasecki
Member
# Posted: 6 Oct 2009 18:02


I think I've figured part of it out.

The problem is that when the DPI comes out to something that is not an integer, Image2PDF uses the truncated value when determining the page size. For example, 84.667 would be used as 84 instead of rounding up to 85.

max.f
# Posted: 7 Oct 2009 09:56


Please find an answered in your e-mail.

--
Max Filimonov,
max.f@colorpilot.com

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.020

 

Page top