Convert PDF XFA-Forms to PDF/A-2U -> Layout problem


Hello Aspose Team,

We currently have a problem converting a PDF with XFA forms into a PDF/A-2U.

In the first step we convert the PDF (PDF-XFA-Form.pdf) into Forms.FormType.Standard, after that the PDF (PDF-Standard-Form.pdf) looks ok.

pdfDocument.Form.Type = Forms.FormType.Standard

The second step is the PDF/A-2U conversion (PDF_A_2U.pdf).
After that, there are extra spaces between letters and the layout is no longer correct.

The files are attached.

We use Aspose.PDF 19.5.0 and dotnet 4.6.1 (1.8 MB)

Best regards,
Steffen Bank



Thanks for contacting support.

We have tested the scenario using latest version i.e. Aspose.PDF for .NET 19.6 and noticed that output PDF file was not PDF/A_2u compliant. There was no compliance bar on the top of file when we opened it into Adobe Reader. We have logged this issue as PDFNET-46537 in our issue tracking system for further investigation. Please check following code snippet which we used for testing and an attached output for your reference:

var document = new Document(new FileStream(dataDir + "PDF-Standard-Form.pdf", FileMode.Open));

var options1 = new PdfFormatConversionOptions(PdfFormat.PDF_A_2U)
 LogStream = new MemoryStream(),
 ErrorAction = ConvertErrorAction.Delete,

document.Save(dataDir + "out_pdfa_optimized.pdf");

out_pdfa_optimized.pdf (972.2 KB)

Would you please test the scenario using Aspose.PDF for .NET 19.6 and in case above issue still persists at your end, please share your sample code snippet which you are using at your end for conversion. We will again test the scenario in our environment and address it accordingly.


Thank you for your prompt reply. Tomorrow I will have a day’s holiday, will then test it on Thursday and report back here.



Sure, please take your time to test the scenario and share your feedback.


Good morning,

i tested again with Aspose.PDF for .NET 19.6 and i have the same result. Extra spaces between the letters after converting in PDF/A-2U.

Here the code of the convertation:
oLogStream = New FileStream(“C:\Entwicklung\PDFTest\ConvertPDFALog.log”, FileMode.OpenOrCreate)
oPDFDoc = New Document(sFile)

    options = New PdfFormatConversionOptions(PdfFormat.PDF_A_2U, ConvertErrorAction.Delete) With {
        .IsLowMemoryMode = True,
        .LogStream = oLogStream

    bRet = oPDFDoc.Convert(options)
    If bRet Then
        oPDFDoc = Nothing
    End If

The result file has an compliance bar, see attachment.
Validation failes.
PDF_A_2U.pdf (971.3 KB)

Best regards,
Steffen Bank



Thanks for sharing the feedback.

We have again tested the scenario and were able to replicate the issue of extra spaces between letters. Hence, we have logged it as PDFNET-46549 in our issue tracking system for the sake of correction. We will further look into the details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.