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

Error writing a file on disk during ->merge('file', 'fname.pdf') #15

Merged
merged 1 commit into from
Mar 12, 2017

Conversation

Kadmillos
Copy link
Contributor

When using 'file' method during $pdf->merge(), the function expects an output from $fpdi->Output() that will never come during output 'file' from fpdf class
I added a new case to act properly during 'file' merging mode.

When using 'file' method during $pdf->merge(), the function expects an output from $fpdi->Output() that will never come during output 'file' from fpdf class
I added a new case to act properly during 'file' merging mode.
@myokyawhtun
Copy link
Owner

can you check file/folder permission where you're saving?

@Kadmillos
Copy link
Contributor Author

file permissions are ok.
when you merge on a file, the file is written without errors, but the program's flow gives you an error.
That's because the switch during the fdpf->Output does not give anything in return if you save the pdf as a file; so the pdfmerge thinks it's an error and an exception is raised

@Kadmillos
Copy link
Contributor Author

My pull request is a quick fix.
the better solution should be to check if the fpdf instance gives something on the $fpdf->Error
but from what i see through i thought you didn't want to rely on that

@myokyawhtun myokyawhtun merged commit fb2ea26 into myokyawhtun:master Mar 12, 2017
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.

2 participants