pdfmake icon indicating copy to clipboard operation
pdfmake copied to clipboard

PDF Bookmarks / Outlines

Open seansimonanimation opened this issue 10 years ago • 14 comments

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!

seansimonanimation avatar Oct 27 '15 02:10 seansimonanimation

+1

holly-weisser avatar May 04 '17 13:05 holly-weisser

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.

henrique2601 avatar Nov 22 '17 20:11 henrique2601

+1

MAXMASTER001 avatar Jul 09 '18 17:07 MAXMASTER001

+1

filippomuscolino avatar Jan 17 '19 10:01 filippomuscolino

+1

ionutss avatar Jan 28 '19 13:01 ionutss

Yes this feature is very much required...

arpitaashu avatar Mar 25 '19 09:03 arpitaashu

Is this feature implemented ?

Anand-Paul avatar Jul 30 '20 14:07 Anand-Paul

up 😃

pierre-H avatar Mar 03 '22 10:03 pierre-H

+1

ProfessionProgrammer avatar Oct 12 '22 10:10 ProfessionProgrammer

+1

octavian-mirica avatar Oct 27 '22 14:10 octavian-mirica

+1

maertz avatar Nov 16 '22 16:11 maertz

+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.

Dev-MarkoF avatar Feb 14 '23 09:02 Dev-MarkoF

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 :)

BitInByte avatar Nov 06 '23 12:11 BitInByte

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

WindRunnerMax avatar Mar 19 '24 16:03 WindRunnerMax