docfx: PDF header signature not found (Error happen when conversion toc.json to Pdf)

Operation System: Windos 10

DocFX Version Used: 2.43.2 Template used: default

Steps to Reproduce:

  1. Take artifacts from documentation
  2. Run DocFX
  3. Error:[PdfCommand.PDF]Error happen when converting pdf/toc.json to Pdf. Details: System.AggregateException: Mindestens ein Fehler ist aufgetreten. —> iTextSharp.text.exceptions.InvalidPdfException: PDF header signature not found.

Expected Behavior: No error

Actual Behavior: Error

I’ve tried to add PDF generation wo one of my own docFX repos, but the build failed with the error above. After that I downloaded the artifacts mentioned above, yet no avail: The build still fails, even with the standard documentation.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 17 (10 by maintainers)

Most upvoted comments

Thank you, @alexrp.

I was able to reproduce the issue using your repo.

I was able to “work-around” the issue by specifying "noStdin": true in docfx.json as follows:

{
    ...
    "pdf": {
        ...
        "noStdin": true,
        ...
    }
}

Example commit: https://github.com/icnocop/flare-lang.github.io/commit/d34621a4720ccda53c153a1232956a815ad590be

Example build: https://github.com/icnocop/flare-lang.github.io/runs/1372135172

For reference, see: https://github.com/dotnet/docfx/issues/4488

I’m unable to spend any more time on this as per my employer, please close the issue.