Skip to content

fix: correct file path handling for PDF generation#756

Merged
asyncapi-bot merged 4 commits into
asyncapi:masterfrom
lightning-sagar:fix/file-path
Dec 2, 2025
Merged

fix: correct file path handling for PDF generation#756
asyncapi-bot merged 4 commits into
asyncapi:masterfrom
lightning-sagar:fix/file-path

Conversation

@lightning-sagar

Copy link
Copy Markdown
Contributor

Description

  • Fixed PDF generation issue on Windows by normalizing file paths.
  • Converted backslashes (\) to forward slashes (/) and prepended file:/// to create a valid file URL for Puppeteer.
  • Ensures PDF generation works cross-platform (Windows, macOS, Linux).

Related issue(s)
Fixes #755

@lightning-sagar

lightning-sagar commented Nov 26, 2025

Copy link
Copy Markdown
Contributor Author

Note: The JS/CSS files will not be generated yet. This will be addressed once the default value issue is resolved. The related PR has already been created: #1769

Edit - in new commit, i replaced replace(/\\/g, '/') with replaceAll('\\', '/') to satisfy SonarCloud

@sonarqubecloud

sonarqubecloud Bot commented Dec 2, 2025

Copy link
Copy Markdown

@derberg

derberg commented Dec 2, 2025

Copy link
Copy Markdown
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit f58fdba into asyncapi:master Dec 2, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Missing PDF when using pdf flag

3 participants