Tutorial - Inserting Blank Page

Top  Previous  Next

To insert a blank page to a PDF file, load the input PDF file using LoadFromFile() and to insert a blank page use InsertBlankPageAt function.

 

[VB]        

       

   PDFDoc.MeasurementUnit = TxgtMeasurementUnit.muInches

   'Load the Document into which the blank page is to be inserted

   PDFDoc.LoadFromFile (InputFile1)

 

   ' Inserting blank page at index 1 with width = 8.35 inches and height = 11.31 inches

   PDFDoc.InsertBlankPageAt 1, 8.35, 11.31

 

   'Save the Document

   PDFDoc.SaveToFile (OutputFile)

          

 

 

[VC++] 

       

       //Load the Document

       PDFDoc.LoadFromFile(InputFile1);

       PDFDoc.SetMeasurementUnit (2/*muInches*/);

       //Calling Inserting Blank Page at page 1 With Width = 8.35 inches And Height = 11.31        inches

       PDFDoc.InsertBlankPageAt(1,8.35,11.31);

       //Save the Document

       PDFDoc.SaveToFile(OutputFile);

 

[CS]

 

// Load the Document

PDFDoc.LoadFromFile(InputFile1);

PDFDoc.MeasurementUnit = TxgtMeasurementUnit.muInches;

//Calling Inserting Blank Page at page 1 With Width = 8.35 inches And Height = 11.31 inches

PDFDoc.InsertBlankPageAt(1,8.35,11.31);

//Save the Document

PDFDoc.SaveToFile(OutputFile);

PDFDoc.MeasurementUnit = TxgtMeasurementUnit.muPixels;