Replace phantomjs with playwright chromium for PDF generation to support ARM64 by Copilot · Pull Request #1926 · hackmdio/codimd

@Yukaii

Co-authored-by: Yukaii <4230968+Yukaii@users.noreply.github.com>

@Yukaii

Co-authored-by: Yukaii <4230968+Yukaii@users.noreply.github.com>

Copilot AI changed the title [WIP] Deprecated phantomjs in favor of headless chromium Replace phantomjs with puppeteer for PDF generation to support ARM64

Jun 16, 2025

@Yukaii

Co-authored-by: Yukaii <4230968+Yukaii@users.noreply.github.com>

@Yukaii

- Updated dependencies in package.json and package-lock.json to include playwright-chromium.
- Modified markdown-to-pdf.js to replace Puppeteer with Playwright for PDF generation, enhancing performance and compatibility.
- Adjusted launch options and page settings for Playwright.

Co-authored-by: Yukaii <4230968+Yukaii@users.noreply.github.com>
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>

@Yukaii Yukaii changed the title Replace phantomjs with puppeteer for PDF generation to support ARM64 Replace phantomjs with playwright chromium for PDF generation to support ARM64

Jun 16, 2025

@Yukaii

- Introduced a new Mocha CLI command in package.json for easier test execution.
- Expanded PDF generation tests to cover various scenarios, including handling of empty markdown and special characters.
- Improved cleanup process for temporary files created during tests.
- Verified module structure and dependencies in tests to ensure proper setup.

Co-authored-by: Yukaii <4230968+Yukaii@users.noreply.github.com>
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>

@Yukaii Yukaii marked this pull request as ready for review

June 16, 2025 13:35