[PR #242] [CLOSED] Feature/pdf support (WIP needs tests) #956

Closed
opened 2026-03-15 15:44:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/flyimg/flyimg/pull/242
Author: @louisl
Created: 1/31/2020
Status: Closed

Base: masterHead: feature/pdf-support


📝 Commits (5)

  • 64e528d Added ghostscript
  • 63e02e7 Added PDF mimetype and isInputPdf function
  • 488ee6a If it's a pdf use pgae no param
  • a640a69 Added pg param for PDF
  • 5ac06b3 Changed parameter name to be more generic, appends page number to cached image

📊 Changes

5 files changed (+35 additions, -1 deletions)

View changed files

📝 Dockerfile (+4 -0)
📝 config/parameters.yml (+2 -0)
📝 src/Core/Entity/Image/OutputImage.php (+24 -0)
📝 src/Core/Processor/ImageProcessor.php (+4 -1)
📝 tests/Core/Entity/Image/OutputImageTest.php (+1 -0)

📄 Description

RE issue #241

OK, I have the pdf version working.

This generates an image for page 1. (no page specified).
http://127.0.0.1:8080/upload/w_1024,h_1024,q_75/https://example.com/seasons.pdf

Adding pg_[n] generates a specific page. E.g. this would generate page 3.
http://127.0.0.1:8080/upload/w_1024,h_1024,q_75,pg_3/https://example.com/seasons.pdf

When the cached image is generated I'm appending '-1', '-2', '-3' etc to it depending on the page requested. No page specified defaults to appending '-1'.

I just need some advice on where/how best to set up the tests for it.

I haven't committed a PDF to test because I don't know if you have a preferred one.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/flyimg/flyimg/pull/242 **Author:** [@louisl](https://github.com/louisl) **Created:** 1/31/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feature/pdf-support` --- ### 📝 Commits (5) - [`64e528d`](https://github.com/flyimg/flyimg/commit/64e528d9b280fbf5a23888779c0925ec799a3f2e) Added ghostscript - [`63e02e7`](https://github.com/flyimg/flyimg/commit/63e02e71d0a7cfa3da29af25426702911e277dfd) Added PDF mimetype and isInputPdf function - [`488ee6a`](https://github.com/flyimg/flyimg/commit/488ee6a8242b05b3f6438dfa89b1f09acebce61f) If it's a pdf use pgae no param - [`a640a69`](https://github.com/flyimg/flyimg/commit/a640a6983a602343acd60b38bb5e62d72a1b1f7f) Added pg param for PDF - [`5ac06b3`](https://github.com/flyimg/flyimg/commit/5ac06b3f459a9060d8c656245d3b375048613a49) Changed parameter name to be more generic, appends page number to cached image ### 📊 Changes **5 files changed** (+35 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+4 -0) 📝 `config/parameters.yml` (+2 -0) 📝 `src/Core/Entity/Image/OutputImage.php` (+24 -0) 📝 `src/Core/Processor/ImageProcessor.php` (+4 -1) 📝 `tests/Core/Entity/Image/OutputImageTest.php` (+1 -0) </details> ### 📄 Description RE issue #241 OK, I have the pdf version working. This generates an image for page 1. (no page specified). `http://127.0.0.1:8080/upload/w_1024,h_1024,q_75/https://example.com/seasons.pdf` Adding `pg_[n]` generates a specific page. E.g. this would generate page 3. `http://127.0.0.1:8080/upload/w_1024,h_1024,q_75,pg_3/https://example.com/seasons.pdf` When the cached image is generated I'm appending '-1', '-2', '-3' etc to it depending on the page requested. No page specified defaults to appending '-1'. I just need some advice on where/how best to set up the tests for it. I haven't committed a PDF to test because I don't know if you have a preferred one. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 15:44:59 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flyimg#956
No description provided.