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

#80 Fix and sample multihtmldoc pdf #222

Merged

Conversation

rototor
Copy link
Contributor

@rototor rototor commented May 22, 2018

This is a sample testdriver how to use multiple HTML documents for one PDF. I also fixed a bug with bookmarks related to multiple HTML documents in one PDF.

The bookmark-markup is very special and esoteric (i.e. non-standard). But at least it works now again. No idea if we should let it be as it is, or come up with something more standard... Also requiring the bookmarks in the header is rather difficult if you only know the content at the end of the document...

Should PdfBoxRenderer::createPDFWithoutClosing() stay public, or should we try to hide it with the builder? i.e. as a builder option? This would also help the user discovering this feature.

@danfickle
Copy link
Owner

Thanks @rototor

There is another example in #214
I suspect the page counter support with multiple documents has rotted however.

In regard to the bookmark mechanism, I did implement a standard based mechanism(based on a css property that would specify the bookmark level of an element) in neoflyingsaucer, so perhaps I could find that and incorporate it here.

createPDFWithoutClosing should be deprecated in favour of a builder method as you suggest.

@danfickle danfickle merged commit 4c21b8e into danfickle:open-dev-v1 May 23, 2018
@kingds
Copy link

kingds commented Sep 13, 2018

Hi @rototor @danfickle
Could you give some pointers on how to use bookmarks to link between multiple HTML files in the same PDF?
I'm currently able to build a PDF using the method described by @danfickle here: #214
But I'm lost as to how I can create links between the different pages.

Thanks

@danfickle
Copy link
Owner

Hi @kingds,

I don’t think it is possible. Generally it is better to combine the HTML in one file so fonts are subset only once, reused images embedded only once, etc. Could you outline your use case for why you need to do it in multiple runs?

@kingds
Copy link

kingds commented Sep 20, 2018

Okay thanks, I managed to get it working by combining all the HTML files into one document.

The goal is to compile a JavaHelp helpset (bunch of HTML files) into a single PDF, based on the map file for the helpset.

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

Successfully merging this pull request may close these issues.

3 participants