-
Notifications
You must be signed in to change notification settings - Fork 3.6k
allow to use customized pdf library #266
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
allow to use customized pdf library #266
Conversation
PowerKiKi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call that method createExternalWriterInstance instead of getExternalWriter.
The documentation should be updated to mentions this new feature, somewhere near docs/topics/reading-and-writing-to-file.md:830. As well as the CHANGELOG.md
And there are few minor comments above that should be fixed before merging.
| { | ||
| /** | ||
| * Gets the implementation of external PDF library that should be used. | ||
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no parameter named $config.
| * Gets the implementation of external PDF library that should be used. | ||
| * | ||
| * @param array $config Configuration array | ||
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be \Dompdf\Dompdf, not Dompdf
| * Gets the implementation of external PDF library that should be used. | ||
| * | ||
| * @param array $config Configuration array | ||
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be \Mpdf\Mpdf not Mpdf
|
done. But can you review my changes in docs/ and CHANGELOG.md? My English is not good for this kind of stuff :) |
|
Thanks ! |
This allow to create and configure the standard instance of the external PDF libary, before returning it to the standard writer. Or, more powerful, this allow to provide a custom implementation of the external PDF library, allowing for custom behaviors. An example of that would something like: https://tcpdf.org/examples/example_003/ Closes PHPOffice#266
This allow to create and configure the standard instance of the external PDF libary, before returning it to the standard writer. Or, more powerful, this allow to provide a custom implementation of the external PDF library, allowing for custom behaviors. An example of that would something like: https://tcpdf.org/examples/example_003/ Closes PHPOffice#266
This is:
Checklist:
What does it change?
Allow to use customized PDF library without rewriting save() method.
Customized PDF libray sample: https://tcpdf.org/examples/example_003/