Re: Wrapping Long Text Without Spaces

2007-04-06 Thread Jeff Vannest
 Just FYI: the other known workaround (which fits some scenarios  
 better than inserting ZWSPs) would be to activate hyphenation, and  
 use a ZWSP as hyphenation-character... In that case, FOP will

This is new to me, so let me see if I understand: A ZWSP is implicit between
characters. For example, the word CAT would contain three characters and
two ZWSP: C-ZWSP-A-ZWSP-T. Setting hyphenation to ZWSP would allow wrapping
as:

CA
T

...or...

C
AT

I think this sounds like the solution to use!

Jeff




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



RE: fop 0.20.5 and chinese pdf

2007-03-15 Thread Jeff Vannest
Arial Unicode MS font should work. Someone else will need to answer the
version question.

Jeff




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



Re: fop 0.20.5 and chinese pdf

2007-03-15 Thread Jeff Vannest
Yes, embedding is really the only way to go, and yes, the file will be PDF
smaller because only the glyphs that are used are embedded, not all glyphs
in the font.

Jeff




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



Re: out.flush()

2007-03-13 Thread Jeff Vannest
 Could you please state which OutputStream implementation are
 used in your code?

SorryI didn't answer your question: java.io.FileOutputStream and
java.io.BufferedOutputStream.

A code snippet from the servlet appears below.

Thanks,
Jeff




// Setup output
OutputStream out = new java.io.FileOutputStream(pdfFile);
out = new java.io.BufferedOutputStream(out);

// Transform the XML+XSLT to PDF
try {

   // Create and configure the FOUserAgent
   FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
   foUserAgent.setProducer(Oracle Pluggable Destination - DesXslFo);
   foUserAgent.setCreator(X);
   foUserAgent.setAuthor(X);
   foUserAgent.setCreationDate(new Date());
   foUserAgent.setBaseURL(file:/// + transformDir);

   // Construct fop with desired output format
   Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);

   // Setup the transformer with the XSLT
   TransformerFactory factory = TransformerFactory.newInstance();
   Transformer transformer = factory.newTransformer(new
StreamSource(xsltFile));

   // Set the XSLT stylesheet version being used
   transformer.setParameter(versionParam, xsltVersion);

   // Setup input for XSLT transformation
   Source src = new StreamSource(xmlFile);

   // Resulting SAX events (the generated FO) must be piped through to FOP
   Result res = new SAXResult(fop.getDefaultHandler());

   // Start XSLT transformation and FOP processing
   transformer.transform(src, res);

   // Flush the buffered output before exiting
   out.flush();
   out.close();

   // Help garbage collection
   res = null;
   src = null;
   transformer = null;
   factory = null;
   fop = null;
   foUserAgent = null;

} catch (Exception e) {
   try { out.close(); } catch (Exception ignore) {}
   throw new Exception(e.getClass() + :  + e.getMessage());
}   transformer = null;
factory = null;
fop = null;
foUserAgent = null;

} catch (Exception e) {
try { out.close(); } catch (Exception ignore) {}
throw new Exception(e.getClass() + :  + e.getMessage());
}



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



R: A minor question

2007-03-12 Thread Jeff Vannest
 Is it possible to put this messages into a variable, so that I can 
 access them from my Java-program?

Search for redirect standard out java in Google.

For example: http://www.jcreator.com/forums/index.php?showtopic=773

Jeff




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



out.flush()

2007-03-12 Thread Jeff Vannest
Will someone add out.flush() to the embedding example on the FOP
website...for example, at
http://xmlgraphics.apache.org/fop/0.93/embedding.html?

It seems a shame that everyone embedding FOP learns to flush() by trial and
error.

Thanks!
Jeff




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



Re: out.flush()

2007-03-12 Thread Jeff Vannest
Closing the buffered out without flushing causes the PDF file to be closed
before all data is written to it. Originally when I started working with the
embedded FOP I had this problem...adding the flush got rid of the problem
completely.

Another user had the same problem and reported it on 3/6/07 in a message
titled, FOP 0.93 generated a damaged PDF File. Liam responded on 3/7/07 to
do a flush before the close.

According to
http://java.sun.com/j2se/1.4.2/docs/api/java/io/FilterOutputStream.html#clos
e(), the flush() should be implicit, which agrees with your response.

On a possibly related note, I only experienced the problem within the
context of my servlet, never on my local system, so I'm not ruling out a
java bug.

Jeff




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



RE: Page break

2007-03-09 Thread Jeff Vannest
 I have a module with 4 column.The first column is a product descripion and
 the third is the price.Then when if the description is break on the new
page
 the prrice is on the same line of the first product description line but i
 want that the price is dyplayed on the last line of the description

I assume you're using table cells for the columns? Set the Price table cell
to align to the bottom. In HTML this would be:

td valign=bottom

In XSL-FO it is:

fo:table-cell display-align=after

Actually, you may wish to cause paragraphs not to break on page. In other
words, an entire description will always appear on the same page as its
price. In XSL-FO this is the keep-together=always attribute inside of the
table or cell element you wish to keep on the same page.

I hope that is helpful.

Regards,
Jeff




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



RE: Support for other fonts

2007-03-07 Thread Jeff Vannest
Rico,
Can you briefly describe what you mean by the lack of proper support for
other fonts in FOP? What do you find lacking?

I'm embedding FOP in an Oracle Reports server to support multi-byte
languages (Japanese, Chinese, etc.) using the Arial Unicode MS font. While I
have not done extensive testing, everything seems to be generating correctly
to PDF.

Regards,
Jeff




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



RE: Arial Unicode MS-MathML-bitmaps

2007-03-07 Thread Jeff Vannest
 when embedding Arial Unicode MS font using TTFReader
 I had to change the font's name avoiding spaces

We've discussed this at length, recently. Apparently, the current FOP code
tree has been adjusted for this, although according to the CSS spec, it's
not an error. Font names that contain spaces must be enclosed in quotes. The
CSS spec on 'font-family' gives this example in section 5.2.2 of the Level 1
spec, 11-JAN-1999:


   Font names containing whitespace should be quoted:

   BODY { font-family: new century schoolbook, serif }
  
   BODY STYLE=font-family: 'My own font', fantasy



Regards,
Jeff




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



RE: My little FOP-project

2007-03-07 Thread Jeff Vannest
Thank you, Tom, I find it interesting.

I would not refer to a stylesheet as a script, which connotes a procedural
set of commands. Stylesheets, HTML, etc, are typically called markup. This
is a very minor comment.

I need to create a XML stylesheet pretty soon for a project I'm working on,
so I will review st as a part of my self-training when the time comes.

Jeff




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



XPath version

2007-03-06 Thread Jeff Vannest
What version of XPath is used in FOP 0.93 when parsing through an XSLT-FO
file? Is there a way to control the XPath version being used? I'm trying to
use:

xsl:if test=upper-case( ../NAME ) = quot;SITE NAMEquot;

But I get the error:

SystemId Unknown; Line #27; Column #73; Could not find function: upper-case
SystemId Unknown; Line #27; Column #73; function token not found.
(Location of error unknown)java.lang.NullPointerException
Mar 6, 2007 1:18:31 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
java.lang.NullPointerException
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)


I'm using FOP 0.93, and am converting XML to PDF through XSLT:

.\fop-0.93\Fop.bat -xml upper-case_test.xml -xsl upper-case_test.xslt -pdf
upper-case_test.pdf


Thanks!
Jeff




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



Re: [SPAM] font-family=Arial Unicode MS in rtf doesn't work

2007-02-21 Thread Jeff Vannest
 I don't doubt that you, the FOP developers, are a group of good software
 professionals and a bunch of nice peaple. But the way you handle FOP as a
 product development project and relate to the user's of FOP is downright
 amateurish. And for me irritating, too.

It seems most of the misunderstanding about the Apache FOP project can be
illustrated from your first paragraph.

First, this is the FOP users list, not the FOP developers list. If you want
to know how the daily development proceeds, join the correct list.

Second, the project is open source, which means that by definition it is
neither professional nor amateur. It is a volunteer group. Undoubtedly,
some developers are professionals and some are amateur, but that is
irrelevant. If someone would like to see more progress in an area, then
you've got SVN and may even have knowledge of java...get crackin!

Third, we're not nice people; or rather, it's irrelevant whether we are. We
are FOP users who have questions about, or are interested in, the product. 

I don't doubt that you're irritated. But expressing your irritation - which
seems based on a misunderstanding of open source software - is not
appropriate. If you have questions, or wish to encourage the group to make
certain decisions or changes, then please ask. I've only been reading for
about a month now, and I find this group to be very reasonable and
dedicated.

Jeff




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



Re: font-family=Arial Unicode MS in rtf doesn't work

2007-02-20 Thread Jeff Vannest
 No, they didn't! My error report was cosed with the remark that
 in FOP the workaround is quoting. Yeah, but that's not the
 answer I would expect (ord accept) for such a
 (technically) minor bug. 

I've changed my opinion on this issue. The CSS spec on 'font-family' gives
this example in section 5.2.2 of the Level 1 spec, 11-JAN-1999:


Font names containing whitespace should be quoted:

BODY { font-family: new century schoolbook, serif }
  
BODY STYLE=font-family: 'My own font', fantasy


To me, this cannot be labeled a workaround in FOP, it is compliance with
the spec. Frankly, I've never seen single quotes within an attribute, and I
would have bet money otherwise, but it's clear as can be in the CSS spec.

The level 2 spec contains the same example of single quoting font names that
contain spaces.

As an aside, Altova StyleVision currently ships with FOP .25, and it does
not single quote fonts containing spaces, which causes the integrated FO
support to fail when identifying fonts by font-family. It's unfortunate, but
it looks to me like this is a bug in StyleVision that should be corrected by
Altova. Although, I have to admit that it would be nice if FOP were
forgiving of this, since I plan to roll out StyleVision to several
developers as our primary FO GUI to use with the latest Apache FOP version.

Jeff




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



Re: [SPAM] font-family=Arial Unicode MS in rtf doesn't work

2007-02-20 Thread Jeff Vannest
 Yes, we did! :)
 It was fixed in FOP /Trunk/ (= fix will be in the next release)


Excellent! This means that my Altova StyleVision should work either way with
the new rev.

Is there a way to know when the next rev will be released?

Jeff




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



RE: Need help on PDF generation using XSL-FO

2007-02-08 Thread Jeff Vannest
 we have another requirement of disabling the PRINT, SAVE and
 EDIT options in the PDF. It looks like we can't disable the
 PRINT option using XSL-FO.

Disabling print and edit are handled by PDF security. Why can't you disable
print? I have not tried, but it looks like the PDF security enhancement to
FOP has a -noprint flag. See PDF Encryption:
http://xmlgraphics.apache.org/fop/0.93/pdfencryption.html

Save is not handled by PDF security and will need to be managed using some
other method. To my knowledge no *ware modification to the PDF will disable
the user's ability to save.

In a previous project I implemented a controlled database solution reporting
by popping a PDF to the screen for the user then used an OLE connection to
the application to remove all Adobe toolbars and menus. This removed almost
every option other than viewing. See Acrobat SDK:
http://www.adobe.com/devnet/acrobat/

Jeff



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 08, 2007 4:53 AM
To: fop-users@xmlgraphics.apache.org
Subject: Need help on PDF generation using XSL-FO

Hi All,

We have a project requirement to generate a PDF document out of XML in
multiple languages. We have been successful in generating the PDF in
multiple languages.
On top of this, we have another requirement of disabling the PRINT, SAVE and
EDIT options in the PDF. It looks like we can't disable the PRINT option
using XSL-FO.
We are still exploring on disabling SAVE and EDIT using XSL-FO. If any body
has got idea on disabling these options using any other freeware, please
provide the info/URL to get the information.

Thanks  Regards
Sowjanya



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



Re: font-family=Arial Unicode MS in rtf doesn't work

2007-02-06 Thread Jeff Vannest
 Should be simple enough for someone who wants to get his feet wet...

snip

 FWIW: already did this locally (incl. normalization of sequences of  
 more than one space).
 It all boils down to an added 35-40 lines of code...

 As soon as I'm 100% sure that the testcases that now fail, are  
 failing as a result of the previous patch being applied, I'll commit  
 the changes to the Trunk.

You almost had me convinced to take a stab at this one!

Yeah, I'm not sure why anyone would want multiple spaces between words as
previously quoted. I can't see how that would be desirable. In my case, I'm
using Altova StyleVision to generate XSL-FO files, and obviously that
product writes font families as they are declared locally, i.e., with single
spaces between words.

Jeff




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



RE: font-family=Arial Unicode MS in rtf doesn't work

2007-02-06 Thread Jeff Vannest
I understand; it may be necessary to collapse multiple white space into a
single space before evaluation. Not that it is recommended as a solution to
something.

lightbulb/

Jeff


-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 06, 2007 4:29 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: font-family=Arial Unicode MS in rtf doesn't work

Jeff Vannest wrote:
 Yeah, I'm not sure why anyone would want multiple spaces between words as
 previously quoted. I can't see how that would be desirable.

Line wrapping with indentation done by tools which take every
space as a line break opportunity.

J.Pietschmann

-
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: font-family=Arial Unicode MS in rtf doesn't work

2007-02-05 Thread Jeff Vannest
I've noticed the same going to PDF. For some reason specifying Arial
Unicode MS is not honored. I worked around it by using the Arial
font-family and mapping the Arial triplets to the ARIALUNI.TTF in the
userconfig.xml.

Jeff


-Original Message-
From: Dominic Marcotte [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 05, 2007 4:37 PM
To: fop-users@xmlgraphics.apache.org
Subject: font-family=Arial Unicode MS in rtf doesn't work

Hello,

Font-family Arial Unicode MS in FO become Arial in RTF.

Like if font-family can't have a space in their name.

fo:inline font-family=Arial Unicode MS font-style=normal 
font-size=9.5pt?/fo:inline



If I try with font-family ArialUnicodeMS, I get ArialUnicodeMS in 
RTF but I Word or WordPad doesn't konw this font. I must change it 
manualy to Arial Unicode MS.


I use FOP Trunk revision 499827.

Any suggestion?

Dominic



-
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: font-family=Arial Unicode MS in rtf doesn't work

2007-02-05 Thread Jeff Vannest
Jeremias Maerki wrote:
 Try font-family='Arial Unicode MS'
 
 http://www.w3.org/TR/xsl11/#font-family says:
 Font family names containing whitespace should be quoted.


font-family=Arial Unicode MS is already quoted, right? To my knowledge,
all attribute values must be quoted in order to meet most SGML-based
specifications. I am not familiar with any cases where double-quoting values
should be recommended.

Jeremias, are you referring to a known bug?

Jeff




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



RE: Use of FO in Internationalization/Globalization

2007-01-30 Thread Jeff Vannest
I'm attempting a globalized implementation using FOP 0.93 embedded into an
Oracle AS 10g (9.0.4) pluggable destination in the Oracle Reports server.
The critical aspects seem to be:

1)  Full Unicode support for international characters
2)  Embedding a Unicode font into the PDF 

I'm currently able to embed the Arial Unicode Ms font into the PDF document,
although all bold and italics are treated as normal font. I'm testing
international characters (Japanese) later today and tomorrow and will post
the results to this group if you are interested.

As for examples, refer to the documentation at
http://xmlgraphics.apache.org/fop.

Jeff


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 30, 2007 12:02 AM
To: fop-users@xmlgraphics.apache.org
Subject: Use of FO in Internationalization/Globalization

HI,


I want to generate PDF files in multi languages as per our project
requirement. I request you to please provide me some examples to implement
the same.

Thanks in advance.

Regards,
Vineela.


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



RE: Error: Content is not allowed in prolog

2007-01-30 Thread Jeff Vannest
Oh, man, chagrin. Thank you very much, Jeremias!

Jeff

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 26, 2007 9:49 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Error: Content is not allowed in prolog


On 26.01.2007 15:42:49 Jeff Vannest wrote:
 I've embedded FOP 0.93 successfully am able to process XML+XSLFO=PDF.
 However, when I try embed fonts I get this error message:
 
 Caught exception: javax.xml.transform.TransformerException:
 java.lang.RuntimeException: Content is not allowed in prolog.
 
 This only occurs when I place the following into my userconfig.xml file:
 
 font metrics-url=arial.ttf embed-url=arial.xml

Should be:
font metrics-url=arial.xml embed-url=arial.ttf



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



RE: Embedding font triplets w/ a single TTF file

2007-01-30 Thread Jeff Vannest


-Original Message-
From: Manuel Mall [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 29, 2007 8:01 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Embedding font triplets w/ a single TTF file
 FOP requires a font containing the actual bold (or italic) characters it 
 has no capability to derive / render a bold character from a 
 given 'plain' character. You would need to find a font which contains 
 the bold characters you are interested in.

I understand the response, and that's the way it looked to me, too. 

Question: Why is this possible in Adobe PDF, Word, etc, but not in FOP,
which follows the PDF spec?  ...not a criticism...just wondering where the
catch is.

Thanks!
Jeff



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



Error: Content is not allowed in prolog

2007-01-26 Thread Jeff Vannest
I've embedded FOP 0.93 successfully am able to process XML+XSLFO=PDF.
However, when I try embed fonts I get this error message:

Caught exception: javax.xml.transform.TransformerException:
java.lang.RuntimeException: Content is not allowed in prolog.

This only occurs when I place the following into my userconfig.xml file:

font metrics-url=arial.ttf embed-url=arial.xml
   font-triplet name=Arial style=normal weight=normal/
/font

The arial.xml file was created using the following command line:

java -cp
build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;l
ib\commons-io-1.1.jar org.apache.fop.fonts.apps.TTFReader ARIAL.TTF
arial.xml

The resulting arial.xml file starts with ?xml version=1.0
encoding=UTF-8? with no preceding characters, and is followed with a line
break and the font-metrics tag as the root.

If I comment out the font metrics for the font everything works correctly
again.

Does anyone know why I'm getting the Content is not allowed in prolog
error?

TIA,
Jeff




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