Can Asciidoctor-pdf suppress creation of the text layer?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
kev
Reply | Threaded
Open this post in threaded view
|

Can Asciidoctor-pdf suppress creation of the text layer?

kev
Often also called the "ocr layer", I want to generate PDFs where the text cannot be casually selected. The text is stored in a separate layer than I want to prevent from being generated.
Reply | Threaded
Open this post in threaded view
|

Re: Can Asciidoctor-pdf suppress creation of the text layer?

mojavelinux
Administrator
No, that's not something Asciidoctor PDF can do. I answered this question here: https://github.com/asciidoctor/asciidoctor-pdf/issues/946

As I explained in that issue, you can rasterize the document (which is what that's called) using Ghostscript:

 $ gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dNoOutputFonts -r300 -o output.pdf input.pdf

You also have the option of using ImageMagick directly, though it produces a much larger output file:

 $ convert -density 300 input.pdf output.pdf

I have added this information to the documentation: https://github.com/asciidoctor/asciidoctor-pdf#rasterizing-the-pdf I may add this as an option for the optimizer in the future.

Best Regards,

-Dan