Convert Files to PDF/A with Import & Export Converters

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
DeKo
User
Posts: 56
Joined: Thu Sep 28, 2017 9:45 am

Convert Files to PDF/A with Import & Export Converters

Post by DeKo »

Hello guys,

so first of all... is there a way to directly convert a file (which is not a pdf) to a pdf that is in PDF/A format? I've only seen examples with a export converter but that would be from pdf -> pdf/a.

Meanwhile i tried doing the following: convert file with import converter to a pdf file and afterwards using the export converter to convert it into pdf/a. The problem with that is, that my tool fails to validate the pdf/a conformance. If i use a printer or for example word to do the conversion to pdf and then convert it to pdf/a, the validation succeeds. So another question would be: Am i using the import converter wrong? Why does a resulting pdf fail to pass the validation?

I am doing the following:

Code: Select all

                    //converter is the corresponding import converter. this is working fine for over a year
                    IPXC_Document doc = converter.Convert(instance, file);
                    IString dest = instance.CreateString(destPath);

                    try
                    {
                        var pdfaConverter = GetPdfaConverter(instance);

                        ICab cab = instance.GetFormatConverterParams(false, "conv.exp.pdfa");
                        ICabNode node = cab.Root;

                        node.SetInt("Part", 3);
                        node.SetInt("Conformance", 1);
                        node.SetInt("ShowReport", 0);
                        node.SetString("ErrorMessage", "false");

                        pdfaConverter.Convert(instance, doc, dest, 0, cab);
                    }
                    catch (Exception ex)
                    {
                        //Log the error
                        //As a fallback, just write the pdf without converting to pdfa
                        doc.WriteToFile(destPath);
                    }
                    doc.Close();
Any help is appreciated.

Greetings,
Dennis
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Dennis,

Can you please prepare a small project that we can test and see the wrong validation behavior? Also, please try doing that with the End-User Editor and see whether it succeeds.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
DeKo
User
Posts: 56
Joined: Thu Sep 28, 2017 9:45 am

Re: Convert Files to PDF/A with Import & Export Converters

Post by DeKo »

Hello Alex,

give me some time to prepare the project. Meanwhile i tested converting with the end-user editor and then exporting the resulting pdf into pdf/a. Same result as with the ImportConverter, so the validation failed. I use this online tool.

You will hear from me soon.

Greetings,
Dennis
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Dennis,

So basically what I need to do, is convert for example an image to the pdf, then save it as PDF/A and then validate it with that tool? Or does it need to be some special file type?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
DeKo
User
Posts: 56
Joined: Thu Sep 28, 2017 9:45 am

Re: Convert Files to PDF/A with Import & Export Converters

Post by DeKo »

Hello Alex,

i just tried something out, seems like my informations weren't quiet on point, im sorry. I am testing with a docx file, apparently the "export to xps/pdf" from office word behaves differently than printing as a pdf. Using "Microsoft Print to PDF" results in the same behaviour as converting with end-user editor or the importconverter.

I've attached the document with the file i was testing with and added some results (hopefully the names of the files are self-explanatory :) ). I basically tried to validate the files with the suffix _exported (as they are the files i exported with the ExportConverter).

The end-user editor and the importconverter works the same, it seems. Should i still prepare a small project for you?

Greetings,
Dennis
Attachments
pdfa_test.zip
(682.55 KiB) Downloaded 104 times
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Dennis,

I don't think that we'll need a sample project, as this is more an overall problem, not just the SDK one. We'll investigate and I will reply here.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Dennis,

It seems that the acrobat fails the verification on both of your exported files.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Meanwhile, the acrobat does verify our file converted from word to the PDF/A-3b via the End-User Editor as successful. So I don't see any problem here, as the online verification tool's validation is not as great as acrobat's.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
DeKo
User
Posts: 56
Joined: Thu Sep 28, 2017 9:45 am

Re: Convert Files to PDF/A with Import & Export Converters

Post by DeKo »

Hello Alex,

thank you for your efforts! That already helps me a lot and good to hear that converting is working fine so far.

One more question about the ExportConverter, can you tell me what exactly it does? I mean, does it simply add a "pdf/a flag" or is there some extra logic that modifies the pdf?

Im sorry if this doesn't fit in here, but while we are at pdf/a's i thought i might drop that question.

Thanks again and greetings,
Dennis
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Dennis,

It's not only the tag - there are plenty of thing that should be modified to the chosen standard. For example, read this article:
https://en.wikipedia.org/wiki/PDF/A

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
DeKo
User
Posts: 56
Joined: Thu Sep 28, 2017 9:45 am

Re: Convert Files to PDF/A with Import & Export Converters

Post by DeKo »

Hello Alex,

yeah i know about that. My question was rather, does your exporter take that into account? I just want to make sure what to expect in long term, if we use that :)

Greetings,
Dennis
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Dennis,

Of course we do take that into an account - our PDF/A engine is rather big of a project.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
DeKo
User
Posts: 56
Joined: Thu Sep 28, 2017 9:45 am

Re: Convert Files to PDF/A with Import & Export Converters

Post by DeKo »

Hello Alex,

i didnt meant to make the question sound offensive. But thats great to hear, thank you! You really helped me there.

Greetings,
Dennis
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
Eymann
User
Posts: 16
Joined: Tue Nov 13, 2018 7:06 am
Location: Kreuzlingen
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Eymann »

Hello Deko and Hello Sasha

My mother tongue is German!
I hope my English is good enough to explain my problem here!

I have exactly the same problem as you!
If I convert a PDF over the PDF Tools into a PDF / A2-b there is an error message during the check!
I check the PDF's on the website https://www.pdf-online.com/osa/validate ... -validator

For testing I have the original scanned PDF without PDF A Standard "Original - Erlass Hafenbahnhof"
and "Adobe - Erlass Hafenbahnhof" this version was converted with Adobe Acrobat --> no error message. It complies with the PDF standard PDF / A2-b.
and "PDF Tools - Erlass Hafenbahnhof" this version was convertet with XChange PDF Tools in PDF/A Convert --> The PDF does not comply with the PDF / A2-b standard :-(

It is interesting when creating a new PDF via the PDF Standard Printer with the settings PDF / A-2b the verification of the conformity works without problems ???
But we need a searchable (with OCR) PDF / A-2b

Could you help us? Maybe with a bugfix ?
Attachments
PDF Tools - Erlass Hafenbahnhof.pdf
(295.56 KiB) Downloaded 106 times
Original - Erlass Hafenbahnhof.pdf
(1.47 MiB) Downloaded 106 times
Adobe - Erlass Hafenbahnhof.pdf
(159.22 KiB) Downloaded 94 times
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Eymann,

Does Acrobat validate the file, generated by our product correctly? If so, then I'm afraid that that is the problem of the online validation tool as I explained before.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
Eymann
User
Posts: 16
Joined: Tue Nov 13, 2018 7:06 am
Location: Kreuzlingen
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Eymann »

Hello Alex

Excuse me for my long message, but I just want to be sure that Xchange Pro has no bugs when converting to PDF A2-b.

Have both PDF with Adobe can check and in both it complies the PDF standard PDF A2-b! --> See Attachment "PDF konvertiert mit Adobe geprüft mit Adobe DC.png" + "PDF konvertiert mit Xchange geprüft mit Adobe DC.png"

If I do the validation over the on-line tools comes with the Adobe converted PDF the following message --> See Attachment "Prüfung Adobe auf 'www.pdfen.com.png'"

If I do the validation over the on-line tools comes with the Xchange "PDF-Tools" converted PDF the following message --> See Attachment "Prüfung PDF Tools auf 'www.pdfen.com.png"

It is also very interesting that the printed PDF via PDF-Xchange Standard does not generate any error messages on the two online validations! --> See Attachment "Prüfung PDF-XChange Standard auf 'http://www.pdfen.com.png"
Only we need the PDF A2-b searchable with OCR detection!!!

In the attachment I have the following PDF "Adobe - Erlass Hafenbahnhof" with Adbobe converted to A2-b and searchable. --> Validation with Adobe and Online Tools successfully
The PDF "PDF Tools PDF A2-b - Erlass Hafenbahnhof" with PDF-Tools converted to A2-b and searchable. --> Validation with Adobe successfully with Online Tools failed
The PDF "PDF-Xchange Standard - Erlass Hafenbahnhof" with PDF-XChange Standard printed to A2-b sadly without searchable. --> Validation with Adobe and Online Tools successfully
The PDF "Original - Erlass Hafenbahnhof" is the original scanned and unchanged PDF for testing.

Online Tools for validation: http://www.pdfen.com/pdf-a-validator
And
http://www.pdf-online.com/osa/validate.aspx

We have to submit the PDF's to the state and before I quarrel with those I want to be sure that the PDF complies with the ISO standard!

I would be glad if you could investigate my case!

thank you for your efforts

Cheers
Ueli
Attachments
PDF-Xchange Standard - Erlass Hafenbahnhof.pdf
(2.19 MiB) Downloaded 104 times
PDF Tools PDF A2-b - Erlass Hafenbahnhof.pdf
(306.88 KiB) Downloaded 102 times
Original - Erlass Hafenbahnhof.pdf
(1.47 MiB) Downloaded 99 times
Adobe - Erlass Hafenbahnhof.pdf
(159.22 KiB) Downloaded 94 times
Prüfung PDF-XChange Standard auf www.pdfen.com.png
Prüfung PDF Tools auf www.pdfen.com.png
Prüfung Adobe auf www.pdfen.com.png
PDF konvertiert mit Xchange geprüft mit Adobe DC.png
PDF konvertiert mit Adobe geprüft mit Adobe DC.png
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Eymann,

I've forwarded this to the appropriate developer - hopefully he will address this soon.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
Eymann
User
Posts: 16
Joined: Tue Nov 13, 2018 7:06 am
Location: Kreuzlingen
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Eymann »

Hello Sasha

Thank you very much for your efforts! I'm curious what the developers say...
I suspect that it is the meta-data....The XMP structure might not fit the online validation tool !?

I have informed our state that they should provide us with the verification mechanisms of this online tool...
Of course, they shy away from the effort and have said that it complies with the PDF-A standard.
But at first they said that it did not suit this one! These contradictory statements from the state are not always credible.

Thank you again for your efforts!

Cheers Ueli
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Ueli,

The developer who was investigating this told me that he fixed it. Here's a dev. build plugin file for you to try:
PDFAPlugin.zip
(839.53 KiB) Downloaded 92 times
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
Eymann
User
Posts: 16
Joined: Tue Nov 13, 2018 7:06 am
Location: Kreuzlingen
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Eymann »

Hello Alex

Thanks for that Plugin, just it does not work somehow if I overwrite the existing plugin on "C:\Program Files\Tracker Software\PDF Tools\Plugins.x64"
The following error message appears: See the attachment: "PDF-Tools_Problem Action.png"
A problem with the action was detected...? I should fix it or reinstall it...?
The setting can not be opened ...
Did I do something wrong? Have made a backup of the existing "PDFA Plugin.pvp" and then overwritten with the new ...

Also attached our version of PDF tools:"PDF-Tools_Version.png"

Cheers Ueli
Attachments
PDF-Tools_Problem Action.png
PDF-Tools_Version.png
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Eymann,

That's because that is a x86 plugin. Attaching a x64 one:
PDFAPlugin.zip
(1.09 MiB) Downloaded 89 times
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
Eymann
User
Posts: 16
Joined: Tue Nov 13, 2018 7:06 am
Location: Kreuzlingen
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Eymann »

Hello Sasha

It works great. :)
Thanks so much for help!
.
.
.

I do not know if this topic belongs here ...
But just now, an employee has found a new problem in PDF Tools ... :(
If you have a scanned PDF document that contains partially rotated pages, optimized and converted to PDF A standard.

Have in the attachment the original PDF and the optimized PDF with a total of 11 pages of which are a few pages portrait and a few pages landscape format.
After optimizing and converting to PDF A2-b, the pages are as cropped --> This is probably a mistake that nobody has noticed ???
Maybe something for the development department ...?

The problem is somewhere in the Tool "Enhance Scanned Pages"

Attached you will see a print screen with the setting how we work!

Optimized "PDF Tools-2018-0103 Einsprache Jost Rüegg.pdf" and original PDF "Original-2018-0103 Einsprache Jost Rüegg.pdf" you will find attached!

Cheers Ueli
Attachments
Enhance Scanned Pages-Settings.png
PDF Tools-2018-0103 Einsprache Jost Rüegg.pdf
(1.83 MiB) Downloaded 90 times
Original-2018-0103 Einsprache Jost Rüegg.pdf
(4.52 MiB) Downloaded 86 times
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Ueli,

Does this problem with enhanced pages occur in the End-User Editor?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
Eymann
User
Posts: 16
Joined: Tue Nov 13, 2018 7:06 am
Location: Kreuzlingen
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Eymann »

Hello Alex

Yes, as above in the printscreen in my post by Thursday 22.11.2018 it is a End-User Editor (Version 7.0 Build 327.1) not in SDK Version.
The problem is in the end-user editor...We do not have an SDK version!

Cheers Ueli
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

Hello Ueli,

Then please post your problem in the correct forum (End User Editor for example: viewforum.php?f=62) with detailed steps to recreate this problem and there we will assist you further. Do not post the End-User problems in the SDK thread.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
Eymann
User
Posts: 16
Joined: Tue Nov 13, 2018 7:06 am
Location: Kreuzlingen
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Eymann »

Hello Alex

Thank you...
I will post it now in the right forum.

Cheers Ueli
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Convert Files to PDF/A with Import & Export Converters

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply