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: Call to undefined method Spatie\PdfToImage\Pdf::save() #242

Open
worktchaloemphon opened this issue Dec 2, 2024 · 1 comment
Open

Comments

@worktchaloemphon
Copy link

worktchaloemphon commented Dec 2, 2024

Hi,

I try to convert pdf to image using below.

$pdf = new \Spatie\PdfToImage\Pdf($pathToPdf);
$pdf->save($pathToWhereImageShouldBeStored);

But I got this error

Error: Call to undefined method Spatie\PdfToImage\Pdf::save()

So I try to print method list in side this class and I got these methods.

  • __construct
  • setResolution
  • setOutputFormat
  • getOutputFormat
  • setLayerMethod
  • isValidOutputFormat
  • setPage
  • getNumberOfPages
  • saveImage
  • saveAllPagesAsImages
  • getImageData
  • setColorspace
  • setCompressionQuality
  • width

So I change my code to use saveImage() and it work!.

What did I do wrong ?.

(sorry for my English)

@patinthehat
Copy link
Collaborator

@worktchaloemphon What version of the package do you have installed?

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