MRC-Compression and ConvertToPDFA produces false PDF/A conformance

Discussions about PDF management.
Post Reply
EFernkaes
Posts: 36
Joined: Fri Jul 31, 2015 5:27 pm

MRC-Compression and ConvertToPDFA produces false PDF/A conformance

Post by EFernkaes » Tue Feb 04, 2020 3:00 am

v.14.1.51

Hi ORPALIS-Team,

I am testing now for several hours, but the result is always the same.
I want to convert a regular PDF to an MRC-compressed PDF/A-1b pdf-file.

Approach 1
Using GdPicturePDFReducer, loading the resulting pdf and then trying to .ConvertToPDFA:

Code: Select all

    
    		Dim gdpicturePDFReducer As GdPicturePDFReducer = New GdPicturePDFReducer()
                gdpicturePDFReducer.PDFReducerConfiguration.OutputFormat = PDFReducerPDFVersion.PdfVersionRetainExisting
                gdpicturePDFReducer.PDFReducerConfiguration.RecompressImages = True
                gdpicturePDFReducer.PDFReducerConfiguration.EnableMRC = True
                gdpicturePDFReducer.PDFReducerConfiguration.DownscaleResolutionMRC = 200
                gdpicturePDFReducer.PDFReducerConfiguration.PreserveSmoothing = False
                status = gdpicturePDFReducer.ProcessDocument(SourceNamePDF, DestNamePDF)
                 status = urGdPicturePdf.LoadFromFile(DestNamePDF, False)
                 status = urGdPicturePdf.ConvertToPDFA(tmpComparablePDFFile, PdfConversionConformance.PDF_A_1b, True, True)
		urGdPicturePdf.CloseDocument
                
The resulting pdf has no PDF/A-1b conformance but PDF/A-2b

Approch 2
Replacing the Images with MRC compressed one and then ConvertingToPDFA:

Code: Select all

status = urGdPicturePdf.LoadFromFile(SourceNamePDF, False)
                            urGdPicturePdf.SetMRCPreserveSmoothing(False)
                            urGdPicturePdf.SetCompressionForBitonalImage(PdfCompression.PdfCompressionJBIG2)
                                urGdPicturePdf.SetCompressionForColorImage(PdfCompression.PdfCompressionJPEG)
                                urGdPicturePdf.SetJpegQuality(80) 

                        For page = 1 To PageCount
                            status = urGdPicturePdf.SelectPage(page)
                                If urGdPicturePdf.IsPageImage(True) Then

                                        ImageID = urGdPicturePdf.ExtractPageImage(1)
                                        status = urGdPicturePdf.GetStat()
                                        If status = GdPictureStatus.OK Then
                                            ImgResName = urGdPicturePdf.GetPageImageResName(0)
                                            status = urGdPicturePdf.GetStat()
                                            If status = GdPictureStatus.OK Then
                                                status = urGdPicturePdf.ReplaceImageMRC(ImgResName, ImageID)
                                            End If
                                        End If
                                        GdPictureDocumentUtilities.DisposeImage(ImageID)
                                    End If
                                End If
                        Next
                 status = urGdPicturePdf.ConvertToPDFA(tmpComparablePDFFile, PdfConversionConformance.PDF_A_1b, True, True)
		urGdPicturePdf.CloseDocument
Same. Created PDF has a conformance Level of PDF/A-2b

The only working version is loading the source pdf, creating a new pdf, iterating through all the pages, extracting the Images of each page from the source and placing the compressed one to the new pdf.

Code: Select all

                    status = oGdPicturePdf.NewPDF(PdfConformance.PDF_A_1b)
status = urGdPicturePdf.LoadFromFile(SourceNamePDF, False)
                        For page = 1 To PageCount
                            status = urGdPicturePdf.SelectPage(page)
ImageID = urGdPicturePdf.RenderPageToGdPictureImage(200, True)
                                    status = oGdPicturePdf.AddImageFromGdPictureImage(ImageID,PdfAdvancedImageCompression.PdfAdvancedImageCompressionMRC)
                                        GdPictureDocumentUtilities.DisposeImage(ImageID)
                        Next
                        urGdPicturePdf.closeDocument
			status = oGdPicturePdf.SaveToFile(DestNamePDF, True)
Any ideas?

Attached one file I was testing with. Many others, too.
Attachments
0131618135_0235_20200203.pdf
(686.91 KiB) Downloaded 505 times

loicaigon
Posts: 35
Joined: Mon Oct 21, 2019 9:11 am

Re: MRC-Compression and ConvertToPDFA produces false PDF/A conformance

Post by loicaigon » Mon Feb 10, 2020 10:52 am

Hi EFernkaes,

Let me get in touch with our engineers and come back to you asap.

Best regards,

Loic Aigon
Customer Success Manager
Orpalis

EFernkaes
Posts: 36
Joined: Fri Jul 31, 2015 5:27 pm

Re: MRC-Compression and ConvertToPDFA produces false PDF/A conformance

Post by EFernkaes » Thu Feb 20, 2020 2:18 am

Same like on the previous post: Did you already talk to the programmers?
Could they reproduce my issues?

Greetings
Reinhard

loicaigon
Posts: 35
Joined: Mon Oct 21, 2019 9:11 am

Re: MRC-Compression and ConvertToPDFA produces false PDF/A conformance

Post by loicaigon » Fri Feb 21, 2020 3:53 pm

Hi Reinhard,

I could see indeed with engineers and they could reproduce the issue. After analysis, they suggest that you revert the process. That means converting first to PDF/A and then apply MRC compression. The latter will keep PDF/A conformance in that specific order.

Hope that helps,

Loic Aigon

loicaigon
Posts: 35
Joined: Mon Oct 21, 2019 9:11 am

Re: MRC-Compression and ConvertToPDFA produces false PDF/A conformance

Post by loicaigon » Tue Mar 03, 2020 3:09 pm

Hi Reinhard,

Good news here. The problem has been solved and the fix will be available in next release (i.e. GdPicture.NET 14.1.56)

Best regards,

Loic Aigon.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest