Skip to content

Releases: kumaF/pyhtml2pdf

pyhtml2pdf 0.1.0

20 Dec 10:38

Choose a tag to compare

⚠️ Breaking Changes

The following breaking changes have been introduced:

  • ghostscript_command is now strictly validated and must be one of: ["gs", "gswin64c", "gswin32c"].
  • compressor.compress now accepts a new max_pdf_size parameter to limit the maximum allowed PDF size and prevent unexpectedly large files.
  • compressor.compress now accepts a new timeout parameter to limit Ghostscript execution time and provide protection against DoS attacks.
  • compressor.compress now accepts a new force_process parameter, allowing processing to continue even when suspicious content is detected (use with caution).

🔐 Security: PDF Suspicious Content Detection

Added enhanced validation to detect potentially unsafe or malformed PDF files, including checks for:

  • File size limit violations
  • Invalid or corrupted PDF headers
  • PDFs with no pages
  • Embedded JavaScript
  • Embedded files (attachments)
  • Rich media annotations
  • XFA forms

These safeguards help prevent the processing of malicious, unsupported, or malformed PDF content.

0.0.9

20 Dec 05:04

Choose a tag to compare

add new version