PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: cannot render greeks using TTF Embedding feature
   PostPosted: 30 Jan 2012, 19:49 
I wonder if you can help me - I have been trying to get your ttf embedding feature to work all afternoon and am having no luck. We are looking into to PD4ML for a chemical website so greek symbols are essential.

the jsp page:

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@ taglib uri="/WEB-INF/tlds/pd4ml.tld" prefix="pd4ml" %>

<pd4ml:transform screenWidth="400" pageFormat="A5" pageOrientation="landscape" pageInsets="15,15,15,15,points" inline="true">

<pd4ml:usettf from="java:fonts2"/>

<html>
<head>
<title>PD4ML embedded fonts test</title>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
</head>
<body>

<font face="Arial">ß</font><br>
<font face="Tahoma">Hello, World!</font><br>

<font face="Symbol">ß</font><br>
<font face="Symbol">b</font><br>
</body>
</html>
</pd4ml:transform>

I have put the fonts in a directory and generated the properties file:

#this is an autogenerated file. please remove manually any references to copyrighted fonts
#Mon Jan 30 16:47:43 GMT 2012
Arial=arial.ttf
Arial\ Bold=arialbd.ttf
Arial\ Bold\ Italic=arialbi.ttf
Arial\ Italic=ariali.ttf
Courier\ New=cour.ttf
Courier\ New\ Bold=courbd.ttf
Courier\ New\ Bold\ Italic=courbi.ttf
Courier\ New\ Italic=couri.ttf
Symbol=symbol.ttf
Times\ New\ Roman=times.ttf
Times\ New\ Roman\ Bold=timesbd.ttf
Times\ New\ Roman\ Bold\ Italic=timesbi.ttf
Times\ New\ Roman\ Italic=timesi.ttf


and referred to this. ( I am using windows so have not put this properties file directly into the windows/fonts directory as it will not accept this!) I have also put them in a jar , registered the library as shown above. I have tried rendering from the page. It seems to get assci chars, in the font, i.e. abcde...., ok but not any symbols.


?
Hello, World!
??????, ???!
?
b

What I need to do is get it to render from a java class

html.useTTF( "java:fonts2", true );


response.setContentType("application/pdf; charset=utf-8");
response.setHeader("Content-disposition", "inline; filename=test4.pdf");
if (!request.isSecure()) {
response.setHeader("Pragma", "no-cache");
response.setHeader("Expires", "-10000");
}


html.render(url, baos);



This still does not render any Greek symbols only '?'! Any help would be appreciated!


  Subject: Re: cannot render greeks using TTF Embedding feature
   PostPosted: 30 Jan 2012, 20:45 
I have downloaded the pro demo version to do the proof of concept for this but when I do the debug I just get this:

version: PD4ML 380 (eval)
done in 297ms.


It does not look like it is even trying to load the fonts. Is this not the correct PDML jar? If not where can I download the correct one and what is it's name?

Megan


  Subject: Re: cannot render greeks using TTF Embedding feature
   PostPosted: 30 Jan 2012, 20:55 
TTF Embedding is a feature of PD4ML Pro.

You obviously tried PD4ML Std.


  Subject: Re: cannot render greeks using TTF Embedding feature
   PostPosted: 30 Jan 2012, 23:24 
Yes I think you may not have the correct jar in your current pro evaluaion download.

I dropped down pd4ml.pro.trial.380 to evaluate it not the standard one, and used pd4ml_demo.jar and pd4ml_tl_demo.jar are the only jars in that package and I have installed both.

Can you tell me the name and where I can download and evalution on the pro version so I can test that it will handle the fonts for us?

Thanks


  Subject: Re: cannot render greeks using TTF Embedding feature
   PostPosted: 30 Jan 2012, 23:52 
ah - a new one went up today
\pd4ml.pro.trial.380fx2

and that seem to be working!

thanks


  Subject: Re: cannot render greeks using TTF Embedding feature
   PostPosted: 31 Jan 2012, 14:53 
Glad it works now.

I suspected Std as in the debug output
version: PD4ML 380 (eval)
there was no "Pro" suffix.



[Reply]     [ 6 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share