first of all I read the documentation here Creating a ZUGFeRD pdf to have a Zugferd PDF/A-3 pdf compliant :
- Created a custom .ps you can check it here PDFA_def.ps as mentioned in Zugferd documentation and used this color profile sRGB.icc.
- I wanted to convert this pdf invoice (sample) RE.__2021_0002.pdf to PDF/A-3 compliant
- In order to convert this sample invoice to Zugferd PDF/A-3 compliant i used this command from ghostscript
gs -dBATCH -dNOSAFER --permit-file-read=${PWD} -sDEVICE=pdfwrite -dPDFA=3 -sColorConversionStrategy=RGB -sPDFACompatibilityPolicy=1 -sZUGFeRDXMLFile=${PWD}/factur-x.xml -sOutputICCProfile=${PWD}/sRGB.icc -sOutputFile=${PWD}/RE.__2021_0002_pdf3a.pdf ${PWD}/PDFA_def.ps ${PWD}/RE.__2021_0002.pdf
- I used veraPDF to check if the resulting pdf file is PDF/A-3 compliant but it showed that it's not PDF/A-3 compliant
Then I used facturx library in python to generate RE.__2021_0002_factur-x_embedded.pdf invoice containing factur-x.xml embedded inside then i used this command from ghostscript to convert it to PDF/A-3 compliant gs -dPDFA=3 -dBATCH -dNOPAUSE -dNOOUTERSAVE -dUseCIEColor -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -sPDFACompatibilityPolicy=1 -sOutputFile=RE.__2021_0002_factur-x_embedded_pdf3a.pdf RE.__2021_0002_factur-x_embedded.pdf
But unfortunately, the resulting pdf is not PDF/A-3 compliant and it also lost the embedded factur-x.xml after this command.
I checked most of the questions here in StackOverflow regarding this topic, for example here, and tried the commands and read the comments but it didn't work too.
Update: The resulting pdf is not compatible with neither PDF/A-3a nor PDF/A-3b.
I need to know how to properly make the pdf invoice PDF/A-3 compliant?
Thanks.