[Resolved] Default measure units for a PDF document ?

Hello,

I want to add a margin at the top of my PDF document, but the document does not indicate the unit of measurement to use.

What is the default measurement used for the margin? (centimeter? point? inch? ...)

Is it also possible to convert the default unit of measure into a desired unit of measure? Using the PdfUnitConvertor class for example ?

Thank you in advance

Best Regards.

Julien

2 Replies

SL Sowmiya Loganathan Syncfusion Team December 21, 2017 11:48 AM UTC

Hi Julien, 

All the units used in our PDF library and including margins are represented in Points. We can convert default unit of measurement into desired unit of measurement using PdfUnitConvertor Class.  

Please find the below code snippet for your reference : 

            PdfUnitConvertor convertor = new PdfUnitConvertor(); 
 
            float inches = 2; 
 
            //Convert inches to points 
            float points = convertor.ConvertUnits(inches, PdfGraphicsUnit.Inch, PdfGraphicsUnit.Point); 
 
            pdfDocument.PageSettings.Margins.All = x; 

Please let us know if you need further assistance on this. 

Regards, 
Sowmiya L 



JU Julien December 22, 2017 09:19 AM UTC

Great. Thank you very much !

Have a good day

Best Regards.

Julien.


Loader.
Up arrow icon