HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › vertical-alignment
- This topic has 5 replies, 2 voices, and was last updated Feb 21, 2019
13:21:15 byAnonymous.
-
AuthorPosts
-
February 7, 2019 at 15:51#27212
Hi,
I have a question about vertical-alignment.Part of Html which I try to export is:
<br /> <p><br /> text<br /> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAQCAYAAAAvf+5AAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAEZ0FNQQAAsY58+1GTAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAARwQAAEcEBPn1jhwAAALtJREFUeNqt0TELAUAYxvELScpoN1CKTexGKcliUGaTweIb2PkQBpuSSCzIYlEmg5iUTYks+F/d8KbuGDz1q/fqqbveU+rHeMWcRAVBHPGyFR8oo40DNq7iDiWE0ZVFz8dTTugji4SreMUQAeRdRZ01tih+K54xQsZswlqMIGfmqq0YxRR1rOT1shjHAg3MMEAMaVnUb1miY9aj08MdNX3wIYWxWUtL3LDHBAX49c88cUPTzDJzhHBRf88bmvkkzNERKWoAAAAASUVORK5CYII=" style="page-break-inside: avoid;width: 1.355ex; height: 2.176ex; vertical-align: -0.338ex;" data-source="lambda"/><br /> text<br /> </p><br />Browsers render the image correctly – it is a “lambda” letter and it is vertically aligned with the text around. When I create a PDF from this code, vertical alignment does not work and “lambda” is rendered a bit higher.
Is the a support for it in 3.9.0 version? Or is there any workaround?
Thanks for your help,
OndrejFebruary 7, 2019 at 17:02#30201PD4ML v3.x does not support length values by vertical-align. It should be possible to workaround with position: relative; top: -0.338ex;
February 19, 2019 at 10:38#30205Hello,
We have tried the proposed workaround with position: relative; top:
, unfortunately it did not work. We have tried to modify values of top manually so they would result in a good result in PDF, but did not find any rule or algorithm or coefficients that could be generally used to adjust the vertical alignment in PDF correctly.
It would be great if you could help us solve this problem, as in the current state exported document is almost not usable.
I am attaching the link to a sample HTML document (original with vertical-align) that we are trying to export:
https://drive.google.com/file/d/18EWWqF7Ij_t-qQ6bf8VOY9ESTMZrQumO/view?usp=sharing. I can also provide documents with vertical-align changed to position: relative; top: … if that could help.Thanks in advance,
ElenaFebruary 19, 2019 at 10:52#30202We’ll check what could be done. However a solution is going to be implemented in v3.10.x and v4
February 19, 2019 at 10:56#30203Thanks a lot,
ElenaFebruary 21, 2019 at 13:21#30204Hi,
If there will be any update or new information, please write here, I keep checking this topic 🙂
Elena
-
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.
