Hi
I did some tries I used the same source ePub containing an image 606×912, size 49.5KB format jpg.
I converted to PDF with Calibre using the code given above
I converted to PDF with Calibre using the code for SVG images provided by the InsertImageSVG v 1.4.0 Sigil plugin.
These two kinds of code gave
exactly the same results*. (see left screenhot1). There are document margins around the image (including vertical margins).
If I convert to PDF with Prince using the code given above, (see right screenshot2). There are NO document margins around the image (only the 6% left and right due to the shape of the image).
So, with Calibre, even with a svg wrapper, the display is not the one expected. The only exception with Calibre, concerns the cover image which can be displayed without document margins.
Why, what can be done for the cover image could not be extended to other full page images using the same code?
* Note that I do not pretend that these two codes are equivalent. If the results are the same
for this particular test, it is because the first code is calculated for screens with a 3/4 ratio. There would be differences for others shapes of screen.