HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › Custom font, font-size
- This topic has 8 replies, 3 voices, and was last updated May 16, 2013
12:11:08 by Anonymous.
-
AuthorPosts
-
February 24, 2012 at 09:58#26690
Hi!
I have the stranges bugs going on..
– If I dont set a font-size on a specific element the custom font won´t get applied.
– If I set the font-size to 16px the custom font is not applied (15 works just fine).
– I can´t use % to set font-size (if I do it will ignore the custom font)
– “page-break-inside:aviod” dont work on div or p tags (only tables??)So these are the bugs that I struggle with at the moment and any help is much appreciated! 🙂
/Markus
February 24, 2012 at 12:01#28901This whole font-size bug is really bugging me!..
some times it seems to work and some times not???…February 24, 2012 at 21:08#28902Obviously we need more input from your side: HTML sample, Java code snippet, TTF file (if it is not a commonly used one) etc.
But first try to download the just-released v380fx3 – hopefully it solves some of the issues you reported.
February 27, 2012 at 10:36#28903Font-size and custom font issue seems to be fixed now.. so now It´s just the page-break-inside issue left 🙂
February 27, 2012 at 11:50#28904I spoke to soon 🙁
ok.. so now I´m trying this:
body * {<br /> background: none;<br /> font-size:20px;<br /> font-family:"HM Ampersand Ultra Light";<br /> }
and it´s applying the font, but if I change to 14px it dosent?
I have tried all combinations I can think of :/Targeting classes, spans, divs, p tags, with “*” selector etc etc…
I can´t post the font because I´m not sure if that is ok with the customer.. but I doubt that there is a problem with the font file.
I have tried setting Arial on body and Times on h2 and that works but I can´t get it to work with custom fonts..
Is there a limit to the number of custom fonts that can be used?
February 27, 2012 at 13:30#28905Is “pt” or “%” supported? or is it only px?
February 28, 2012 at 19:58#28906“pt” and “%” should also work. “pt” is converted on-a-fly to “px” bearing in mind 72dpi resolution. (optionally pd4ml.protectPhysicalUnitDimensions() API call suppresses the size conversions, but it has its drawbacks)
The issue you experience with font size is quite strange.
Try to temporarily define any other TTF font instead of HM Ampersand Ultra Light, i.e. Comic Sans MS. Is the problem still there?
May 16, 2013 at 12:09#28907i’ve also has same problem in font-size it seem the result of the pdf ( i use coldfusion)
here’s the code :
Test pdf4ML
FontSizeArial18 FontSizeArial18 FontSizeArial18 FontSizeArial18 FontSizeArial18 FontSizeArial18 FontSizeArial18 FontSizeArial18
*) margins with same values are not exactly the same in pd4ml and default especially left margin is smaller in pd4ml check for other margins as well <tahoma 20>
there’s a different result when i use pd4ml and cfdocument there’s gap between each line and the font size seem to be different
thank you
May 16, 2013 at 12:11#28908@ary.yuniarti wrote:
i’ve also has same problem in font-size it seem the result of the pdf ( i use coldfusion)
here’s the code :
Test pdf4ML
FontSizeArial18 FontSizeArial18 FontSizeArial18 FontSizeArial18 FontSizeArial18 FontSizeArial18 FontSizeArial18 FontSizeArial18
*) margins with same values are not exactly the same in pd4ml and default especially left margin is smaller in pd4ml check for other margins as well <tahoma 20>
there’s a different result when i use pd4ml and cfdocument there’s gap between each line and the font size seem to be different
thank you
-
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.