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

Unable to create output file: XXX.pdf from latest TCPDF #316

Open
pakricard opened this issue Dec 18, 2024 · 3 comments
Open

Unable to create output file: XXX.pdf from latest TCPDF #316

pakricard opened this issue Dec 18, 2024 · 3 comments
Labels
Fix being discussed A fix is being discussed (add comment with link to Discussion)

Comments

@pakricard
Copy link
Collaborator

Hi:

I run into a bunch of "Unable to create output file: XXX.pdf " errors from TCPDF 6.7.5.

All scripts worked OK on TCPDF 6.0

So, digging a bit, and replacing all occurrences of

$f = TCPDF_STATIC::fopenLocal($name, 'wb');

into

$f = fopen($name, 'wb');

in includes/tcpdf/tcpdf.php made the trick.

I am not sure if it is a generic error, or just in my installation.

If the majority agrees, I will commit the change, if not, I will keep it for me.

@pakricard pakricard added the Fix being discussed A fix is being discussed (add comment with link to Discussion) label Dec 18, 2024
@pakricard pakricard assigned pakricard and unassigned pakricard Dec 18, 2024
@aingelc12ell
Copy link
Contributor

Perhaps, we can upgrade TCPDF to the latest in development: https://github.com/tecnickcom/tc-lib-pdf through composer?

On the PDF errors, please provide paths where they are supposed to be generated. pull request #323 provides resolutions to F, FI, and FD $dest parameter of PDF->Output($file, $dest). $file should be realpath

timschofield added a commit that referenced this issue Dec 21, 2024
Fix #224, #316: PDF output path for output type: F
@dalers
Copy link
Collaborator

dalers commented Jan 8, 2025

Is this related to Issue #325 ? Is this specific issue now resolved, and the issue should be closed?

@pakricard
Copy link
Collaborator Author

pakricard commented Jan 9, 2025

Hi @dalers and @aingelc12ell:

I am not sure if they are related or not at this point. I know that the patch proposed fixed my issue, but it could be also an issue of my installation, so before committing it, I would like to have consensus.

If everybody else can print OK with TCPDF 6.7.5, then I will assume the issue is caused by something local, no need to share the fix.

Until I have more specific feedback related to this issue, I prefer not to commit the proposed fix.

Regarding the upgrade to https://github.com/tecnickcom/tc-lib-pdf, it could be a way forward. Did you test it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix being discussed A fix is being discussed (add comment with link to Discussion)
Projects
None yet
Development

No branches or pull requests

3 participants