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.

Sun Jul 30, 2017 5:20 pm

Hi

I want to insert a new page and write on that new page. I have the code below but it doesnt insert the written text, only a blank page. Can someone help please?

Dim doc1 = New PdfDocument()
doc1.LoadFromFile("T:\maf.pdf")
Dim page = doc1.Pages(0)
Dim size = page.Size

Dim newPage = doc1.Pages.Insert(1, Size)
newPage.Canvas.DrawTemplate(page.CreateTemplate(), New PointF(0, 0))
newPage.Canvas.DrawString("Hello World.", New PdfFont(PdfFontFamily.Helvetica, 30.0F), New PdfSolidBrush(Color.Black), 10, 10)
doc1.SaveToFile("t:\result1.pdf")

maf40
 
Posts: 1
Joined: Sat Jul 29, 2017 8:05 pm

Mon Jul 31, 2017 2:42 am

Dear maf40,

Thanks for your inquiry.
I have tested the code with the latest Spire.PDF Pack(Hot Fix) Version:3.9.226, it works fine on my side. Please try to use this version. If the issue still exists, please provide the input file for testing.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Aug 02, 2017 8:04 am

Dear maf40,

How is the issue now ?
Could you please give us some feedback at your convenience ?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF

cron