Hi,
We need to convert PDF to PDF/X in Java code (Kotlin),
We ran the process in this example,
We checked the PDF using Adobe Pro preflight and while most issues were solved, not all of them did:
Old PDF:
image.png (133.7 KB)
New PDF:
image.png (113.2 KB)
Some of the errors (in new) seems related to the version trial and this text:" Evaluation Only. Created with Aspose.PDF. Copyright 2002-2022 Aspose Pty Ltd." added in red.
Will using the licensed version reach full PDF/X compliance (according to preflight)?
@EyallNext
Firstly, please try to use a free 30-days temporary license in order to remove the evaluation warning. Then, please try using the latest available version of the API. In case issue still persists, please share your sample PDF with us so that we can test the scenario in our environment and address it accordingly.
Thx a lot Asad,
Added the license,
Now I get 1 error less ,
Am I missing something in code:
the snippet is (in Kotlin):
fun convertPdfToPDFX(){
// Set the license
val licence = License().setLicense("../Aspose.PDFforJava.lic");
// Load a PDF
val pdfDocument = Document("/Users/eyallevy/skyscraper/DocumentGeneratorService/src/test/java/com/nextinsurance/documentgenerator/handlers/helpers/tmp18439189545682121241.pdf");
// Create an object of PdfFormatConversionOptions class and set desired characteristics
val options = PdfFormatConversionOptions(PdfFormat.PDF_X_1A);
options.setAlignText(true);
options.setLogFileName("ConversionLog.xml");
options.setErrorAction(ConvertErrorAction.Delete);
// Convert the file
pdfDocument.convert(options);
// Save the output
pdfDocument.save("output_x_1a.pdf");
Document("output_x_1a.pdf").validate(options)
}
File after conversion still have some issues:
image.jpg (69.5 KB)
Oldfile:
tmp18439189545682121241.pdf (7.1 KB)
created PDF:
output_x_1a.pdf (551.6 KB)
Thx…
Eyal.
@EyallNext
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-44184
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.