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 · 2 comments
Open

Problem with large file. #138

truechernyshov opened this issue Jan 11, 2020 · 2 comments

Comments

@truechernyshov
Copy link

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

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

@ArroWsGM
Copy link

@freekmurze, can you please review this PR #171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants