Hi,
I am converting Word into Pdf/UA format using Aspose.Words. I then validate the converted Pdf against the Pdf/UA standard using Aspose.Pdf.
I am using .NET and Aspose.Words.dll version 22.1 and Aspose.Pdf.dll 21.12.
This is some sample code that shows how the Word document is converted to Pdf/UA and then validated:
Aspose.Words.Document doc = new Aspose.Words.Document(wordFile);
Aspose.Words.Saving.PdfSaveOptions pdfOpts = new Aspose.Words.Saving.PdfSaveOptions();
pdfOpts.SaveFormat = Aspose.Words.SaveFormat.Pdf;
pdfOpts.Compliance = Aspose.Words.Saving.PdfCompliance.PdfUa1;
pdfOpts.ExportDocumentStructure = true;
pdfOpts.OutlineOptions.HeadingsOutlineLevels = 3;
pdfOpts.OutlineOptions.CreateMissingOutlineLevels = true;
doc.Save(pdfFile, pdfOpts);
Aspose.Pdf.Document document = new Aspose.Pdf.Document(pdfFile);
document.Validate(logfile, Aspose.Pdf.PdfFormat.PDF_UA_1);
From the validation result, I have a few questions about the actual nature of the issue, and if it’s something that may be an issue in either of the two products:
1. Inserted images are always validated with this error:
Problem Severity=“Warning” Clause=“7.1” ObjectID=“47” Page=“1” Convertable=“False” Code=“7.1:2.4.1”>Possibly inappropriate use of a ‘Figure’ structure element
Is there somway to change this, wither in Word document, in Aspose.Words or in the code that creates the Pdf?
2. Tables are always validated with this error:
Problem Severity=“Warning” Clause=“7.5” ObjectID="" Page="" Convertable=“False” Code=“7.5:3.2”>Table summary missing
Even tables that have Alt title and description added. There seems no way to add a table summary in Word, so maybe Aspose.Words can add the necessary tags using the Alt text info, if the error is indeed correct.
3. Table of content - each entry gives this error:
Problem Severity=“Error” Clause=“7.18.1” ObjectID=“20” Page=“2” Convertable=“False” Code=“7.18.1:2”>Alternative description missing for an annotation
As this is a heading put into a TOC automatically by Word, it’s not possible to have an Alt description. Is this down to an error in Aspose.Words or Aspose.Pdf? Or can it be corrected in either manually changing word document or by changing the code to create the Pdf?
As these issues would be related to either product, as well as related to thing that need to be changes in the actual Word document, I am hoping you can assist from this forum.
Regards
Thomas