docfx: docfx pdf does not generate api docs

Operating System: (Windows or Linux or MacOS) Windows 10 DocFX Version Used: 2.59.3.0

Template used: (default or statictoc or contain custom template) Default Steps to Reproduce:

  1. Setup api docs metadata as defined in https://dotnet.github.io/docfx/tutorial/walkthrough/walkthrough_create_a_docfx_project_2.html
  2. Run docfx pdf docfx.json

Expected Behavior:

Pdf should generate without error.

Actual Behavior:

I get an error saying api\toc.yml does not exist and the pdf contains no api documentation.

Running docfx build docfx.json generates the api docs.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (2 by maintainers)

Most upvoted comments

I had the similar issue with docfx 2.59.4.0 when running docxf from GitHub Actions.

I’ve added the following flags to docfx.json and the problem is gone:

  • the -q flag to wkhtmltopdf arguments
    "wkhtmltopdf": {
      "additionalArguments": "-q --enable-local-file-access"
    },
  • the "noStdin": true option