I guess, I was also wanting to check I was implementing it in the right way?

 

Or to make it use the fonts do I need to create an FOUserAgent rather than
just a Fop instance from the factory?

 

As there are not really any proper examples of embedding that explain the
difference between making a 

Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,out);

 

Or

FOUserAgent userAgent = fopFactory.newFOUserAgent();

Fop fop = fopFactory.newFop(MimeConstants.MIME_POSTSCRIPT, userAgent, out);

 

What is the difference between the two and what are the benefits of using a
user agent rather than just a fop?

 

 

Theresa

 

From: mehdi houshmand [mailto:[email protected]] 
Sent: 10 May 2011 09:40
To: [email protected]
Subject: Re: How to get fonts loaded programatically?

 

Hi Theresa,

 

There're two ways you can find out what you're looking for, some information
is on the FOP website http://xmlgraphics.apache.org/fop/trunk/fonts.html,
but if that fails to answer your questions I'd suggest you look through the
mailing list archives. There have been quite a few of questions regarding
fonts fairly recently, so that'll probably help you find the answers you're
looking for.

 

Hope that helps

 

Mehdi

On 10 May 2011 09:29, Theresa Jayne Forster <[email protected]> wrote:

I have been trying to get fonts to load programmatically using the latest
FOP 

To instantiate the factory I do the following

 

            private static final  FopFactory fopFactory =
FopFactory.newInstance();

            fopFactory.setUserConfig(new File("C:/myfiles/fopconfig.xml"));

            fopFactory.setTargetResolution(300);

 

then I make the Fop and use it.

 

The config file has 2 separate sections, 

1.       Fonts section as per the old system (I copied it from our old
setup) 

2.       A renderer section for PDF telling it to use autodetect.

 

But I am not seeing anything in the logs except the standard 14. and these
errors.

 

2011-05-09 16:28:06,551 [http-8080-1] WARN  org.apache.fop.apps.FOUserAgent
- Font "HelveticaNeue,normal,400" not found. Substituting with
"any,normal,400".

2011-05-09 16:28:06,822 [http-8080-1] WARN  org.apache.fop.apps.FOUserAgent
- Font "AGaramond,normal,700" not found.. Substituting with
"any,normal,700".

2011-05-09 16:28:06,824 [http-8080-1] WARN  org.apache.fop.apps.FOUserAgent
- Font "HelveticaNeue,normal,700" not found. Substituting with
"any,normal,700".

 

Any advise would be helpful.

 

Kindest regards

 


Theresa Forster

Senior Software Developer

[email protected]
www.inbrand.co.uk <http://www.inbrand.co.uk/> 

Tel: 01483 266500

 



 

IMPORTANT NOTE: This transmission has been sent by or on behalf of In Brand
Software Ltd. The information in this transmission is for the intended
addressee only and is confidential to that intended addressee. If either you
know or you ought reasonably to conclude that you are not, or may not be,
the intended addressee, you are hereby given notice that any unauthorised
dissemination or copying of this transmission and any disclosure or use of
the information
transmitted is strictly prohibited and may be illegal. In such circumstances
we ask for your assistance in notifying us immediately by e-mail, telephone
or letter.

InBrand Software Ltd Registered in England No. 5131004 Registered Office:
The Old Barn, Ewhurst Road, Cranleigh GU6 7EF 

 

 

 

  _____  

  _____  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1325 / Virus Database: 1500/3625 - Release Date: 05/08/11

<<image001.png>>

Reply via email to