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

Suggestion for save method #237

Open
dam1r89 opened this issue Jul 29, 2024 · 1 comment
Open

Suggestion for save method #237

dam1r89 opened this issue Jul 29, 2024 · 1 comment

Comments

@dam1r89
Copy link

dam1r89 commented Jul 29, 2024

The following behavior can be confusing:

$output = '/tmp/image'; // Important not to have extension.
$pdf = new Pdf($pathToPdf);
$pdf->save($output);

info(file_exists($output) ? 'Yes it exists' : 'no it does not exist'); // prints: no it does not exist

You can get the paths from the method return, but when generating the screenshot of a single page I would expect to be saved on an exact location that was passed as an argument.

Use case: when we don't care about output because it is just a temporary step before it is uploaded to the remote storage.

@patinthehat
Copy link
Collaborator

@dam1r89 You make an interesting point. We'd be happy to review a PR that updates the behavior. Thanks! 👍

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

No branches or pull requests

2 participants