Lawrence D'Oliveiro wrote:
> On Wed, 11 Nov 2026 16:19:42 +0100, John Bokma wrote: >
>> I use Markdown + Pandoc
> > Great combination. I added the ability to format a text field as > Markdown via Pandoc to a project for a client recently. Only trouble > was, when the browser shows the PDF version, it insists on displaying > a list of thumbnails down the side, because that's what the settings > in the PDF file say to do. > > Turning this off involved massaging the generated PDF data with > PikePDF. But the project was in PHP (no, I didn't start it, I just > took it over), and I couldn't find any PHP binding for PikePDF. So I > wrote a little Python script to do the postprocessing (and the > Markdown rendering, while it was at it). > > Yes, it was an excuse to introduce some Python code into a > predominantly-PHP project
Thanks, John and Lawrence! I think I finally managed to translate what you two are talking about into something the rest of us mere mortals can understand. If I have this right, the idea is to keep the original document in an editable, text-based format (Markdown, for example) and then to use Pandoc to convert it into a PDF and then to use PikePDF to tweak the resulting PDF's internal settings when needed. In Lawrence's case, the problem wasn't actually the PDF content, but how the browser displayed it when his PDF was configured to open with a thumbnail sidebar. He used PikePDF to modify that setting, and since the main project was written in PHP, he wrote a small Python script to handle both the Markdown conversion and the PDF post-processing. So, in short, you're suggesting to keep an editable source, generate the PDF when needed and use a little Python magic to adjust the finished PDF. This is useful practical insight that those of us trying to figure out how to generate (and, ideally, work with) PDFs on the fly can appreciate.
-- Usenet is an assemblage of purposefully helpful people teaching each other .