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


All forums · Statistics · Search ·

Two Pilots forum / For software developers / Coordinate System Used
Author Message
GrindKore
Member
# Posted: 25 Jan 2005 20:01


What do the X,Y values that are often used to position various objects represent?
Documentation leaves no clue, is it pixels? Perhaps twips?

I hope you guys make a better documentation for this product.

Eugene
Member
# Posted: 27 Jan 2005 12:13


You should set these values to pixels

Anonymous
# Posted: 27 Jan 2005 18:24


Yes,
would interest me as well...

Iker Celorrio
Member
# Posted: 1 Feb 2005 12:52


Hi all
All positions and sizes in PDF are detailed in points.
This points are variable dependent of the PDF Resolution.

By default the PDF Resolution is 72. You can change this value on the property Resolution of the Document (PDF.Resolution)

Containing this value on a variable called resolucion then we have 2 conversion functions:

###################################################################### ##########
# Convert from milimeters to points
function fpdf_mm2pt(milimetros)

define milimetros decimal(15,5),
puntos decimal(15,5)

let resolucion = 72

let puntos = milimetros / 10 / 2.54 * resolucion

return puntos

end function

###################################################################### ##########
# Convert from Pixels to Points
function fpdf_px2pt(pixels)

define pixels decimal(15,5),
puntos decimal(15,5)
define resolucion smallint

let puntos = pixels * resolucion / resolucion_pantalla

return puntos

end function
########## END FUNCTIONS #############

The conversion from milimeters to points is this
let points = milimeters / 10 / 2.54 * pdf_resolution
The conversion from inches to points is this
let points = inches * pdf_resolution

The conversion from pixels to points is this
let points = pixels * pdf_resolution / screen_resolution

The screen_resolution is that you change on windows,
on display properties,
on configuration tab
click on advance options
on General tab.


Best Regards
Iker Celorrio
NOTE: Sorry about my english. I am not english-speaker, is not my native language.

 

 

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

 

Page top