When attempting to convert a PDF to PDF/A , the rendition results a PDF instead of PDF/A.
I have used following code:
Document doc = new Document(“C:\Docs\10534\PETICION_CONCEJAL_21_input.pdf”);
doc.convert(“C:\Docs\10534\resultant.txt”, com.aspose.pdf.PdfFormat.PDF_A_1B, com.aspose.pdf.ConvertErrorAction.Delete);
doc.save(“C:\Docs\10534\PETICION_CONCEJAL_21_OutputPdfa.pdf”);
@rnara
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFJAVA-43592
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Is it considered as a bug? If so, when can we expect the fix to be addressed?
Also, could we please be informed of the root cause behind the unexpected rendering in this particular sample?
Thanks,
Bhupali
The attached archive PETICION_CONCEJAL_21_OutputPdfa.pdf has no PDF_A_1B standard problems. If we read the log from the resultant.txt file, we can see that all the problems found during the conversion process were fixed because it has the following mark: Convertable=“True”
Also, the attached output file has been found to be compatible with PDF_A_1B through Adobe Acrobat Preflight (see attached image). So there is no bug in here.
Notice also that the reason for the issue on other computers can be license permission on the GillSans-Bold font that blocks its embedding, and that will be notified in the log with Convertable=“False” or because we can’t find that font in the system because it is not standard one. If we add into the system GillSans-Bold font without license permission for embedding - the conversion will be done without a problem.
Otherwise, we should substitute the GillSans-Bold font with another font with no license restrictions.
For example:
//enable substitution by the font name
FontRepository.getSubstitutions().add(new SimpleFontSubstitution("GillSans-Bold", "Arial"));
...customer's code...
We are not looking for any code change. Could you please suggest a better solution avoiding code change. image.png (18.5 KB)
I have already added GillSans Regular font into the system (installed it from internet attached the image above).
Thanks!
Could you please inform me of the reason why, while I can successfully render documents to PDF/A using the same input file, the customer is encountering difficulties rendering from DOCX to PDF/A? Instead, it seems to generate a regular PDF. Could this be due to differences in fonts that Aspose does not support, leading to rendering issues in the customer’s environment? I have attached the input file, the PDF/A file (from my dev environment), and the PDF file (from the customer’s environment) for your reference.
@andriy.andrukhovski I’ve shared both the customer and our development output files (please refer the attachment in above comments) and have observed differences in fonts. Could you kindly confirm whether the root cause of this issue pertains to the fonts?
@rnara
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFJAVA-43788
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The problem is not in the Aspose code, but in the client’s environment, because required fonts that are needed for conversion are absent (“GillSans-Bold”).
According to the PDF/A standard, fonts used in the document must be embedded when converting to PDFA, but they cannot be embedded if they are absent in the system and Aspose cannot find them.
To find out if the document is converted correctly or not, you need to get the value returned by the convert(…) method - it must be TRUE.
In addition, the list of fonts that have problems that can’t be solved are described in the log file in the category < Fonts/> with attribute Convertable=“False”, that is created during conversion.
We recommend adding all necessary fonts to the target system if you can’t modify code and use features of Aspose to replace problematic fonts that were not found in the system.