Hi team,
Is there a way to convert or save the PDF in Doc2PDF in PDF version 1.7 ?
Thanks & Regards
Any updates?
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document("input.pdf");
//Convert to PDF/A compliant document
pdfDocument.convert("Conversion_log.xml", com.aspose.pdf.PdfFormat.v_1_7, com.aspose.pdf.ConvertErrorAction.Delete);
//Save updated document
pdfDocument.save("output.pdf");
The issues you have found earlier (filed as WORDSNET-11083) have been fixed in this Aspose.Words for .NET 19.12 update and this Aspose.Words for Java 19.12 update.
It is to update you that starting from the 19.12 versions, Aspose.Words for .NET and Aspose.Words for Java APIs support converting various Word document formats (such as DOC, DOCX, RTF, XML etc) to PDF 1.7 standards compliance level.
Aspose.Words also provides the PdfCompliace enumeration to support the conversion of Word document to various PDF format standards (such as PDF 1.7, PDF 1.5, etc.).
You can use the following C# Code to explicitly specify PDF standards compliance level by using PdfSaveOptions
class:
Document doc = new Document("E:\\Temp\\input.docx");
PdfSaveOptions opts = new PdfSaveOptions();
opts.Compliance = PdfCompliance.Pdf17;
doc.Save("E:\\Temp\\20.5.pdf", opts);
And since the default value of PdfSaveOptions.Compliance
option is Pdf17
, even the following simple C# code will convert DOCX to PDF 1.7 version:
Document doc = new Document("E:\\Temp\\input.docx");
doc.Save("E:\\Temp\\pdf 1.7 version.pdf");