Dear Aspose Team,
we are trying to convert Pdf documents into PDF/A 1b format.
These documents are representing the output of a DOCx to PDF conversion using Aspose.Words for .Net (15.10).
The Aspose.PDF version tested is 11.0 for .Net.
The validation we do beforehand is already pointing out some issues.
Interesting is, that even with and empty Word document source the problem exists.
If we still try to save the document without respecting the return parameter, we get an System.IndexOutOfRangeException: Index was outside the bounds of the array.
If we fall back to PDF/A 2b, then the conversion is done successfully.
Does this mean we will never have the possibility to convert an Aspose.Words document finally into a PDF/A 1b document format?
Or are we missing something important?
The coding used is the following:
Also find attached the used documents and validate.log.
[TestMethod]
public void testPdfaFormat()
{<span style="color:#4ec9b0;">String</span> workdir <span style="color:#b4b4b4;">=</span> <span style="color:#d69d85;">@"C:\pdftest\"</span>; <span style="color:#4ec9b0;">String</span> pdfFilepath <span style="color:#b4b4b4;">=</span> workdir<span style="color:#b4b4b4;">+</span><span style="color:#d69d85;">"testContentAspose.pdf"</span>; <span style="color:#4ec9b0;">String</span> pdfFilepath2 <span style="color:#b4b4b4;">=</span> workdir <span style="color:#b4b4b4;">+</span> <span style="color:#d69d85;">"Sound.pdf"</span>; <span style="color:#4ec9b0;">String</span> convertLogfile1 <span style="color:#b4b4b4;">=</span> workdir <span style="color:#b4b4b4;">+</span> <span style="color:#d69d85;">"convertlog1.log"</span>; <span style="color:#4ec9b0;">String</span> convertLogfile2 <span style="color:#b4b4b4;">=</span> workdir<span style="color:#b4b4b4;">+</span><span style="color:#d69d85;">"convertlog2.log"</span>; <span style="color:#4ec9b0;">String</span> validateLogfile <span style="color:#b4b4b4;">=</span> workdir <span style="color:#b4b4b4;">+</span> <span style="color:#d69d85;">"validatelog.log"</span>; <span style="color:#4ec9b0;">Document</span> doc <span style="color:#b4b4b4;">=</span> <span style="color:#569cd6;">new</span> <span style="color:#4ec9b0;">Document</span>(pdfFilepath); doc<span style="color:#b4b4b4;">.</span>Validate(convertLogfile1, <span style="color:#b8d7a3;">PdfFormat</span><span style="color:#b4b4b4;">.</span>PDF_A_1B); doc<span style="color:#b4b4b4;">.</span>Convert(convertLogfile2, <span style="color:#b8d7a3;">PdfFormat</span><span style="color:#b4b4b4;">.</span>v_1_4, <span style="color:#b8d7a3;">ConvertErrorAction</span><span style="color:#b4b4b4;">.</span>Delete); <span style="color:#569cd6;">bool</span> success <span style="color:#b4b4b4;">=</span> doc<span style="color:#b4b4b4;">.</span>Convert(validateLogfile, <span style="color:#b8d7a3;">PdfFormat</span><span style="color:#b4b4b4;">.</span>PDF_A_1B, <span style="color:#b8d7a3;">ConvertErrorAction</span><span style="color:#b4b4b4;">.</span>None); <span style="color:#569cd6;">if</span> (<span style="color:#b4b4b4;">!</span>success) { <span style="color:#4ec9b0;">Console</span><span style="color:#b4b4b4;">.</span>WriteLine(<span style="color:#d69d85;">"Conversion not successful!"</span>); success <span style="color:#b4b4b4;">=</span> doc<span style="color:#b4b4b4;">.</span>Convert(convertLogfile1, <span style="color:#b8d7a3;">PdfFormat</span><span style="color:#b4b4b4;">.</span>PDF_A_2B, <span style="color:#b8d7a3;">ConvertErrorAction</span><span style="color:#b4b4b4;">.</span>Delete); doc<span style="color:#b4b4b4;">.</span>Save(workdir<span style="color:#b4b4b4;">+</span><span style="color:#d69d85;">"pdfa2b.pdf"</span>); } <span style="color:#569cd6;">else</span> { doc<span style="color:#b4b4b4;">.</span>Save(workdir<span style="color:#b4b4b4;">+</span><span style="color:#d69d85;">"pdfa1b.pdf"</span>); }</pre></div><div>Thanks and kind regards</div><div>Wolfgang</div>