-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Patch to allow image sizes to be specified in "in", "mm", when using --browserwidth {high_dpi} #289
Comments
"htmldoc_imagesize_patch.diff":
|
Might consider supporting the style attribute and width/height properties instead, otherwise the HTML input won't be valid... |
Yeah, well I do want to keep things standards-compliant as much as possible, particularly as I implement support for EPUB which requires strict XHTML conformance... Like I said, I'm considering adding support for things like:
to override the normal browser width/PPI calculations and remain standards-compliant. |
Version: 1.8-current
Original reporter: Iain W. Bird
When using very high browserwidth options, e.g. to allow high DPI background images:
htmldoc --browserwidth 3307 --webpage test2.htm --outfile test2.pdf --size A4 --jpeg=70 --no-title
images become very small unless specified in percent.
This patch allows image sizes to be specified in "in", "mm" or "px" (96DPI). If units are not specified, the pre-existing behaviour is retained.
Use in HTML as follows, e.g.
TEST IMAGE SIZE NATIVE
TEST IMAGE SIZE 80%
TEST IMAGE SIZE 1 INCH
TEST IMAGE SIZE 2x1 INCH
TEST IMAGE HEIGHT 50mm
TEST IMAGE WIDTH 144pt
TEST IMAGE WIDTH 12pc
TEST IMAGE WIDTH 530px
TEST IMAGE WIDTH 530
Patch file has been tested under cygwin and MS-VC 2013 for the htmldoc executable
The text was updated successfully, but these errors were encountered: