Change PDF page size starts to support in Spire.PDF 3.2.165

Spire.PDF

We are pleased to announce a new hotfix version-Spire.PDF pack 3.2.165 today. With the effort of our develop team, we add new features to change the PDF page size and add form fields to existing pdf in this version of Spire.PDF. We are also focus on fixing bugs in this version. Viewing the following full description of its improved functions:

New Feature:

Add the feature to change PDF page size.

PdfDocument pdf = new PdfDocument("Sample.pdf");
PdfDocument newPdf = new PdfDocument();
foreach (PdfPageBase page in pdf.Pages)
{ 
PdfPageBase newPage = newPdf.Pages.Add(PdfPageSize.A1, new PdfMargins(0)); 
PdfTextLayout loLayout= new PdfTextLayout();
loLayout.Layout=PdfLayoutType.OnePage;
page.CreateTemplate().Draw(newPage, new PointF(0, 0),loLayout);
 } 
newPdf.SaveToFile("Result.pdf");

Add the feature to add form fields to an existing PDF.

PdfDocument loDoc= new PdfDocument();
loDoc.LoadFromFile("file.pdf");
if (loDoc.Form== null)
 { 
   loDoc.AllowCreateForm= true;
 }
PdfPageBase loPage= loDoc.Pages[0];
PdfTextBoxField loField=new PdfTextBoxField(lopage,"kkk");
loField.Bouns=new RectangleF(100,100,20,10);
loField.BorderWidth=0.75f;
loField.BorderStyle=PdfBorderStyle.Soild;
loField.Required= true;
loDoc.Form.Fields.Add(loField);
loDoc.SaveToFile("qqq.pdf");

Bug solutions:

  • Fixes the issue that caused tick in checkbox to be changed to 4 when convert PDF to Image.
  • Fixes the issue where some special characters lost when convert PDF to Image.
  • Fixes the issue where some special characters lost when print PDF files.
  • Fixes the issue that caused some PDFs is printed as blank.
  • Fixes the issue that caused PDF failed to convert to Image.
  • Fixes the issue where some XPS documents failed to load.

Free Trial to evaluate Spire.PDF 3.2.165 here:

http://www.e-iceblue.com/Download/download-pdf-for-net-now.html