Entire book in one page, when saved as PDF, crops code that has horizontal scrollbar
Closed this issue · 2 comments
I saved the book as PDF so that I can underline or highlight
A few code snippets in part II have horizontal scroll bar
These code blocks are cropped when printed to pdf
the part of the line that goes beyond right edge is not printed.
Hi @metaforte sorry about that, but not much we can do about it at this point.
Not savvy with AsciiDoc, but using asciidoctor-pdf
(to convert ADOC files to PDF) and pdftk
(to concatenate individual PDF files) solved this issue for me:
-
Clone this repo and get into the
book
directorygit clone https://github.com/bigskysoftware/hypermedia-systems.git cd hypermedia-systems/book
-
Copy the contents of the
images
directory intobook
cp -r ../images/* .
-
Install
asciidoctor-pdf
andpdftk
(The easiest way to do this is with Nix:
nix-shell -p asciidoctor-with-extensions pdftk
) -
Convert ADOC files to PDF
asciidoctor-pdf --verbose --section-numbers *adoc
-
Concatenate the resulting PDF files in the right order
pdftk COPYRIGHT-ACKNOWLEDGMENTS.pdf DEDICATION.pdf Foreword.pdf CH*pdf cat output hypermedia_systems.pdf
The result (hypermedia_systems.pdf) looks a bit rough, but each code section is intact and there is a Table of Contents too. (Sort of; couldn't figure out how to number the chapters, and only the sub-sections are numbered...)