Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

vmw
Copy link

@vmw vmw commented Jul 4, 2025

Ensure the output buffer is empty prior to attempting to generate a pdf.

In order to generate a pdf, the output buffer MUST be empty, or else tcpdf shall return an error.

Description

This commit fixes #10695 , and flushes the active output buffer prior to attempting to generate a pdf.

As noted in the bug report, if tcpdf sees the output buffer is not empty, it will fail with a cryptic error.

Motivation and Context

This ensures that we do not subsequently fail the ob_get_contents() checks conducted by tcpdf when generating a pdf output.

How To Test This

This change was tested on our local installation of suiteCRM.

Types of changes

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • [X ] My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to generate PDF quotes after migrating to 7.14.6

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.