Convert existing PDF to PDF/A

Example requests & Code samples for GdPicture Toolkits.
Post Reply
User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Convert existing PDF to PDF/A

Post by Loïc » Tue Mar 27, 2012 2:08 pm

Converting existing PDF to PDF/A using rasterization approach.

This method is suitable for bitmap based PDF Documents.

Advantages:

- Can convert any existing PDF to PDF/A compliant.
- For bitmap-based PDF, each original bitmap is kept "as is".
- Generated PDF size can be highly reduced if JBIG2 compression is used (for bitmap based PDF only).

Inconvenient:

- For vector content based PDF the quality is reduced and the file size will be probably dramatically higher.
- All layers of the PDF will be merged.
- Hidden text will be dropped.


Code: Select all

        Const DPI_RENDERING As Single = 200.0F
        Const RENDER_FORMS As Boolean = True

        Dim srcPDF As New GdPicturePDF
        Dim dstPDF As New GdPicturePDF
        Dim oGdPictureImaging As New GdPictureImaging

        If srcPDF.LoadFromFile("c:\test.pdf", False) = GdPictureStatus.OK Then
            dstPDF.NewPDF(True)
            For i As Integer = 1 To srcPDF.GetPageCount()
                srcPDF.SelectPage(i)
                Dim imageID As Integer = srcPDF.RenderPageToGdPictureImageEx(DPI_RENDERING, RENDER_FORMS)
                If imageID <> 0 Then
                    dstPDF.AddImageFromGdPictureImage(imageID, False, True)
                    oGdPictureImaging.ReleaseGdPictureImage(imageID)
                Else
                    MsgBox("error, can not render page: " + i.ToString() + ". Status: " + srcPDF.GetStat().ToString)
                End If
            Next
            dstPDF.SaveToFile("c:\newpdf.pdf")
            dstPDF.CloseDocument()
            srcPDF.CloseDocument()
        End If

acl
Posts: 19
Joined: Wed Oct 03, 2012 7:52 am

Convert any PDF File into PDF/A ?

Post by acl » Wed Jun 19, 2013 5:50 pm

Does GDPicture have the capability of converting a PDF file into PDF/A? I know that it could be accomplished by rendering each page to a bitmap and then creating a new PDF out of them, but this approach has too many drawbacks to be usable.

Gabriela
Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: Convert existing PDF to PDF/A

Post by Gabriela » Wed Jan 30, 2019 9:55 am

Hello,

Just a quick update, that the direct conversion of existing PDF to PDF/A is already on our roadmap, but without any time frame yet. So stay tuned, we will keep you updated about any news.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest