Comments (10)
Word documents have done:
if node["height"] == "auto" || node["width"] == "auto"
attrs[:height] = nil
attrs[:width] = nil
end
This means that if only one size parameter of the image is specified, neither is making it to Word, and the document is being resized to full size. That behaviour needs to be suppressed.
This code dates from metanorma/metanorma-ribose#12 (comment) . I was right that Word would not understand height="auto"
, but the recalculation of the image size that takes place via Html2Doc if height=0 means it does not need to anyway.
from html2doc.
Provide a "%" option to shrink size
Thought you'd just casually sneak a major feature addition in to an urgent bugfix ticket, did you?
No, this will not get actioned now. Demoted to medium priority.
from html2doc.
Percentage will be recognised, and converted on preprocessing to pixel value. @alexeymorozov This doesn't affect you, right?
from html2doc.
@alexeymorozov I'm moving image_resize(img, path, maxheight, maxwidth) and get_image_size(img, path) from html2doc to metanorma-utils anyway
from html2doc.
Still working on this in isodoc...
from html2doc.
@alexeymorozov I'm moving image_resize(img, path, maxheight, maxwidth) and get_image_size(img, path) from html2doc to metanorma-utils anyway
π The work doesn't intersect with vectory integration except of 1 line.
from html2doc.
@opoudjis Would you like the image_resize
methods also to be moved to vectory
?
from html2doc.
@alexeymorozov thatβs probably a good idea. Any vector image manipulation or attribute reading should be in vectory.
from html2doc.
They are nothing to do with vectors, they apply to images generically. OTOH, you did move DataURI functionality to vectory as well, and that too is generic functionality. Don't care one way or the other...
from html2doc.
We might just extend Vectory to handle raster images as well...
from html2doc.
Related Issues (20)
- Appveyor fails HOT 3
- Move to Nokogiri::XSLT and remove ruby-xslt dependency HOT 1
- Add Windows image inclusion test for `html2doc` to ensure Base64'ed image is same as original image HOT 5
- Make limits of mundover expression display above and below expression HOT 1
- Error Bootsnap::LoadPathCache::FallbackScan on Rails 5 HOT 3
- libreOffice Support HOT 4
- Render scripts in OOXML maths HOT 5
- Failure to write to temp directory in Windows HOT 5
- Support nokogiri 1.11 HOT 12
- Word output in MHT not working (URGENT) HOT 1
- FILENAME urls not being processed in standardstylesheet
- Assign content-ids to v:imagedata
- HTML spans within MathML should not be namespaced as MathML under Nokogiri 1.11 HOT 2
- New Nokogiri is not dealing with Microsoft idiosyncratic XML
- MIME processing warnings HOT 1
- Insufficient permissions for gem release HOT 5
- tests-passed failing HOT 3
- Removed unused XSL files obsolete by Plurimath
- Fix typo in Why not docx? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html2doc.