WeasyPrint icon indicating copy to clipboard operation
WeasyPrint copied to clipboard

Automatically set required options to get valid PDF/A documents

Open zopyx opened this issue 2 years ago • 5 comments

https://github.com/zopyx/print-css-rocks/tree/master/lessons/lesson-archive-pdf

does not validate against latest VeraPDF

Bildschirmfoto 2022-06-17 um 18 11 27

zopyx avatar Jun 17 '22 16:06 zopyx

Hello @zopyx.

This first version supporting PDF/A is experimental, as explained in the warning message. For the moment, using the pdf/a-3b option doesn’t check all the rules required to get a valid document and users have the responsibility to check that they follow the rules listed by the related specifications, as explained in the documentation.

In your case, you have to:

  • set a PDF identifier (using the --pdf-identifier CLI option),
  • prevent interpolation on images (using html { image-rendering: crisp-edges }).

In the future, we may include many checks to automatically set these options or to warn users when there’s something wrong in the rendered document.

For the final 56 version, do you think that we should change the warning message to explain that?

liZe avatar Jun 17 '22 19:06 liZe

I just wanted to bring this issue to your attention. I am aware that this is a beta. Setting html { image-rendering: crisp-edges } should happen automatically. As a user, I want to generate a specific PDF variant without touching my CSS (same behavior as for all other tools).

zopyx avatar Jun 18 '22 05:06 zopyx

I just wanted to bring this issue to your attention. I am aware that this is a beta.

👍

Setting html { image-rendering: crisp-edges } should happen automatically. As a user, I want to generate a specific PDF variant without touching my CSS (same behavior as for all other tools).

That would be the best solution, of course.

liZe avatar Jun 18 '22 07:06 liZe

Just a question out of curiosity: Did this https://github.com/Kozea/WeasyPrint/pull/1869 fix this issue here? ^^

dedalusMohantyMa avatar Apr 15 '24 11:04 dedalusMohantyMa