simbridge icon indicating copy to clipboard operation
simbridge copied to clipboard

feat: Support image conversion for PDF URLs

Open BenJuan26 opened this issue 1 year ago • 0 comments

closes #110 contributes to https://github.com/flybywiresim/aircraft/issues/5768

Remaining work:

  • [x] 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 avatar Feb 26 '24 00:02 BenJuan26