RosiePuddles / mdbook-compress

An mdBook single PDF generator using pure Rust and some Node.js
Mozilla Public License 2.0
58 stars 2 forks source link

Images ... help needed? #3

Open bitdivine opened 8 months ago

bitdivine commented 8 months ago

I love this initiative.

Images (This is not possible with genpdf... at the moment)

Do you know what steps would be needed for this, roughly? Maybe I (or someone else who lands here) can help.

RosiePuddles commented 7 months ago

genpdf hasn't been updated in over 2 years so i doubt they'll suddenly make a new release supporting images. this would mean having to reqrite the whole project using a different pdf generator. if you have typst, this project will generate typst source files and compile tham into a pdf which will support images; i'm not sure how they support images for their pdf generation though.

if you've got any good pddf gen libraries that would support images i' be happy to have a look and see if i could rewrite the project using that library

erkannt commented 7 months ago

Looking at the genpdf docs it seems there is some form of image support if I'm reading them right. https://docs.rs/genpdf/latest/genpdf/render/struct.Area.html#method.add_image

RosiePuddles commented 7 months ago

gonna be honest, no idea how i missed that when i wrote this. i'll have a closer look and see if i can add images in