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

Problem with large file. #138

Open
truechernyshov opened this issue Jan 11, 2020 · 1 comment
Open

Problem with large file. #138

truechernyshov opened this issue Jan 11, 2020 · 1 comment

Comments

@truechernyshov
Copy link

@truechernyshov truechernyshov commented Jan 11, 2020

Server is down with 503 error when loading big pdf(8Mb, 40 pages).
It's because you puting file in construct method Imagick.

$this->imagick = new Imagick($pdfFile);

But why whole file if i need only one page. In method getImageData there is instruction that page is need use for generate preview.

$this->imagick->readImage(sprintf('%s[%s]', $this->pdfFile, $this->page - 1));

If you need read all file don't indicate index of page. Like this:

$this->imagick->readImage($this->pdfFile);

After then i deleted file from constructor Imagick

$this->imagick = new Imagick();

And all works fine. If you want pick another page there is method setPage

@freekmurze

This comment has been minimized.

Copy link
Member

@freekmurze freekmurze commented Jan 13, 2020

I'd accept a test that fixes this. Alle current tests should pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.