Re: [SOLVED] Re: Creating PDF/A from LaTeX source and from existing PDF

2024-07-10 Thread Max Nikulin

On 10/07/2024 15:37, Ceppo wrote:

but I couldn't build a working gs command.

[...]

[1]: https://github.com/qpdf/qpdf/issues/85


There is a link to gs arguments





[SOLVED] Re: Creating PDF/A from LaTeX source and from existing PDF

2024-07-10 Thread Ceppo
On Mon, Jul 08, 2024 at 05:20:57PM GMT, Jeffrey Walton wrote:
> The pdf-linter I use to verify a pdf document is qpdf,
> . It is available on most distributions,
> including Debian, Fedora and Red Hat.
>
> The command to check the document is `qpdf --check `.

This command doesn't show me any info abouy PDF/A compliance. man says it
"merely checks that the PDF file is syntactically valid".

> > I will also probably have to upload under the same requirement some
> > third-party PDF, which is not PDF/A, without access to an editable version.
> > Is there a way to convert them to PDF/A? I know that converting from an
> > editable version would be the correct way for this, but I have no real way
> > to get it.
>
> qpdf may provide this functionality, but I have never used it.

[1] says PDF/A conversion is out of scope for the library. However, [2] pointed
me to ocrmypdf and this command produces a valid PDF/A-1b file:

ocrmypdf --output-type pdfa-1 --tesseract-timeout=0 --skip-text \
input.pdf output.pdf

Another comment pointed out this relies on ghostscript, but I couldn't build a
working gs command. I will try harder as soon as I have some free time. Anyway
I have my conversion tool now, and I'm happy with it.

As a short summary of this thread outcome, I can:

- compile with `pdflatex` as usual
- convert to PDF/A with the `ocrmypdf` command above (probably not the most
  clean way, but it works)
- validate with veraPDF

Thanks everyone for your help, it was higly appreciated even when it didn't
work as expected!


[1]: https://github.com/qpdf/qpdf/issues/85
[2]: https://github.com/qpdf/qpdf/issues/85#issuecomment-1278055568


--
Ceppo


signature.asc
Description: PGP signature