0

I have a docfx website that I have developed locally. I have added a pdf object in my docfx.json file in order to give a link for downloading the pdf of the website. I am using wkhtmltopdf for the same. It works fine locally and creates the pdf files, but when I use Azure DevOps build pipeline, the pipeline agent throws the following error:

[20-07-24 03:41:21.067]Error:[PDF]Error happen when converting {filename}.json to Pdf. Details: iTextSharp.text.exceptions.InvalidPdfException: PDF header signature not found.

my docfx pdf build looks like this:

"pdf": {
    "name": "ais",
    "content": [
      {
        "files": [
          "index.md",
          "toc.yml"
        ]
      },
      {
        "files": [
          "Cloud Readiness/**.md",
          "Cloud Readiness/toc.yml",
          "Migrate/**.md",
          "Migrate/toc.yml",
          "Workload Landing Zone/**.md",
          "Workload Landing Zone/toc.yml",
          "Plan/**.md",
          "Plan/toc.yml",
          "Strategy/**.md",
          "Strategy/toc.yml",
          "Backlog/toc.yml",
          "Backlog/**.md"
        ],
        "src": ".."
      }
    ],
    "resource": [
      {
        "files": [
          "Cloud Readiness/**.png",
          "Cloud Readiness/**.jpg",
          "Migrate/**.png",
          "Migrate/**.jpg",
          "Workload Landing Zone/**.png",
          "Workload Landing Zone/**.jpg",
          "images/**.png",
          "Plan/**.png",
          "Plan/**.jpg",
          "Strategy/**.png",
          "Strategy/**.jpg",
          "Strategy/**.pptx"
        ],
        "src": ".."
      }
    ],
    
    "dest": "_site/static/files",
    "outline": "NoOutline",
    
    "noStdin": true,
    "keepRawFiles": true
  }

My Azure DevOps Build task config looks like this: enter image description here

Any idea how to solve this?

0 Answers0