simbridge
simbridge copied to clipboard
feat: Support image conversion for PDF URLs
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:
Get page count:
Get page count for multi-page PDF:
Get page > 1: