Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table of contents links in PDFs point to HTML files instead of the proper place within the document #22

Open
DavidGriffith opened this issue Nov 17, 2024 · 4 comments

Comments

@DavidGriffith
Copy link

Links in the table of contents in a PDF file are typically expected to point at the relevant sections within that file. Instead the links point to the equivalent place in the HTML files generated.

@erkyrath
Copy link
Member

I can't reproduce this. When I visit https://eblong.com/zarf/glk/Glk-Spec-075.pdf (or a fresh-built version in the repo), the table-of-contents links work correctly, within the PDF.

@DavidGriffith
Copy link
Author

Here's that file that I built from the current main:

https://www.dropbox.com/scl/fi/irezffp2msh0nsp2db5ev/Glk-Spec.pdf?rlkey=pkj4uleel1beihrzlxlzyjint&dl=0

Also, why would my file be 105 megabytes when yours is only 475K?

@DavidGriffith
Copy link
Author

It looks like something weird is going on with wkhtmltopdf on Debian and Devuan to cause these two problems. Is there any reason why htmldoc cannot be used to create the PDF files?

@erkyrath
Copy link
Member

Is there any reason why htmldoc cannot be used to create the PDF files?

I don't know, is there?

I tested htmldoc on Mac and the results had pretty bad font spacing:

snap

This was with the command

htmldoc --webpage --charset utf-8 --bodyfont Times --fontspacing 1.2 --embedfonts --outfile test.pdf dist/Babel-Treaty.html

On the other hand, wkhtmltopdf drew the <h1> line in white instead of black, so I dunno what the best option is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants