#1 2011-03-02 17:25:41

moratto
Member
From: Italy
Registered: 2011-03-02
Posts: 3
Website

PDF Page Size Unit

Hello,
          I would like to know which unit of measure are the used to express the  size of a page (DefaultPageWidth/Height) and how can I convert to pixels and to millimeters.

Thanks

Stefano Moratto
http://www.csiat.it

Offline

#2 2011-03-02 21:03:18

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: PDF Page Size Unit

Take a look at the official pdf reference document, from adobe.
http://www.adobe.com/devnet/pdf/pdf_ref … chive.html
The 1.4 or 1.5 is far enough for starting with the pdf format.

To answer your question, the standard PDF unit of measurement is called points (in fact Acrobat or Postscript points), and measures 1/72 of an inch, i.e. approximately 0.0139 inch or 25.4/72 = 0.3528 mm

And since pdf coordinates are floating point values (encoded as single in our library), you have a quasi-infinite resolution.
We use 2 decimals when generating the PDF content, that is 7200 dpi virtual resolution, if I'm correct. Far enough for high resolution printing. wink

Thanks for your interest!

Offline

#3 2011-03-03 08:51:33

moratto
Member
From: Italy
Registered: 2011-03-02
Posts: 3
Website

Re: PDF Page Size Unit

Thanks,
          I have done a good job with your framework!

I'm going to use your pdf engine in my traffic optimization CAD.

Stefano Moratto
http://www.csiat.it

Offline

#4 2011-03-03 12:25:31

moratto
Member
From: Italy
Registered: 2011-03-02
Posts: 3
Website

Re: PDF Page Size Unit

Hello,
         I would like to increase the DPI but ScreenLogPixel is readonly and it's initialized in the TPDFDocument constructor using the screen's DPI.
There is a way to assign to it a value without changing the source code of TPDFDocument?


Thanks,
           Stefano

Offline

#5 2011-03-03 16:37:40

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: PDF Page Size Unit

No this is a private property.

So I've added a write setter to this property.

Thanks for your interest.

Offline

Board footer

Powered by FluxBB