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

feat: Support image conversion for PDF URLs #111

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BenJuan26
Copy link

@BenJuan26 BenJuan26 commented Feb 26, 2024

closes #110
contributes to flybywiresim/aircraft#5768

Remaining work:

  • Test multi-page PDFs

Description

ChartFox provides some charts in PDF format. Since they can't be converted in the EFB itself, this service will allow support for those charts as long as there is a SimBridge connection.

I've mostly duplicated the existing functions for local files, but added FromUrl on the end. For the paths, I kept everything mostly the same, just under the /fromUrl subpath. It could probably be cleaned up in its current form, but it works in its current form.

Proof this works

Get PDF image:

image

Get page count:

image

Get page count for multi-page PDF:

image

Get page > 1:

image

@BenJuan26 BenJuan26 changed the title Support image conversion for PDF URLs feat: Support image conversion for PDF URLs Feb 26, 2024
@Benjozork Benjozork self-requested a review February 26, 2024 15:50
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

Successfully merging this pull request may close these issues.

Support PDF conversion for non-local files
2 participants