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.

Thu Oct 08, 2015 7:12 am

I would like to know why when I create a new page in the PDF file is saved to a double copy of each page.
for example if I created 2 pages in the file I see both duplicate.
maybe I have to set some parameters of the document?

code vbnet:

Dim doc As New PdfDocument
Dim margin As New PdfMargins()
margin.Top = 0
margin.Bottom = 0
margin.Left = 0
margin.Right = 0
doc.PageSettings.Width = PdfPageSize.A4.Width
doc.PageSettings.Height = PdfPageSize.A4.Height
doc.SaveToFile("test.pdf", FileFormat.PDF)

with this code you create a document of 2 pages.
doc.pages.count command returns one!

numero
 
Posts: 1
Joined: Tue Dec 10, 2013 9:25 am

Thu Oct 08, 2015 8:54 am

Hello,

I used Spire.PDF Pack(Hot Fix) Version:3.5.80 to test your code, and the output pdf only has one page.
Please try the pack, its downloading link is http://www.e-iceblue.com/Download/downl ... t-now.html.

Best Regards,
Amy
E-iceblue support team
User avatar

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

Return to Spire.PDF