Page 1 of 1

Insert a blank page

Posted: Tue Jun 12, 2018 9:13 am
by Metalcoder
Hello, Loic,
for almost 10 years now I use gdpicture v5 which suits me very well for my applications. I have another project on PDF and to justify this purchase to my IT department I have to test the V14, except I have a problem.
I would like to open any PDF, add a blank page (or insert a PDF) first and save the PDF.
could you make me a very simple code knowing that I always work in vb6 even if sometimes I try VB net.

thanks in advance

François

Re: Insert a blank page

Posted: Thu Jun 21, 2018 9:17 am
by delbeke
Hi MetalCoder.

Loïc ask me to create a sample for you.
Regrettably I no longer have a vb6 installed, so i have make this sample with a text editor and of course, I can't build the exe file.

Private Sub Form_Load()
Dim oLicenseManager As New LicenseManager
oLicenseManager.RegisterKEY ("XXX") 'Please, replace XXX by a valid demo or commercial license key.
End Sub

Private Sub Command1_Click()
Dim oGdPicturePDF As New GdPicturePDF
If oGdPicturePDF.LoadFromFile(FileIn, False) = GdPictureStatus_OK Then
oGdPicturePDF.InsertPage(PdfPageSizes.PdfPageSizeA4, 1)
oGdPicturePDF.SaveToFile(FileOut)
End If
End Sub

Hope this Help
Best Regards
Jean-Luc

Re: Insert a blank page

Posted: Thu Jun 21, 2018 6:08 pm
by Gabriela
Hi,

You can also find some examples here:
https://www.gdpicture.com/guides/gdpicture/web ... tPage.html