Hi,
When converting DOCX to PDF, I noticed that some pages in the PDF are not editable by Adobe Acrobat DC Pro, which also caused an error when trying to add header&footers into the PDF.
Code:
var doc = DocumentHelper.OpenReadOnly(@"test.docx");
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;
var options = new PdfSaveOptions();
options.ExportDocumentStructure = true;
doc.Save(@"\out.pdf", options);
When using the ‘Edit PDF’ feature in Acrobat Pro, I found that page 1 supports editing properly but none of the page 2 content is editable. Then if I tried to add headers into the document, an error prompted that prevented the operation completely:
image.png (48.2 KB)
The error normally means there are corrupted/incompatible elements in the PDF.
Our clients have complained about this because this made the PDF cannot be properly manipulated at all even with the official Acrobat software, since they need to add headers into the document.
The issue doesn’t happen with Aspose PdfA1b compliance, but if I saved the DOCX to PDF manually, even with Pdf15 or Pdf17, the issue didn’t happen either.
I’ve attached an example document for your reference.
tests.zip (393.2 KB)
It would also be very helpful if you could let me know if there’s any workaround (other than changing the compliance because we cannot change that) that would avoid this issue.
Could you please help me check?
Thanks,