Putting a PDF cover and TOC in the right order #10102
Unanswered
scott-ainsworth
asked this question in
Q&A
Replies: 3 comments
-
The pdfCoverPage property should do the trick, see this example. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@yufeih: Unfortunately, while |
Beta Was this translation helpful? Give feedback.
0 replies
-
I found a workaround. after running docfx build, A short script
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been trying to build a PDF, but cannot find a way to put the cover page and table of contents (TOC) in the right order, that is: cover, TOC, ...
This challenge stems from that fact that the cover page needs to be available on the generated web site and also included as the first item in the
toc.yml
file. For example:Things I have tried:
Generating the PDF with
pdfTocPage: true
, yields this page order: TOC, Cover, Chapter 1, which places cover and TOC are out of order.Generating the PDF with
pdfTocPage: true
andpdfCoverPage: cover.html
, yields this page order: Cover, TOC, Cover, Chapter 1, duplicating Cover.Using CSS to hide the second cover page is possible, but yields an undesired blank page.
Finally, removing the cover from the generated
toc.json
file produces the desired page order: Cover, TOC, Chapter 1.Questions:
What other solutions have you used to order PDF pages?
Is it worth considering an extension to the Docfx schema that allows items to be tagged for a particular purpose? For example:
Of course, #2 and #3 will impact
toc.json
. Either the consuming code will need to be modified for the changes, or a second, pdf-specific equivalent (pdf.json
?) would be required.Edits: correct grammar and typos
Beta Was this translation helpful? Give feedback.
All reactions