Tinderbox Forum

aTbRef v9.2.1 uploaded, with extra PDF goodness

Tinderbox aTbRef updated for v9.2.1 at https://atbref.com. Now with PDF version too!

1 Like

Ugh, error in my porting of the PDF-creation code (rushing for yesterday’s meet-up) means this in-doc links—other than the ToC—don’t work. I’ll get a fix for that and post back here later today when I get back to my desk.


Not how I expected to spent Easter Sunday, but the fixes turned into a a rather wider fix.I’ve now created two (annotated) export notes, one for each of the two solutions below. Firstly, the ‘old’ method, which I first developed back for Tinderbox v4.x…

Page numbers and wkhtmltopdf

Sadly, due to licence changes (actually charging for what was free), development of wkhtmtopdf was abandoned in 2020. Although the last version—v0.12.—runs on my M1 Mac under OS 12.x, changes to libraries it depends on mean that randomly, it doesn’t load images. I get lox runs of errors like:

Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/7-05-00_list_KA-context.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/6-02-00_list_Attribute-Values.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/8-08-00_list_Fills.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/7-05-00_list_Find-Context.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/8-00-00_Hyperbolic-context.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/6-02-00_menu_Layout.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/6-02-00_list_Line-Spacing.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/6-02-00_list_Link-Types.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/6-02-00_list_Para-Spacing.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/6-02-00_list_Pattern-Plain.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/6-02-00_list_Prototypes.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/6-06-02_list_Shape.png (ignore)
Warning: Failed to load file:///Users/xxxx/Documents/TBX/atbref9/images/6-02-00_menu_Share.png (ignore)

The images are there and are not malformed. It looks like a newer releases of libpng create issues but there’s no support and I’m not able (even if only in skill terms) to maintain a specifically out of date Mac & OS just to make this work. So I think it is the end of the road for that approach. With it go auto-generated PDF bookmarks for headings and page numbering. However, the TBX updated today does include instructions for making the inputs for wkhtmltopdf use, so others are welcome to explore that part of the problem. The export note for this method is the root note “print-export-wk-source”.

Tinderbox ToC approach

Given the above, I’m glad I spend some time a month or so back figuring out a method not reliant on the above tool. Instructions are again given in the TBX and export is generated via root note “print-export-source”.

On a general level - affecting (fixing!) content in both the above I’ve spent a lot of time today tracking down and fixing runaway styling (unclosed tags!) in the content. The normal export hides this as at worst the style over-run is to the end of the note (HTML page). At the same time, I’ve improved the CSS for headings and image placement which has pruned c.60 pages of the PDF page counts for no loss of content. The listings are large, but then there are c.2.5k pages and deciding which do/don’t use their existing child listings is simply too much effort at this point. Be aware, the aTbRef document was never written with an eye to similar content nesting at similar levels at is was intended for website generation. Using the website (or the TBX) are still the primary affordances. The export to PDF is more of an experiment in what’s possible.

Page numbers? If you export via the second method there is noting to stop any user experimenting with various Javascript libraries that purport to add numbering. But for now, I’m treading that as out of scope for aTbRef to shoulder as a task. If the community finds a robust solution and which can be _easily_explained to/implemented by non-tech users then I’m happy to adopt it (with attribution).

So the PDF, using the latter method above, is now at https://www.acrobatfaq.com/atbref9/A%20Tinderbox%20Reference%20File%20v9-2-1.pdf and I’ve also updated the TBX file with all today’s fixes, for more tech-adventurous folk to explore.

I hope that in fixing the above I haven’t broken anything new. But, if I have, do please report that! :slight_smile:


Thank you for the PDF, @mwra – useful for personal annotation and other things.

Users of DEVONthink 3 Pro can use the Imprinter feature to add page numbers to PDFs with minimal setup. For example, I used this simple imprinter in DEVONthink and added page numbers to Mark’s entire document in about 30 seconds:


Ooh, interesting—thanks. It makes me wonder if DEVONthink might also be able to do some (PDF) bookmarking too. The frustrating part of wkhtmltopdf’s slow demise is access quick accurate bookmarking (and even better, PDF destinations)

I think given the size and number of potential internal links in the aTbRef PDF, that bookmarking it in DEVONthink, while possible, would entail a very large amount of very manual work.