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.
Wed Oct 23, 2019 10:22 am
你好,
Spire.PDF中的默认单位是Point。我们提供了PdfUnitConvertor类来转换单位,请参考以下代码自定义页面大小。
- Code: Select all
PdfDocument doc = new PdfDocument();
Dimension2D size=new Dimension();
PdfUnitConvertor uc=new PdfUnitConvertor();
float w=uc.convertUnits(600.3f, PdfGraphicsUnit.Millimeter ,PdfGraphicsUnit.Point);
float h=uc.convertUnits(600.3f,PdfGraphicsUnit.Millimeter,PdfGraphicsUnit.Point);
size.setSize(w,h);
Best wishes,
Amber
E-iceblue support team
-


Amber.Gu
-
- Posts: 525
- Joined: Tue Jun 04, 2019 3:16 am
Wed Dec 25, 2019 10:30 am
你好,
抱歉打扰。
请问你的问题解决了吗?能否给我们一些反馈?
Best wishes,
Amber
E-iceblue support team
-


Amber.Gu
-
- Posts: 525
- Joined: Tue Jun 04, 2019 3:16 am