RE: Is embedding fonts significantly slower?

2006-10-16 Thread Melih Ovadya
Title: RE: Is embedding fonts significantly slower?






Yes, I also tried it with Unicode fonts, and it takes a lot longer to generate the file. It seems like embedding fonts in general is a slow process.

melih


-Original Message-

From: news [mailto:[EMAIL PROTECTED]] On Behalf Of Arturo Pérez

Sent: Monday, October 16, 2006 4:57 PM

To: fop-users@xmlgraphics.apache.org

Subject: Is embedding fonts significantly slower?


Hi all,


Has anyone benchmarked the performance of FOP 0.92 when embedding fonts

versus not embedding fonts?  I just started doing this with the DejaVu 

fonts in order to get some more Unicode glyphs and it seems a lot slower.

I could quantify this further if you think that's necessary.


I need to know in order to set expectations of the people receiving the

PDFs.  Alternatively, I could use the Unicode fonts only when I have an

unusual glyph in the text (like arrows, etc) since the documentation says

it will only embed the necessary characters from a TTF.


Or perhaps it using Unicode/CID versus Adobe-defaults/WinAnsi that's the

the cause?


any pointers appreciated.

-arturo



-

To unsubscribe, e-mail: [EMAIL PROTECTED]

For additional commands, e-mail: [EMAIL PROTECTED]





creating a PDF document containing UTF-8 characters

2005-08-29 Thread Melih Ovadya
Hi,

I have a question regarding to UTF-8 characters when creating a PDF
document: 

I have the initial content in byte[] myBytes, and myBytes contains some
Japanese characters. Yet, once I render it, each Japanese character is
displayed as a pound sign (#). 

Is this a known bug, or am I missing something?

Thank you in advance. 

Regards,
Melih



Here is my code:
==

InputSource is = new InputSource(new java.io.ByteArrayInputStream(myBytes));
is.setEncoding("UTF-8");
ByteArrayOutputStream out  = new ByteArrayOutputStream();

try {
Driver driver = new Driver();
driver.setInputSource(is);
driver.setOutputStream(out);
driver.setRenderer(Driver.RENDER_PDF);
// transform XSL:FO to PDF
driver.run();
} catch (Exception ex) {
} 


byte[] content = out.toByteArray();

java.io.FileOutputStream fos = new java.io.FileOutputStream("c:\\out.pdf");
for (int i=0 ; i

RE: creating a PDF document containing UTF-8 characters

2005-08-30 Thread Melih Ovadya
Thank you for this info. Is there a way to set the font for the whole
document so that it would render the Japanese characters correctly?

melih

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 30, 2005 12:29 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: creating a PDF document containing UTF-8 characters

It's not a bug. Please consult
http://xmlgraphics.apache.org/fop/faq.html#pdf-characters

On 30.08.2005 01:59:56 Melih Ovadya wrote:
> Hi,
> 
> I have a question regarding to UTF-8 characters when creating a PDF
> document: 
> 
> I have the initial content in byte[] myBytes, and myBytes contains some
> Japanese characters. Yet, once I render it, each Japanese character is
> displayed as a pound sign (#). 
> 
> Is this a known bug, or am I missing something?


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: creating a PDF document containing UTF-8 characters

2005-08-31 Thread Melih Ovadya
Thank you Jeremias, I followed the instructions and now I can make it work
by embedding the font in the document.

Looking at the samples in userconfig.xml, this is how I register the fonts:





   



What happens if I omit the embed-file tag? After the PDF is created, on the
client machine, how will it find the right font to display the characters in
that case? With this flag, does FO include whole font in the PDF, or just a
subset to be able to display the Unicode characters?

Regards,
melih


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Logger question

2006-02-14 Thread Melih Ovadya

Hi,

I am having difficulties with the priority settings of the logger FOP is
using. I use org.apache.log4j, I set the priority of my loggers in
log4j.xml, and it works fine everywhere in my code except when using FOP.
Can someone please point me out what I am missing here?

In my log4j.xml file, I declare the priority as following:






And in myPackage.MyFOPRenderer.java, I set the FOP logger in two places as
following:

import org.apache.avalon.framework.logger.Log4JLogger;
import org.apache.fop.apps.Driver;
import org.apache.fop.messaging.MessageHandler;
import org.apache.log4j.Logger;

public static synchronized void initialize(...){
...
Log4JLogger log4JLogger = new
Log4JLogger(Logger.getLogger(MyFOPRenderer.class));
MessageHandler.setScreenLogger(log4JLogger);
...
}


public void render(...) {
Driver driver = new Driver();
Log4JLogger log4JLogger = new
Log4JLogger(Logger.getLogger(MyFOPRenderer.class));
driver.setLogger(log4JLogger);
...
}


Why has the priority setting got lost in driver all of a sudden?

Thanks in advance.





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]