bpampuch / pdfmake

Client/server side PDF printing in pure JavaScript
http://pdfmake.org
Other
11.7k stars 2.04k forks source link

PDF Bookmarks / Outlines #427

Open seansimonanimation opened 9 years ago

seansimonanimation commented 9 years ago

Hi,

First off, gotta say. Once you wrap your head around the document structure, pdfmake is very, very easy to use. I'm currently using it in a project that dynamically generates PDF documents on the fly and it's working great.

I didn't see PDF bookmarks on the feature list anywhere. I was wondering if it would it be possible to include some sort of way to do a few things:

a) include some sort of bookmark feature where the end user can pick where they want to go in the document. b) a way to make a hyperlink to that part of the article by using either clicking text or an image. c) be able to dynamically determine what page a particular bookmark is on and bake that into the document text so that when the document is printed, it reads "go to page 6 for this" (via js or some internal markup)

I know its a lot to ask, and I'd be willing to help out if needed.

Thanks!

holly-weisser commented 7 years ago

+1

henrique2601 commented 6 years ago

It have the linkToPage parameter, but I looking for anything more like a anchor, my PDF is dinamyc so I dont know the page number to link the user.

MAXMASTER001 commented 6 years ago

+1

filippomuscolino commented 5 years ago

+1

ionutss commented 5 years ago

+1

arpitaashu commented 5 years ago

Yes this feature is very much required...

Anand-Paul commented 4 years ago

Is this feature implemented ?

pierre-H commented 2 years ago

up 😃

ProfessionProgrammer commented 2 years ago

+1

octavian-mirica commented 2 years ago

+1

maertz commented 1 year ago

+1

Dev-MarkoF commented 1 year ago

+1, looked into implementing it myself, since it's already possible in the underlying PDFmake, but i could not wrap my head around how pdfmake does ist. I would love to have it working with the "ID" system. Maybe as an option to a element where you add a attribute addToOutline : "Test". Which add it to the outline of the pdfkit.document with the title given to the attribute.

PDFmake does in the end create a pdfkit document, you can already add to the outline of this document, after the creation. But i only found a way to add a outline entry at the end of the document, and at this stage i have no references to the entries i would like to have in the outline.

BitInByte commented 1 year ago

Hello guys, any new about the ability to create bookmarks? Is this repository still maintained and will this feature be addressed in the future?

Thanks for the amazing work you have done with this library which really simplifies the process of generating pdf :)

WindRunnerMax commented 7 months ago

I solved the problem with bookmarks/outlines through pdfmake and pdf-lib. The PDF generated by this example works properly in Chrome browser.