chrome-php / chrome

Instrument headless chrome/chromium instances from PHP
MIT License
2.24k stars 273 forks source link

Create PDF to a stream (e.g. using php://memory and php://temp) so it can be passed on the fpassthru #495

Open AndreasA opened 1 year ago

AndreasA commented 1 year ago

In order to avoid unnecessary memory consumption it would be create if a PDF could be created using a temporary stream like php://temp and directly pass it on to fpassthru without storing the data / decoding it memory (base64). That should avoid unnecessary memory consumption and saveToFile https://github.com/chrome-php/chrome/blob/v1.8.0/src/PageUtils/AbstractBinaryInput.php#L65 already creates a stream, it just stores it to a file and closes it. So adding a corresponding saveToStream or similar should be easily doable.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because there has been no recent activity. It will be closed after 30 days if no further activity occurs. Thank you for your contributions.

chrisgillis commented 1 year ago

+1

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because there has been no recent activity. It will be closed after 30 days if no further activity occurs. Thank you for your contributions.

AndreasA commented 5 months ago

Still think this would be nice to have and should be relatively simple to implement.