docfx icon indicating copy to clipboard operation
docfx copied to clipboard

TOC superimposed on PDF output [Bug]

Open AndyEdmonds opened this issue 2 years ago • 4 comments

Describe the bug The output generated contains the table of contents data superimposed on each page.

To Reproduce Steps to reproduce the behavior:

  1. ...
  2. ...

Expected behavior Table of contents occurs once at start of doc. Context (please complete the following information):

  • OS: Windows 11
  • Docfx version: 2.75.1

Additional context Add any other context about the problem here. docfx.json badPdf

AndyEdmonds avatar Jan 25 '24 12:01 AndyEdmonds

What template are you using? Seems like a template problem. Did you see the same PDF output if you visit and print the HTML page as PDF?

yufeih avatar Jan 27 '24 12:01 yufeih

I Hadn't specified a template. my docfx.json is uploaded. If I specify the modern template then the problem goes. Still a bug, though.

AndyEdmonds avatar Jan 27 '24 14:01 AndyEdmonds

I have the same issue! If I want to build the pdf of my generated website with the default template then I get this superimposed pdf documentation (current toc superimposed with content)! I changed the template section in my docfx.json file to default and modern then the pdf generation works as expected!

wrong pdf generation with docfx.json like: "template": [ "default", ],

right pdf generation with docfx.json like: "template": [ "default", "modern" ],

is there a fix in the next time?

oki-evon avatar Feb 29 '24 09:02 oki-evon

Hey, I just ran into this issue while migrating away from wkhtmltopdf (now archived and unmaintained). I tried multiple combinations of DocFX versions and configurations— including the “modern” template mentioned here—up to the latest release. The only setup that consistently works for me is DocFX 2.74 with wkhtmltopdf 0.12.5, running on Debian Bookworm with the .NET SDK.

Sorry for reviving an old report, but I see several mentions of scrambled output without clear follow-up. Is there any new information, workaround, or recommended replacement path?

abregar avatar Sep 22 '25 13:09 abregar