Skip to content

Conversation

@SailorMax
Copy link
Contributor

@SailorMax SailorMax commented Oct 30, 2017

This is:

  • a bugfix
  • a new feature

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/

Copy link
Member

@PowerKiKi PowerKiKi left a 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.
*
Copy link
Member

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
*
Copy link
Member

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
*
Copy link
Member

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

@SailorMax
Copy link
Contributor Author

done.

But can you review my changes in docs/ and CHANGELOG.md? My English is not good for this kind of stuff :)

@PowerKiKi PowerKiKi closed this in 442e612 Nov 4, 2017
@PowerKiKi
Copy link
Member

Thanks !

Dfred pushed a commit to Dfred/PhpSpreadsheet that referenced this pull request Nov 20, 2018
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
@SailorMax SailorMax deleted the allow_to_use_customized_pdf_libraries branch March 1, 2019 14:48
BlackyTay pushed a commit to BlackyTay/PhpSpreadsheet that referenced this pull request Aug 8, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants