Convert PDF to PDF/A in VB.NET

Hello,

This time I downloaded Aspose.PDF to see if I can use it to convert PDF files in PDF/A. Unfortunately, I see, that I have many PDF files Aspose.PDF is unable to convert.

My code snippet is below. Source PDF files I was unable to convert are an attachment.

Could you please tell me if you are able issues I found?

Mikhael


_failed to convert.zip (1.8 MB)

For Each sFile In lst
Try
Dim sPDFFileNameExt = GetFileNameExt(sFile)

            Using pdfDocument = New Document(sFile)
                Dim sOutDir4File = GetFileDirectory(IO.Path.Combine(sOutFolder, sPDFFileNameExt))

                If Not IO.Directory.Exists(sOutDir4File) Then
                    IO.Directory.CreateDirectory(sOutDir4File)
                End If

                If pdfDocument.Convert(IO.Path.Combine(sOutFolder, sPDFFileNameExt + " - log.xml"), PdfFormat.PDF_A_1B, ConvertErrorAction.None) Then
                    pdfDocument.Save(IO.Path.Combine(sOutFolder, sPDFFileNameExt))
                Else
                    Console.WriteLine(">> Failed attempt to convert file: '" + sFile + "'")
                End If
            End Using
        Catch ex As Exception
            Console.WriteLine(">>>> " + ex.Message + ". File: '" + sFile + "'")
        End Try
    Next

@Mikhael

We have tested the scenario in our environment while using 22.1 version and noticed that all files were except 21,5 cm x 30 cm.pdf were not correctly converted into PDF/A format. There was no error thrown by the API but output PDFs were not PDF/A compliant. Therefore, we have logged following issues in our issue tracking system:

  • PDFNET-51315 - 25,397 cm x 19,048 cm.pdf
  • PDFNET-51314 * 2014-RI-MIDDLETOWN-T-2014-000032500000-SWN046-RIStateReturn.pdf
  • PDFNET-51313 * 500051.pdf
  • PDFNET-51312 * ABCD.pdf
  • PDFNET-51311 * Agreement 18.09(ended).pdf
  • PDFNET-51310 * barcode sticker for printing.pdf
  • PDFNET-51309 * Gracias por contestar tan pronto.pdf

We will further look into detail of the logged tickets and let you know as soon as they are resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hello @asad.ali,

Thank you for your fast answer!

I hope your team will be able to fix these issues, because I have plans to license and use Aspose.PDF for my needs, as I already use Aspose.Words and Aspose.Cells.

So, please keep me updated!

Mikhael

@Mikhael

We have recorded your concerns and will surely resolve the logged tickets. We will let you know as soon as they are resolved.