Change version of PDF in PDF created using Aspose

Hi Team,

Currently when we create PDF using Aspose PDF v 9.2, the version of PDF we get is version 1.7. But when we create using v9.0 we get version of PDF as 1.4. We would like to set version of PDF generated as less than 1.5 no matter which version of Aspose PDF we use.

Thanks & Regards,

Anish C

Hi Anish,


Thanks for your inquiry. Please note by default Aspose.Pdf.Document() creates new PDF document with 1.7 PDF version and Aspose.Pdf.Generator namespace creates 1.4 PDF version. Moreover, when using Aspose.Pdf for .NET, you may try using the following code snippet to save the PDF file in particular version.


// instantiate Document object<o:p></o:p>

Aspose.Pdf.Document pdfdoc = new Aspose.Pdf.Document();<o:p></o:p>

// add page to PDF file<o:p></o:p>

pdfdoc.Pages.Add();<o:p></o:p>

// set PDF file version<o:p></o:p>

pdfdoc.Convert(new MemoryStream(), PdfFormat.v_1_4, ConvertErrorAction.Delete);<o:p></o:p>

// save PDF file<o:p></o:p>

pdfdoc.Save(“output.pdf”);



Please feel free to contact us for any further assistance.

Best Regards,