Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF Generation #10267

Open
frohlichcortezh opened this issue Oct 15, 2024 · 3 comments
Open

PDF Generation #10267

frohlichcortezh opened this issue Oct 15, 2024 · 3 comments
Labels
bug A bug to fix template The stock site template

Comments

@frohlichcortezh
Copy link

Describe the bug
PDF generate isn't located where I believe it'd be after following the documentation.

I might have misunderstood something, so I hope somebody could help.

To Reproduce

Here's my docfx.json
{
  "metadata": [
    {
      "src": [
        {
          "files": ["**/*.csproj"],
          "exclude": ["**/bin/**", "**/obj/**"],
          "src": "../"
        }
      ],
      "dest": "api"
    }
  ],
  "pdf": {
    "content": [
      {
        "files": [
          "articles/**.yml"
        ],
        "exclude": [
          "api/**",
          "**/bin/**",
          "**/obj/**",
          "_site_pdf/**",
          "**/toc.yml",
          "**/toc.md"
        ]
      }
    ],
    "resource": [
      {
        "files": [ "articles/images/**"]
      }
    ],
    "overwrite": "specs/*.md",
    "dest": "_site-pdf"
  },
  "build": {
    "content": [
      {
        "files": [
          "index.md",
          "articles/**/*.md",
          "articles/**/*.yml"
        ],
        "exclude": [
          "_site/**",
          "**.*.pdf"
        ]
      },
      {
        "files": [
          "api/**/*.md",
          "api/**/*.yml"
        ]
      }
    ],
    "resource": [
      {
        "files": [
          "articles/images/**"
        ]
      }
    ],
    "output": "_site",
    "template": [
      "default",
      "modern"
    ],
    "globalMetadata": {
      "_appName": "BKS.Gmud",
      "_appTitle": "Gmud",
      "_enableSearch": true,
      "homepage": "index.md",
      "pdf": true,
      "pdfTocPage": true,
      "pdfFileName": "Manual-GMUD.pdf"
    },
    "postProcessors": ["ExtractSearchIndex"]
  }
}

Expected behavior
After running docfx pdf````, I though a folder _site-pdf```` would have been generated.

Screenshots

Image

It was generated under _site/articles/
Image

Context (please complete the following information):

  • Docfx version: 2.77.0+bd00e2b93951e9e7fa6e5abd990d2cd77d7a83bd
@frohlichcortezh frohlichcortezh added bug A bug to fix template The stock site template labels Oct 15, 2024
@filzrev
Copy link
Contributor

filzrev commented Oct 15, 2024

I though a folder `_site-pdf`` would have been generated.

pdf config sections are not supported on latest version (v2.77.0).
(These config section is used before v2.75.0 that using wkhtmltopdf to generate PDFs)

@frohlichcortezh
Copy link
Author

frohlichcortezh commented Oct 15, 2024

I though a folder `_site-pdf`` would have been generated.

pdf config sections are not supported on latest version (v2.77.0). (These config section is used before v2.75.0 that using wkhtmltopdf to generate PDFs)

Thank you for the quick reply. Do you suggest downgrading ? Any tips on how I could set it up on v2.77 ?

@filzrev
Copy link
Contributor

filzrev commented Oct 16, 2024

Currently no options available for generating PDFs and outputs PDF files only.
It though, it need to manually copy PDF files from _site output directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug to fix template The stock site template
Projects
None yet
Development

No branches or pull requests

2 participants