Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Nov 10, 2015 8:27 am

I would like to position elements on the page using centimetres or millimetres for measurement. The default graphics unit is points, so I have to use code such as
Code: Select all
section.PageSettings.Margins.Left = unitCvtr.ConvertUnits(1f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point);
in many places.

Is it possible to change the default graphics unit to cm or mm so that I don't have to use unitCvtr.ConvertUnits() all the time?

Thanks
Julian

julians26
 
Posts: 8
Joined: Thu Oct 15, 2015 1:26 am

Tue Nov 10, 2015 8:52 am

Hi Julian,

Thanks for your inquiry.
Sorry that it cannot do that at present.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2772
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF