Enable toc and cover options #158

Closed
wants to merge 3 commits into
from

Projects

None yet

5 participants

@tim-vandecasteele

Don't prefix them with --, and allow metatags without content.

Moved --quiet to first command, otherwise it conflicted with the toc option when setting it.

Sadly the order in which you set the meta tags is important when using toc, because wkhtmltopdf needs the toc options to be grouped, and after the toc tag.

tim-vandecasteele added some commits Dec 1, 2012
@tim-vandecasteele tim-vandecasteele toc and cover options are special cases.
Don't prefix them with --, and allow metatags without content.

Moved --quiet to first command, otherwise it conflicted with the toc option when setting it. Sadly the order in which you set the meta tags is important when using toc, because wkhtmltopdf needs the toc options to be grouped, and after the toc tag.
90f1433
@tim-vandecasteele tim-vandecasteele Take 1.8.7 hash behaviour into account for the spec. aecaed6
@tim-vandecasteele tim-vandecasteele Put the options in proper order.
'global options' 'cover' 'toc options' 'page options'.

This does have a disadvantage: you cannot specify specific page options for toc or cover, and you can't put a cover in the middle of a pdf.

For example, if you'd like to add a page-number to your TOC with a footer, that's currently not possible, because footer is a page option. This could be fixed by parsing the content of the 'toc' parameter, and translate that into other options.
0ff7839
@devn
Member
devn commented on 0ff7839 Feb 22, 2013

Thanks for the commit. I will take a closer look within the next few days -- currently trying to catch up on open PRs and issues.

@jwang
jwang commented Jul 10, 2014

Is there an update on this? Seems like a basic thing to add that can be supported. Also, should likely rebase since the original PR has been well over a year ago.

@sigmavirus24
Member

I am the new maintainer of pdfkit and would happily consider this for inclusion. Thanks for the ping @jwang

@sigmavirus24
Member

@tim-vandecasteele would you be willing to rebase these changes so they can be merged cleanly?

@rojotek
rojotek commented Sep 15, 2014

let me try another ping :) -- I'd love to see this merged in.

@tim-vandecasteele

I stopped using pdfkit, so I don't have this change rebased, sorry.

@sigmavirus24
Member

@rojotek would you like to take this over? Ideally all you would need to do is rebase @tim-vandecasteele's commits onto master, but there may be other changes necessary after that. If you're not interested, I can put this on my list for this weekend or next.

@rojotek
rojotek commented Sep 16, 2014

ok -- grabbing this now -- will create a new PR with the rebased version shortly.

@sigmavirus24
Member

Closing in preference of #255

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment