I tried to save a word doc to PDF with PdfSaveOptions.ExportDocumentStructure = true
using the version 21.2.0 and I found that page’s header and footer are not tagged in the exported PDF. The problem is since header and footer are not tagged so the contents in there won’t be read in reader tools like Acrobat reader. And page number also is important for the reading.
Is there any way I can include footer and header to the tagged PDF and make them readable?.
Or will it be better to have an options to do this in later version?
Please upgrade to the latest (21.3) version of Aspose.Words for .NET and see how it goes on your end? In case the problem still remains, then please ZIP and upload your input Word document and Aspose.Words generated PDF file showing the undesired behavior here for testing. We will then investigate the issue on our end and provide you more information.
Just tested and it still remains. Please investigate this issue.
tagged-pdf-by-aspose-21.3.zip (62.0 KB)
The ‘tagged-pdf-by-aspose-21.3.pdf’ that you shared in previous post was actually produced by using an old 21.2 version of Aspose.Words for .NET; can you please upgrade to the latest 21.3 version of Aspose.Words and see how it goes on your end? What editor/tool did you use to verify that page’s header and footer are not tagged in the Aspose.Words generated PDF? Can you please share comparison screenshot? Do you see the same problem in this pdf (21.3.pdf (52.5 KB))?
I used the following code to produce above PDF:
Document doc = new Document("C:\\temp\\tagged-pdf-by-aspose-21.3\\tagged-pdf-by-aspose-21.3.docx");
PdfSaveOptions opts = new PdfSaveOptions();
opts.ExportDocumentStructure = true;
opts.Compliance = PdfCompliance.PdfA1a;
doc.Save("C:\\Temp\\tagged-pdf-by-aspose-21.3\\21.3.pdf", opts);
You’re right. I miss at some point on updating Aspose to Ver. 21.3. I have tried again with ver.21.3 but the result still the same (cannot read header content, footer content, and page number).
I also have tried to read the file 21.3.pdf which you have attached above. Both results are the same.
This picture is explaining what happening header-footer.zip (34.8 KB)
While using the latest 21.3 version of Aspose.Words for .NET, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-22004. Your thread has been linked to this issue and you will be notified here as soon as it will get resolved. Sorry for the inconvenience.
@awais.hafeez Thank you so much. Just one more discussion, I think Page number is better be the first reading item of each page for tagged PDF.
Regarding WORDSNET-22004, we have completed the analysis of this issue and concluded to close this issue with “not a bug” status. This is expected behavior. Headers and footers are tagged as artifacts according to the accessibility requirements. If we can help you with anything else, please feel free to ask.