fo:table margin-left/padding-before not working with RTF

2010-04-14 Thread Glen Mazza

Hello, I'm using FOP 0.95-1.  In my RTF document I would like to pad an
entire fo:table one inch to the right.  If I apply margin-left to the
fo:table tag, it ends up padding not only the table (good) but every cell
within the table's body (bad)--they also get moved off to the right within
their cells.  (I'm not seeing this problem with PDF generation, margin-left
is properly not being inherited by child fo:table-cells.)

Is wrongful inheritance of the margin-xxx properties within RTF generation a
known issue?  I can enter a JIRA bug if helpful.  

If I try padding-before instead of margin-left, FOP complains that this
property must be ignored given that I'm using the default
border-collapse="collapsed" property; if I switch to the
border-collapse="separate", the error goes away but nothing moves off to the
right.

So in the meantime, anyone know how I can move a table in a document one
inch to the right with the RTF renderer?

Thanks,
Glen

-- 
View this message in context: 
http://old.nabble.com/fo%3Atable-margin-left-padding-before-not-working-with-RTF-tp28247941p28247941.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Problem using attributes with

2009-11-24 Thread Glen Mazza


J.Pietschmann wrote:
> 
>>
>>Hmm, Transformers can't be reused, perhaps you should get a new
>>instance here?
>>
> 

Oh, I did not know that.  Thanks for the info.


J.Pietschmann wrote:
> 
>>Another possible problem:
>> atts.addAttribute("", "", "reportId", "", "123");
> 
>>The method declaration is:
>>  addAttribute(String uri, String localName, String qName, String type,
>>String value)
> 
>>You are setting the local name to "", which may  cause hiccups.
>>Try any of the following:
>>  atts.addAttribute("", "reportId", "reportId", "", "123");
>>  atts.addAttribute(null, "reportId", "reportId", "", "123");
>>(Actually, I have no idea which one should work, may even be
>>implementation dependent).
> 

Yes, that was the problem!   Either alternative you have above fixed the
problem for me.

Thanks Joerg!

Glen
-- 
View this message in context: 
http://old.nabble.com/Problem-using-attributes-with-%3Cxsl%3Avalue-of-select%3D%22%22-%3E-tp26451537p26505563.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Problem using attributes with

2009-11-23 Thread Glen Mazza

I could use assistance here.  Given an xml such as:


   cat


My embedded FOP transformation is handling elements but not attributes. 
Here is the code as a Nabble attachment:  
http://old.nabble.com/file/p26489602/attributetest.zip attributetest.zip  --
if you have Maven on your machine, "mvn clean install exec:exec" will
quickly and easily show the problem.  Here is the code within the
attachment:

public class AttributeTest {


private void run() {
   try {
  // works fine -- both animal element and reportId attribute in pdf
  URL fileURL = getClass().getClassLoader().getResource("attr.xml");
  Source rptSource = new StreamSource(fileURL.toString());
  OutputStream outStream = new
java.io.FileOutputStream("1pdfdirect.pdf");
   
  FopFactory fopFactory = FopFactory.newInstance();
  Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, outStream);
  Result res = new SAXResult(fop.getDefaultHandler());
   
  URL stylesheetURL =
getClass().getClassLoader().getResource("AttributeTest.xsl");
  TransformerFactory factory = TransformerFactory.newInstance();
  Transformer t = factory.newTransformer(new
StreamSource(stylesheetURL.toString()));
  t.transform(rptSource, res);
  outStream.close();
  
  // does not work -- has animal element but not reportId attribute
in pdf
  Source rptSource2 = new SAXSource(new ReportXMLBuilder(), new
EmptyInputSource());
  OutputStream outStream2 = new
java.io.FileOutputStream("2pdfViaReader.pdf");

  Fop fop2 = fopFactory.newFop(MimeConstants.MIME_PDF, outStream2);
  Result res2 = new SAXResult(fop2.getDefaultHandler());
  t.transform(rptSource2, res2);
  outStream2.close();
  
  // but oddly, this *does* work -- keeps reportId attribute
  Source rptSource3 = new SAXSource(new ReportXMLBuilder(), new
EmptyInputSource());
  Transformer t2 = factory.newTransformer();  
  Result res3 = new StreamResult("3xmloutput.xml"); // has reportId
attribute
  t2.transform(rptSource3, res3);
  
   } catch (Exception e) {
  e.printStackTrace(System.out);
   }
}

// AbstractXMLBuilder is here: http://tinyurl.com/ye4c39h
public static class ReportXMLBuilder extends AbstractXMLBuilder {
   public void parse(InputSource input) throws IOException, SAXException
{
   handler.startDocument();
   AttributesImpl atts = new AttributesImpl();
   atts.addAttribute("", "", "reportId", "", "123");
   handler.startElement("report", atts);
   handler.element("animal", "cat");
   handler.endElement("report");
   handler.endDocument();
   }
}
  
...
}

Can anyone see what I'm doing wrong?

Thanks,
Glen



J.Pietschmann wrote:
> 
> Both approaches work for me (the first is the canonical one).
> 
> I suspect your original problem is somewhat different, common
> problems are misspellings, wrong context and namespace confusions.
> You might get more help if you cut&paste the actual xml and
> xslt code into the mail.
> 
> J.Pietschmann
> 

-- 
View this message in context: 
http://old.nabble.com/Problem-using-attributes-with-%3Cxsl%3Avalue-of-select%3D%22%22-%3E-tp26451537p26489602.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Problem using attributes with

2009-11-23 Thread Glen Mazza

Thanks, Joerg--it turns out using Fop command line (Fop -xml ... -xsl ...
-pdf ...) attributes and elements 
copy over perfectly.  It's just within my Java program that I can get only
elements.  I'll need to look more into this issue.

Glen


J.Pietschmann wrote:
> 
> Both approaches work for me (the first is the canonical one).
> 
> I suspect your original problem is somewhat different, common
> problems are misspellings, wrong context and namespace confusions.
> You might get more help if you cut&paste the actual xml and
> xslt code into the mail.
> 
> J.Pietschmann
> 

-- 
View this message in context: 
http://old.nabble.com/Problem-using-attributes-with-%3Cxsl%3Avalue-of-select%3D%22%22-%3E-tp26451537p26488126.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Problem using attributes with

2009-11-20 Thread Glen Mazza

Hello, I'm having difficulty getting  to work with
attributes--it must be something obvious but I can't figure out the problem. 
(I'm using FOP 0.95-1.)

For this XML snippet:


   dog
   cat
...

and this XSL template:

  
  
  
  
  
  
  
   

I can get aaa and bbb to output but I cannot get myattval to appear.  I
would think the first and second would be correct, but none of the four
attempts above are working for myattval.  Can anybody see what I'm doing
wrong?

Thanks,
Glen

-- 
View this message in context: 
http://old.nabble.com/Problem-using-attributes-with-%3Cxsl%3Avalue-of-select%3D%22%22-%3E-tp26451537p26451537.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Maven repo for FOP 0.95?

2009-01-24 Thread Glen Mazza

Never mind--found it.  It's here:
http://repo1.maven.org/maven2/org/apache/xmlgraphics/fop/

It might be nice on the website, perhaps on the "Ant Task" page under "Using
FOP" for each version, if you give the dependency and repository snippets
for using FOP w/Maven, and then rename the page to "Ant/Maven Use" or
similar.

Glen


Glen Mazza wrote:
> 
> Hello, I can't find the Maven Repository for FOP 0.95--the most up-to-date
> I see[1] is for FOP 0.93.  Does anyone know of a repository for the latest
> release version?  I can type up a JIRA item if one is needed for this.
> 
> Thanks,
> Glen
> 
> [1] http://repo1.maven.org/maven2/fop/fop/
> 

-- 
View this message in context: 
http://www.nabble.com/Maven-repo-for-FOP-0.95--tp21645280p21645338.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Maven repo for FOP 0.95?

2009-01-24 Thread Glen Mazza

Hello, I can't find the Maven Repository for FOP 0.95--the most up-to-date I
see[1] is for FOP 0.93.  Does anyone know of a repository for the latest
release version?  I can type up a JIRA item if one is needed for this.

Thanks,
Glen

[1] http://repo1.maven.org/maven2/fop/fop/
-- 
View this message in context: 
http://www.nabble.com/Maven-repo-for-FOP-0.95--tp21645280p21645280.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



[ANNOUNCE] Warthog Reports Framework 1.0 now available

2007-11-21 Thread Glen Mazza

Hello All,

I created a Google Code open-source (Apache license) framework to help with
querying and production of multiple SQL->XML->XSL-FO->PDF reports in a
servlet environment.  It uses FOP 0.93 internally.  It is here[1] in case it
can help anyone, and [2] provides more information on the framework.

Regards,
Glen

[1] http://code.google.com/p/warthog/
[2] http://www.jroller.com/gmazza/date/20071121

-- 
View this message in context: 
http://www.nabble.com/-ANNOUNCE--Warthog-Reports-Framework-1.0-now-available-tf4853236.html#a13887602
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Article for using FOP in a Web Service

2007-11-03 Thread Glen Mazza

Hello,

I recently figured out how to use FOP as part of a web service that returns
PDF documents.  In case this might be of help to others who would like to do
something similar, I have blogged it here:  
http://www.jroller.com/gmazza/date/20071102

Regards,
Glen




-- 
View this message in context: 
http://www.nabble.com/Article-for-using-FOP-in-a-Web-Service-tf4742505.html#a13561699
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: FOP supports the Japanese characters?

2007-01-18 Thread Glen Mazza
FOP handles Roomaji very well.  For the other writing scripts, possible 
sources of help are:


http://www.javaworld.com/javaworld/jw-03-2005/jw-0328-xmlprinting.html
http://www.terra-intl.com/tetsuya/2005/11/forrest_japanese.html
http://marc.theaimsgroup.com/?l=fop-user&w=2&r=1&s=japanese&q=b

Glen


Hai-Fun Wu wrote:


Hello, I have a Japanese FO file (attached) generated by 
javax.xml.transform.Transformer.  It looks like encoded correctly 
(UTF-8).  I ran it through FOP ("FOP test-japanese.fo 
test-japanese.pdf") and the result Japanese characters in PDF file were 
not displayed correctly in my Adobe Acrobat.  It is possible that my 
Adobe Acrobat might not configure correctly.  I was also wondering if 
you know FOP supports the Japanese characters.


Thanks in advance,
Hai-Fun Wu



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



Re: Running FOP as a Java Stored Procedure on Oracle

2007-01-15 Thread Glen Mazza

Perhaps this would be a good skeleton for what you want to do:
http://www.renderx.com/support/oracle.html

Of course, the Java API between FOP and RenderX are different and will 
need changing, etc.  But the basic principle should be the same.


HTH,
Glen

Luciano Belotto wrote:


I use Apache FOP to turn xml into PDF using an xsl.

 

I wish to have this functionality run on the Oracle database as a Java 
stored procedure. What I want to ask is that if anyone has done this 
before, and can pass along some info or where I could find information 
on doing this. I’ve searched mailing list archives and the web, I 
couldn’t find anything specific to loading FOP on Oracle, just on 
loading Java classes in general on the database. I’d like any tips on 
FOP in specific, if it has been done before.


 




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



Re: fo:table-row is missing child elements

2007-01-02 Thread Glen Mazza
The other FO compilers don't validate by default.  Unfortunately, strict 
validation, because it contains the word "strict", has connotations of 
meanness that companies want to avoid.  But again, there are scenarios 
where strict validation is actually the "nicer" route for a user[1]--it 
can save a lot of inadvertent errors from going out.


Glen

[1] http://marc.theaimsgroup.com/?l=fop-dev&m=111365780207108&w=2


[EMAIL PROTECTED] wrote:


Yes, it is the Docbook-XSL-Stylesheet 1.71.1 which causes this error.

But strange to say using -r-mode a xml-file is created by FOP with the 
Docbook-XSL very well another one using the same Docbook-XSL and -r-mode 
causes the "fo:table-row is missing child elements"-error. It's all very 
confusing me.


Regards,
Leeloo

*/Glen Mazza <[EMAIL PROTECTED]>/* schrieb:

Hmmm...judging from your email address, I hope it is not a docbook
stylesheet that is requiring you to run in "-r" mode. I would send a
bug report to the OASIS docbook team if it is.

Glen


[EMAIL PROTECTED] wrote:

 > Hi Glen,
 >
 > running FOP 0.92beta with the option
 >
 > -r relaxed/less strict validation (where available)
 >
 > now generates a PDF without the error described below :-)))
 >
 > Thanks and happy new year.
 >
 > Best Regards,
 > Leeloo
 >
 > */Glen Mazza /* schrieb:
 >
 > [EMAIL PROTECTED] escribió:
 >
 > > Trying to convert an FO-File which was generated by FOP 0.92beta
 > to an
 > > PDF just stopped with following Error Message:
 > > javax.xml.transform.TransformerException:
 > > org.apache.fop.fo.ValidationException:
file:///test/test.fo:1:43655:
 > > Error(1/43655): fo:table-row is missing child elements.
 > > Required Content Model: (table-cell+)
 > >
 >
 > Process of elimination is probably best here: keep minimizing your FO
 > file until you identify the element causing the error to occur.
 >
 > There is also an option I believe in FOP 0.93 to run in non-strict
 > validation mode, which would I believe would accept the situation
that
 > is occurring for you.
 >
 > > I can't find any fo:table-row in FO-File which missed a
 > fo:table-cell. I
 > > think everything is alright. Using FOP 0.20.5 converting the XML
 > to PDF
 > > -> it works fine.
 > >
 >
 > The new FOP raises an error by default, as protection in case you
 > goofed
 > up your XSLT template calls and ended up creating no cells where you
 > actually wanted some. This way erroneously created invoices with no
 > rows, for example, won't end up going out to the customer, or if you
 > create a 250 page document you don't have to manually read each page
 > just to make sure every table has the rows you intended.
 >
 > Glen
 >
 > -
 > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > For additional commands, e-mail:
[EMAIL PROTECTED]
 >
 >
 > __
 > Do You Yahoo!?
 > Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden
Schutz
 > gegen Massenmails.
 > http://mail.yahoo.com
 >


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


__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz 
gegen Massenmails.

http://mail.yahoo.com




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



Re: fo:table-row is missing child elements

2007-01-02 Thread Glen Mazza
Hmmm...judging from your email address, I hope it is not a docbook 
stylesheet that is requiring you to run in "-r" mode.  I would send a 
bug report to the OASIS docbook team if it is.


Glen


[EMAIL PROTECTED] wrote:


Hi Glen,

running FOP 0.92beta with the option

-r  relaxed/less strict validation (where available)

now generates a PDF without the error described below :-)))

Thanks and happy new year.

Best Regards,
Leeloo

*/Glen Mazza <[EMAIL PROTECTED]>/* schrieb:

[EMAIL PROTECTED] escribió:

 > Trying to convert an FO-File which was generated by FOP 0.92beta
to an
 > PDF just stopped with following Error Message:
 > javax.xml.transform.TransformerException:
 > org.apache.fop.fo.ValidationException: file:///test/test.fo:1:43655:
 > Error(1/43655): fo:table-row is missing child elements.
 > Required Content Model: (table-cell+)
 >

Process of elimination is probably best here: keep minimizing your FO
file until you identify the element causing the error to occur.

There is also an option I believe in FOP 0.93 to run in non-strict
validation mode, which would I believe would accept the situation that
is occurring for you.

 > I can't find any fo:table-row in FO-File which missed a
fo:table-cell. I
 > think everything is alright. Using FOP 0.20.5 converting the XML
to PDF
 > -> it works fine.
 >

The new FOP raises an error by default, as protection in case you
goofed
up your XSLT template calls and ended up creating no cells where you
actually wanted some. This way erroneously created invoices with no
rows, for example, won't end up going out to the customer, or if you
create a 250 page document you don't have to manually read each page
just to make sure every table has the rows you intended.

Glen

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


__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz 
gegen Massenmails.

http://mail.yahoo.com




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



Re: fo:table-row is missing child elements

2006-12-21 Thread Glen Mazza

[EMAIL PROTECTED] escribió:

Trying to convert an FO-File which was generated by FOP 0.92beta to an 
PDF just stopped with following Error Message:
javax.xml.transform.TransformerException: 
org.apache.fop.fo.ValidationException: file:///test/test.fo:1:43655: 
Error(1/43655): fo:table-row is missing child elements.

Required Content Model: (table-cell+)



Process of elimination is probably best here:  keep minimizing your FO 
file until you identify the element causing the error to occur.


There is also an option I believe in FOP 0.93 to run in non-strict 
validation mode, which would I believe would accept the situation that 
is occurring for you.


I can't find any fo:table-row in FO-File which missed a fo:table-cell. I 
think everything is alright. Using FOP 0.20.5 converting the XML to PDF 
-> it works fine.




The new FOP raises an error by default, as protection in case you goofed 
up your XSLT template calls and ended up creating no cells where you 
actually wanted some.  This way erroneously created invoices with no 
rows, for example, won't end up going out to the customer, or if you 
create a 250 page document you don't have to manually read each page 
just to make sure every table has the rows you intended.


Glen

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



Re: How to process xhtml form data into pdf document?

2006-11-01 Thread Glen Mazza
Oh, by the way, you want to ask these types of questions on 
fop-users@xmlgraphics.apache.org, *many* more users there.


Glen

Glen Mazza wrote:

Jeremias provided a solution[1] to a similar question I had.  Also, I 
wonder if XForms might be a better option for you--there are some open 
source server-side solutions you might want to look at[2].  (However, 
I have not yet used XForms myself so am unsure here.)


Glen

[1] http://marc.theaimsgroup.com/?l=fop-user&m=108136796216447&w=2
[2] http://en.wikipedia.org/wiki/XForms#Software_support


Nielsen, Michael wrote:


Hi there

Im new to FOP and I have been searching the web for hours now trying to
find a solution the the following challenge:

I have an XHTML file that consists of a scanned gif file and some html
form fields that are positioned on the xhtml file using css where the
positioning of of the fields are described. So if you open the xhtml
file you can enter data directly.

My challege is how to transform this into xsl:fo?? I have tried to make
a block use the image gif as background and render text on top of it but
no luck. Only the part of the image that has text on it is shown. What i
need is the full form image to be shown and then render the html form
data on top of it in the correct positions.
I have also tried to use the external-graphics tag to render the image
but then I cant position data on top of it ;(.

So:

1) Whats the best solution for rendering the full image and position
data on top of it?
2) How to position data on top of the image file?

Thanx in advance!

/Regards Michael


This message contains information that may be privileged or 
confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not 
the intended recipient,  you are not authorized to read, print, 
retain, copy, disseminate,  distribute, or use this message or any 
part thereof. If you receive this  message in error, please notify 
the sender immediately and delete all  copies of this message.


 




-
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
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: How to make "directives" look better? Customizing/defining elements and formatting...

2006-10-19 Thread Glen Mazza

Jay Bryant wrote:


Hi, Dan,

That's either not DocBook or it's a customization of it.

You can achieve the same look by writing a transform that turns those 
elements into standard Docbook and then styling the DocBook output 
accordingly.


For now, remember that DocBook contains content. You'll do the styling 
when you run the DocBook XSL stylesheets to generate FO content for 
FOP. So, once you have the content in DocBook, you want to look at 
customizing the styling layer.


THE book on the subject is Bob Stayton's DocBook XSL.



Here's a link to it:  http://www.sagehill.net/docbookxsl/index.html

Glen


Keep asking questions and showing us your code.

Jay Bryant
Bryant Communication Services




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



Re: fop with oc4j

2006-10-16 Thread Glen Mazza

On 16.10.2006 14:26:51 Onur Senturk wrote:


hi, i'm trying to use fop with oc4j but i think the xml parsers are
conflicting. when i try to use xerces, the application doesn't start. When i
use the xml parser of the oc4j, i cannot make fop work.
what should i do? does anyone have an idea? thanks.

   



Hi Onur, I converted a FOP-based web app from Tomcat to Oracle App 
Server a few months back.  Yes, you will need to switch to the Apache 
XML libraries, but you will also probably need to temporarily activate 
OAS classloader logging to try to figure out what the loading problem is 
("the application doesn't start" problem you mentioned above.)  Every 
application is different, and all have their initial installation 
headaches.  (It turned out for me, for example, that I was missing 
commons-logging.jar, but the *only* way I could figure that out was by 
running OAS classloader logging and viewing the log files.)  If this 
doesn't work, and you're desperate, another piece of advice I can offer 
is to *greatly* simplify your webapp--deploy a skeleton of it--and 
incrementally put more into it, using process of elimination to 
determine at what point the webapp fails.  I gave links to information 
about OAS classloader logging and switching parsing libraries in a blog 
entry below:


http://jroller.com/page/gmazza?entry=migrating_spring_based_webapp_from

Glen


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



Re: Barcodes in fop 0.92 - Batik

2006-10-09 Thread Glen Mazza

Richard King wrote:


Heya,
What I'm doing is trying to implement a barcode via barcode4j.


Oh!  This is a Jeremias question then.  My knowledge of barcodes is 
limited to finding them on products so I can use the self-serve checkout 
at the grocery store.


I did not realize that the  was generated from the barcode 
program and not from your code.




Full FATAL:
09-Oct-2006 17:47:52 org.apache.fop.fo.FONode attributeWarning
WARNING: Warning(Unknown location): fo:table, table-layout="auto" is currently n
ot supported by FOP
09-Oct-2006 17:47:52 org.apache.fop.fo.FONode attributeWarning
WARNING: Warning(Unknown location): fo:table, table-layout="auto" is currently n
ot supported by FOP


Still, leaving aside the barcode error, I would place a 
table-layout="fixed" to get rid of this error.  (Note I believe you will 
need to also subsequently give table-column widths as a result.  Google 
on fo:table for a billion examples.)  It *might* be related to the 
barcode error you are getting, if the barcode program uses table 
dimensions to determine the width attribute.


Glen


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



Re: Barcodes in fop 0.92 - Batik

2006-10-09 Thread Glen Mazza

Richard King wrote:


Thanks for that.  I appreciate it and the jar looks good.

Downloaded and updated my jar ... unfortunately now have a new problem!

Running the fop.bat or via java I get a FATAL.  The message of concern I 
believe is:
"The attribute "width" of the element  is required"



Ummm, just to confirm, you *do* have a "width" attribute on that 
, right?  I want to make sure that this is not an EBKAC problem.


Glen

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



Re: conversion of xml data to pdf

2006-10-08 Thread Glen Mazza

Andreas L Delmelle wrote:


On Oct 8, 2006, at 15:45, Andreas L Delmelle wrote:



It appears that either these bugs simply get ignored by Oracle (*),  
or no-one takes the time to file them and supply the Oracle-devs  
with the information they really need to address these problems.



It just occurred to me: to make sure which of the two options applies  
here, maybe someone can test this with Oracle 10g and see if the bug  
is still present in that release. Maybe it has already been fixed,  
but not in Oracle 9...





Been there, done that with Oracle 10.1.3, Oracle XML-parsing bugs still 
exist there too.  The main solution, which worked well for me, is to 
switch to the Apache Xerces libraries[1].


Glen

[1] 
http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14433/classload.htm#CIHFJEEF



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



Re: node() and text() problem

2006-10-02 Thread Glen Mazza
This issue does not appear to be XSL-related, and I am not certain it is 
even XSLT related.  Perhaps the XML-DEV mailing list could be of 
help--be sure to give more background information over which 
XML-processing technology you are using.  Also note your "My problem" 
sentence below is missing several words.


Glen

fabio76 wrote:


I have a file test.xml as this :

test 1a child 1bchild 2child 2btest 2a 



My problem is the same :How can I read the text of node   before node , then
apply node  , and then continue with the text of element   ?

In my example :

test 1a

apply-node b and his child

test 2a

Best regards
Fabio
 




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



Detecting page breaks (Was Re: Creating FO DOM directly)

2006-09-28 Thread Glen Mazza

Shubhrata Tewari wrote:


Hi,



Greetings.  Be careful not to hijack threads (i.e., remember to change 
the subject title in your email to help with searching the mailing list 
archives.)


Is it possible using xslt and xsl:fo to detect a page break? 


No, not XSLT (xsl: namespace) because that happens before FOP starts 
working.  FOP determines page breaks after the XSLT transformations are 
complete.


As for XSL-FO (fo: namespace)...

basically I 
am using a for-each, and I want to show some data in the first row

of a page whenever a new page begins.
Any ideas?



Again, your xsl:for-each has dissolved and disappeared before FOP ever 
activates.


If the data is constant ("Hi!  Welcome to India!") then just place it in 
the fo:static-content with region xsl-region-start.


If the data is dynamic and based on the contents of the page (for 
example, the first and last words on the page of a glossary or 
dictionary) then the fo:marker and fo:retrieve-marker is what you will 
need.  Google on those two fo's for countless examples.


If you would like running subtotals of financial data, Joerg gave a 
solution[1] a while back.


Glen

[1] http://marc.theaimsgroup.com/?l=fop-user&m=109035492329917&w=2


shubhrata, India



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



Re: Creating FO DOM directly

2006-09-27 Thread Glen Mazza

Lars Ivar Igesund wrote:

I need to create PDF from the information contained in some Java objects. The 
standard way to do this according to the FOP docs, is to create XML from the 
objects, then transform to XSL-FO using XSLT.


 



Yes.  Learning XSLT (like Ant) is Time Very Well Spent.

But since there are FO DOM nodes internally in FOP, it seems to me to be a 
natural alternative to create these nodes directly instead of going via XML + 
XSLT.
 



I placed in such an example a few years back into our 
{fop-dist}/examples/ directory, back in my ultra-newbie days.  It's 
quite hideous, but here it is:  [1].  (Unfortunately, with the switch of 
FOP's repository from CVS to SVN, we apparently have lost this deleted 
file, but it remains in our CVS mailing list archives.)


[1] http://marc.theaimsgroup.com/?l=fop-cvs&m=106081657102191&w=2


Is this possible, and how would I go about processing the tree?

 



See above, but really look at these examples[2] for the XSLT & SAX-based 
way of processing.  This will prove much easier for you.


[2] 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/


Glen


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



Re: xml to pdf converstion(generic xsl-fo)

2006-09-18 Thread Glen Mazza
I would recommend using XSLT to do the transformations that you need.  
Unfortunately you will need to learn XSLT first before you can use it.  
Check the Xalan website for more details.  The Mulberry XSLT mailing 
list (google) is best for specific questions you may have.


Glen

vijay wrote:

Hi 


This is urgent requirement for our project.we are in need of urgent solution
for the problem , i am explaning below:

1.i need solution for the conversion of xml to PDF using XSL-fo.Because we
are using fo concepts, it's specific to xsl-fo.

My system is generating xml file. The generated xml file needs to be
converted to PDF file.Example: 



  
   

   
   
   


  
   

   
   
   



I have to convert this xml file to pdf format. in pdf  c1,c2,c3,c4 values
should be  print in table  coloumns and rows 



so my output will be in table 



 c1  c2  c3  c4
 aa  bb  cc  dd
 zz  xx  vv  nn


The main problem is i have to write generic xsl-fo  that will converts any
xml into pdf 




kindly do reply asap .i would be greateful and obliged..

Thanks in advance
 




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



Re: How to get the text be flowed to the next column

2006-09-14 Thread Glen Mazza

Susanta Dash wrote:


Hey guys, I can't wait for XSL-FO 1.1 and can't see any alternative. Can you
guys just guide me to accomplish my need; I'm trying to get the exact point
where to break the text, so that I can just move the rest of the text to the
next column. I'm thinking to use AWT renderer and pick the font metrics by
using Rectangle2D and JPEGEncoder, etc. etc. Now, what I'm afraid of is, the
co-ordinates I'll generate from this, will it be the same or will be fit for
FOP or Can I use some FOP thing that helps me doing this?

Thanks.

 



Sorry, I personally cannot help or advise you at this stage--this goes 
well beyond my capabilities.


Glen

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



Re: How to get the text be flowed to the next column

2006-09-13 Thread Glen Mazza
Susanta,  I think you're a victim of your earlier thread-hijacking, 
check this post:

http://marc.theaimsgroup.com/?l=fop-user&m=115812992904817&w=2

Basically, I believe the reason why you are using tables is because XSL 
1.0 does not provided the advanced layout functionality you want with 
respect to regions and page flow (because it just has 
fo:simple-page-master), so you are hoping to accomplish with tables what 
you can't do with pages/regions.  Problem is, if the XSL Working group 
would have defined this layout for tables (which would be an odd use 
case here), they would probably have first done it for pages/regions anyway.


The fo:flow-map/multiple fo:flow of XSL 1.1 (not yet implemented in FOP) 
might help you, as the link above states; in addition, I think the XSL 
WG will eventually create an fo:page-master that will also have the 
advanced layout missing from fo:simple-page-master.


Glen


Susanta Dash wrote:


Hey guys,
 
Are we on the same page yet? OR Am I making any mistake to understand 
how to layout this problem OR this feature is missing entirely or in 
the build I'm using(0.20.5)?
 
Thanks.
On 9/13/06, *Susanta Dash* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


Glen,

Actually i've a paragraph(s) of text, ABC was just an example.
Like in my
previous example i had 2 paragraphs and to be fit in 2 different
rows each.
It's not at all a problem if i have same number of columns in each
row, but
variable column count is an issue.

Thanks.

    -----Original Message-
From: Glen Mazza [mailto: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>]
Sent: Wednesday, September 13, 2006 12:03 AM
To: fop-users@xmlgraphics.apache.org
<mailto:fop-users@xmlgraphics.apache.org>
Subject: Re: How to get the text be flowed to the next column


Susanta Dash wrote:

>
> Here is the problem I'm facing while rendering it in FOP.
> I've two rows, first one has 3 columns and the next has 2
columns. The
> text within these rows need to be flowed to the next column.

Why wouldn't having one column for each row and letting the text flow
normally solve what you need?  What would be lost if you did that?

> Like for
> example: I've ABC as text, in this scenario I want the text to be
> arranged as A in column1, B in column2 and C in column3. The
same thing
> for the second row.

Are there spaces between "ABC"?  I'm having difficulty
generalizing what
you want.  What if you had "The person is in the room" as text--which
words would you want in each column?  Also, what justification
would you
want for the text in each column?

Glen


> I tried to arrange the text below, hope it's viewable:
>
> 
> | A | B | C |
> 
> |  X   |  Y  |
> 
>
> I also tried to set column-count in  at page level,
> where i can set either to 2 or 3, which is not helpful.
>
> Suggestions are highly appreciated.
>
> Thanks.
>
> Susant.
>

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





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



Re: How to get the text be flowed to the next column

2006-09-12 Thread Glen Mazza

Susanta Dash wrote:



Here is the problem I'm facing while rendering it in FOP.
I've two rows, first one has 3 columns and the next has 2 columns. The 
text within these rows need to be flowed to the next column. 


Why wouldn't having one column for each row and letting the text flow 
normally solve what you need?  What would be lost if you did that?


Like for 
example: I've ABC as text, in this scenario I want the text to be 
arranged as A in column1, B in column2 and C in column3. The same thing 
for the second row.


Are there spaces between "ABC"?  I'm having difficulty generalizing what 
you want.  What if you had "The person is in the room" as text--which 
words would you want in each column?  Also, what justification would you 
want for the text in each column?


Glen



I tried to arrange the text below, hope it's viewable:


| A | B | C |

|  X   |  Y  |


I also tried to set column-count in  at page level, 
where i can set either to 2 or 3, which is not helpful.


Suggestions are highly appreciated.

Thanks.

Susant.



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



Re: docbook-xsl Stylesheets packaged in a WAR

2006-09-12 Thread Glen Mazza

Don Adams wrote:


Hello,

Has anyone successfully packaged the docbook-xsl stylesheets
into a WAR and used them with JAXP?
 



I'm unsure what the relevance of the WAR file to your problem is.  Upon 
deployment, wouldn't the servlet container expand the WAR file into its 
various folders and files anyway?  So it would appear that your problem 
would be happening regardless of whether or not the files originally 
came from a WAR file.


Glen


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



Re: formatting tables

2006-09-06 Thread Glen Mazza

paul wrote:


Hello

I'm trying to format a table, and it would be useful to apply formats like
padding, background-color to entire rows or columns (which, according to my
book, should be possible). If I try to do so, nothing happens. I always have to
set these attributes in the individual cells of the table, which I find a bit
tedious and fumbly.


Speaking generally, if there are properties that are not working row- or 
column-level in FOP, requiring tedious cell-level usage, sometimes a 
solution is to rely on XSLT to simplify your work.  Two options are XSLT 
attribute sets and calling templates.


Frank Neugebauer's article, "Modularize Formatting Objects", linked 
here[1] (with other XSL links you may find useful), is probably one of 
the best articles to read for this purpose.


Glen

[1] http://del.icio.us/gmazza/xsl

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



Re: number-page-citation math...

2006-09-01 Thread Glen Mazza
Just my $0.02, but I dislike usage of the deprecated "XSL-FO".  The 
difference between "XSL" and "XSLT" are pretty well-understood today.


Glen

Jeremias Maerki wrote:

XSL-FO doesn't provide anything that would let you do that. 

 




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



Re: PDF Destinations

2006-08-25 Thread Glen Mazza
I agree with you too, the apparent RX/AH method of creating a 
destination for all "id"s seems very inefficient, possibly creating even 
security issues (theoretically, if one uses an id like an SSN next to 
the text giving data on a person but *without* the intention of the ID 
getting into the output PDF document, then mydoc.pdf#someSSN will open 
the document to the person's name.)  Also, AFAIK the XSL 1.1 Rec does 
not mandate us doing this for "id" anyway.  So having a fox:destination 
*property* in 0.9x instead of a fox:destination FO seems like a better idea.


Glen

Jeremias Maerki wrote:


Agreed, an extension property would be better than fox:destination, but
creating a destination for all "id" attributes doesn't sound ideal to me.

On 25.08.2006 16:11:34 Glen Mazza wrote:
 

I would prefer avoiding the use of fox:destination, as the XSL WG did 
not see a need for a separate FO for this when they placed bookmarks 
into 1.1.  Instead, I think it would be better to implement it the way 
the commercial processors handle them, which is I believe is relying 
either on the id on the element to be anchored or another property 
[1][2][3].  Relying on a property instead of a new FO would probably be 
easier/cleaner than introducing fox:destination back to the source code 
anyway, as there would be no XSL document validation issues to be 
checking for.


Glen

[1] http://sourceware.org/ml/docbook-apps/2005-q2/msg00214.html
[2] http://www.oasis-open.org/archives/docbook-apps/200602/msg00174.html
[3] http://sourceware.org/ml/docbook-apps/2005-q2/msg00216.html

Jeremias Maerki wrote:

   


Indeed, we had fox:destination in FOP 0.20.5 but this has not been
reimplemented, yet. Contributions are welcome as always. If you need
pointers, we're always eager to provide those to get you started.

On 24.08.2006 09:59:52 andyrob_24_7 wrote:


 


Is there a way to achieve destinations in a pdf (so you can link to a certain 
page), in FOP?

It seems this is not yet in 0.92?
   




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: PDF Destinations

2006-08-25 Thread Glen Mazza
I would prefer avoiding the use of fox:destination, as the XSL WG did 
not see a need for a separate FO for this when they placed bookmarks 
into 1.1.  Instead, I think it would be better to implement it the way 
the commercial processors handle them, which is I believe is relying 
either on the id on the element to be anchored or another property 
[1][2][3].  Relying on a property instead of a new FO would probably be 
easier/cleaner than introducing fox:destination back to the source code 
anyway, as there would be no XSL document validation issues to be 
checking for.


Glen

[1] http://sourceware.org/ml/docbook-apps/2005-q2/msg00214.html
[2] http://www.oasis-open.org/archives/docbook-apps/200602/msg00174.html
[3] http://sourceware.org/ml/docbook-apps/2005-q2/msg00216.html

Jeremias Maerki wrote:


Indeed, we had fox:destination in FOP 0.20.5 but this has not been
reimplemented, yet. Contributions are welcome as always. If you need
pointers, we're always eager to provide those to get you started.

On 24.08.2006 09:59:52 andyrob_24_7 wrote:
 


Is there a way to achieve destinations in a pdf (so you can link to a certain 
page), in FOP?

It seems this is not yet in 0.92?
   





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: [Poll] Expectations regarding side-floats

2006-08-11 Thread Glen Mazza
Vincent, in considering this, you may wish to also keep in mind:  what 
do you see as the usage difference between side-floats and the 
xsl:region-start and xsl:region-end regions?  I mention this, just to 
make sure that use cases actually intended for side regions do not move 
into side-floats, and vice-versa.


Glen

Vincent Hennebert wrote:


Dear Fop users,

I'm currently thinking about the implementation of side-floats
() into Fop. It turns out that there is a
choice to make between several design decisions which imply different
behaviors regarding the placement of floats on the page.

To help me make a decision, I'd like to know which usage you would make
of side-floats: on a general manner, what sort of typographic material
would you typeset using side-floats? Particular things of which we don't
think in the first place?

More specifically, as the XSL-FO recommendation allows some freedom in
these areas:
- would you expect a side-float being placed on another page than its
 anchor? Would you prefer the whole chunk of text to be deferred on the
 following page?
- would you expect a side-float being split on several pages?
- would you expect different layouts, depending on whether a set of
 side-floats would be placed on the middle of a page or at the bottom
 (thus, with some of them on the current page and the others on the
 following page)?



Any comments, remarks, hints of all sort would be welcome.

Thanks,
Vincent

-
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: User Types

2006-08-09 Thread Glen Mazza

We use XSL/XSLT for reports and for Docbook.

Docbook:  Tech Writer creates the XML documents that will be fed through 
the Docbook stylesheets.  Uses Eclipse WTP for this.  The developer 
creates an Ant script that automates all of the tech writer's doc 
generation and publishing-to-web-server tasks so the writer only needs 
to know how to call Ant tasks from the script for these chores.  (Over 
time, our tech writer has also learned to modify and add new tasks in.)


Docbook Maintenance:  Tech Writer enters the documentation changes 
(after getting information from developers) and republishes them via Ant 
scripts.


XSL/XSLT Reports:  Very nice separation of data from presentation 
chores.  Developer first defines the input format of the XML document 
that will have the report's data.  The tech writer creates the 
stylesheet that will layout the report, usually leveraging previously 
created stylesheets, and also creates sample XML documents with dummy 
data for testing the stylesheets.  Tech writer also maintains any header 
stylesheets that will be imported by multiple document stylesheets.  
Developer creates the SQL, SAX Event generation, etc. that generate the 
XML document.


For a non-programming tech writer, XSLT coding presents a pleasantly 
not-very-steep but continuous learning curve--simple stuff can be done 
without any training at all (i.e., change the title in an already 
existing document from FOO to BAR -- anyone with a text editor can S & R 
on FOO to do this without needing to know a thing about XSLT) with more 
complex tasks (XSLT templates and functions and the like) gradually 
added in over time.


XSL/XSLT Reports Maintenance:  Tech Writer is responsible for making 
stylesheet/reports look "nice" and presentation/layout change requests, 
developer is responsible for bringing in new/different data elements 
from the SQL, as well as overall maintenance of the web application.


The main thing when doing Docbook and XSL/XSLT in production, especially 
with non-programming employees is:  Ant, Ant, Ant!  Keep everything 
automated and defined (classpaths, working directories, web servers to 
FTP to, etc.) within Ant and outside local IDEs/computer environment 
variables.  (Among other benefits, if some developers prefer this IDE 
and others another IDE, it won't matter, because everything is 
configured within the Ant build file.)  The second most important thing 
is CVS/SVN, CVS/SVN, CVS/SVN!  Eclipse makes it easy to immediately 
commit new changes.


Glen

[EMAIL PROTECTED] wrote:


I'd be interested to know what types of people are using the FOP engine to 
generate documents.

Could you indicate whether your setup has a dedicated programmer, or team of 
programmers, individual author, technical author etc.

Does the same person who writes the content setup your FOP transformations.

thanks

Andy R

--
This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
http://www.opensubscriber.com/messages/fop-users@xmlgraphics.apache.org/topic.html

-
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: PDF generation

2006-08-09 Thread Glen Mazza
Probably obvious, but I'm assuming you mean you used "force-page-count" 
and not "forcae..."


Glen

Remo Liechti wrote:


Hi Chris
Thanks a lot for the answers.

I think the only problem I have now is to pass the parameters to the XSL
document.

Fop -xsl C:\xsl\fo\docbook.xsl -xml "myDocBook.xml" -pdf "myPdf.pdf"

How do I pass this parameter forcae-page-count="no-force". To this xsl?
I Tried a lot of ways, nothing worked... like:

Fop -xsl C:\xsl\fo\docbook.xsl forcae-page-count="no-force" -xml
"myDocBook.xml" -pdf "myPdf.pdf"


Any idea?

Remo




-Original Message-
From: Chris Bowditch [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 9. August 2006 15:18

To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation

Remo Liechti wrote:
 


Hi all
I'm new to XSL and FOP and all that stuff. I need to create a PDF out
   


of
 


a docbook. My docbook looks like:



myTitle




chapter one
text text text



I run FOP like this:
Fop -xsl C:\xsl\fo\docbook.xsl -xml "myDocBook.xml" -pdf "myPdf.pdf"

It creates a PDF like this(I attached it to this mail):

- First page with the title -> This is ok
- Page 2: title again, but small. Nothing more on the page. -> not ok!
- page 3: Just empty. Why's that? -> NOT OK
- page 4: The index of the book -> NICE!
- page 5: My Text -> ok


My questions are:

1. How do tell the XSL to not create the page 2 with the small title
   


and
 


not to create an empty page?
   



The empty page 3 might be because the attribute force-page-count="auto" 
is present on the page-sequence. This needs to 
forcae-page-count="no-force". I've no idea how to do that in Docbook. I 
also don't know why the 2nd page appears. Have you asked these questions


on the docbook forum too?

 


2. How do I tell the XSL to create Bookmarks in the PDF?
   



I know how to do this in raw XSL-FO, again no idea how in docbook XML, 
sorry! The exact method used to creating bookmarks is different 
depending on which version of FOP you are using?


 


3. How Do I create header and footer for this document? (I think this
   


is
 


a docbook issue). But the header and footer should not appear on the
first page as well as not on the index page.
   



This is possible using raw XSL-FO constructs, but I don't know how to do

it in docbook XML.

Sorry I can't help you more, but I get the feeling most of yopur 
questions would be better suited on a docbook mailing list.


Chris




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

This message may contain legally privileged or confidential information and is 
therefore addressed to the named persons only. The recipient should inform the 
sender and delete this message, if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity and punctuality of 
this message. The sender has activated an automatic virus scanning, but does 
not guarantee the virus free transmission of this message.

-
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: marker value to variable [SOLVED]

2006-07-19 Thread Glen Mazza
*Very* impressive and clean solution, Andreas.  I wish I could have 
thought of that.


Glen

pat wrote:

YES !!! That's it !!! That's the way :-)

My problem was that I firstly counted the summary and then I've try to split
the fraction instead firstly count the integer and fraction and then only
disply them.

Thanks a lot !!!

 Pat

On Wed, 19 Jul 2006 18:26:22 +0200, Andreas L Delmelle wrote


On Jul 19, 2006, at 17:16, Andreas L Delmelle wrote:



To illustrate what I mean (untested, but seems OK, for positive  
numbers at least... gotta leave some to you ;)):



  
  
  

  

  


  

  


and then


  
  ...
integer part is 

fractional part is 0.

  ...


No?

IOW: don't focus *too* much on retrieve-marker alone, perform both  
sum and separation *before* creating the markers.
Plus the usual completions, of course, like 'take care of floor();  
for negative numbers use ceiling() to obtain the integer part' and  
'take the absolute value of the fractional part'...


HTH!

Cheers,

Andreas

-
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]





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



Re: marker value to variable

2006-07-19 Thread Glen Mazza

pat wrote:


Hi,

Well, the template is for kind of "bill" for Czech postal service and they
require to split payment to integer part and the fraction (don't ask me why).

 



Yes, the Czech postal service is a constant source of problems on this 
ML.   ;-)



So, the creation of two markers is not possible (addition of fraction can
produce integer part :-\). The way should be adding all prices on the page and
then split integer and fraction (split 10.50 as 10 and 50 in two separated
columns in table).

In the fo:flow is used:

  


and in  thers's:

  


I have played a bit with setting the marker value to variable and I've found 
this:
1) variable definition:

  

2) reading $tmp by  gave me a requested number
3) reading $tmp by  does nothing

 



I would stop thinking about using xsl: tags.  Again, they all disappear 
before the fo: tags are activated.  By the time fo:retrieve-marker has a 
value, the xsl:anything stuff is long gone from the stylesheet.


Instead, I wonder if you can use div and mod[1] to get the portions you 
need.  I haven't done this before with XSL, however.


$55.28 * 100 = 5528 mod 100 = 28?
$55.28 * 100 = 5528 - ($55.28 * 100 mod 100) = 5000 div 100 = 50?

I don't know if  can be used in place of $55.28 
above though.


Glen

[1] 
http://www.w3.org/TR/2001/REC-xsl-20011015/slice5.html#section-N6961-Expressions



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



Re: marker value to variable

2006-07-18 Thread Glen Mazza

pat wrote:


Hi all,

I have a problem and I'm not able to solve it :-( I'm using marker to generate
subtotat (it works) and for retrievng the subtotal I'm using retrieve-marker
(that works too), but I need to split subtotal to part before decimal point
and after decimal point ant this is the problem. How to store the value from
retrieve-marker to variable or use it directly ???

I'm looking for something like this:

 


Is there a way how to do that ???

 

I don't think so.  By the time FOP is processing your input XML, it is 
fully in the FO namespace.  (It initially uses Xalan--or Saxon--to do 
the XSLT transformations, replacing your xsl: elements with the result 
tree of your XSLT transformation.)  The xsl: elements are all gone by 
the time FOP is processing fo:retrieve-marker.


It may be helpful for others to be able to answer your question if you 
let us know what type of data you are handling and why you need this 
functionality.  There may be another way to accomplish what you need here.


Glen


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



Re: FO2PDF without validation

2006-07-12 Thread Glen Mazza
If it's not compliant, then it is not an FO file, and expected output 
would have to be undefined as a result.  I'm unsure why you would want 
to code your stylesheets in an invalid way.  If you have no data, better 
to code your XSLT not to generate a fo:table to begin with.


Glen

Navanee wrote:


Hello,

 

Is it possible to convert FO file to PDF without validating FO?  I am 
getting the following Exception.


 

org.apache.fop.fo.ValidationException: file:///E:/test.fo:66:1145: 
Error(66/1145): fo:table-body is missing child elements.


Required Content Model: marker* (table-row+|table-cell+)

at 
org.apache.fop.fo.FONode.missingChildElementError(FONode.java:403)


at 
org.apache.fop.fo.flow.TableBody.endOfNode(TableBody.java:103)


at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:357) 



at 
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:193)


 


Your suggestions are most welcome!

 


Thanks,

 


Best Regards

Navanee.

 

 




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



Re: XSL Optimization

2006-07-04 Thread Glen Mazza

[Happy Independence Day fellow Americans!]

Manuel Mall wrote:


Looking at the stylesheet you seem to simply generate a table. IMO if 
this is all you want to do FOP may not be the best tool for the task at 
hand. For example storing your test results in a database and using a 
report writer may be a much better fit to your needs. The strength of 
FOP is NOT in the generation of hundreds of pages of identically 
structured tabular data. FOP is actually fairly inefficient at doing 
that.




While FOP may indeed not be optimized or designed to handle generating 
the telephone book of a large city, I think we should stress that this 
is not necessarily a limitation of XSL or XSLT.


XSL and XSLT combined still offer incredible power in allowing you to 
implement the "Don't Repeat Yourself" principle--common headers and 
footers and formatting rules, etc., that normally would have to be 
defined and maintained individually within each report using a 
traditional report writer can be stored and maintained in just one 
place.  As the number of reports increases, the maintenance savings from 
using xsl:import, xsl:include, xsl:call-template, etc., grows 
exponentially over reporting tools that generate 
must-be-maintained-individually reports.


So I personally would be more inclined to (1) make sure the user really 
needs a report as large as the one they are generating (most people 
won't read 1000-page reports anyway, for example) and, if so, (2) first 
refer the user to a commercial XSL FO processor if they are doing 
something beyond FOP's capabilities, not to a manual WYSIWYG-like 4GL 
report generator.


Glen

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



Re: variable containing the page number

2006-06-15 Thread Glen Mazza

Eivind Andreassen wrote:


Hi

I want to put the value of fo:page-number into a variable because i 
have different static-content depending on what page number it is. I 
want to use this variable to check what page number it is. Do anyone 
know how to do this?






http://marc.theaimsgroup.com/?l=fop-user&m=113078517606736&w=2

Glen



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



Re: Different first page for header/footer

2006-06-05 Thread Glen Mazza

Debasish Jana wrote:


Hi:

Does FOP support anything to have different first page in a section for
header/footer?

 

Yes.  Look at this[1], but replace odd-or-even="odd"/"even" with 
page-position="first"/"last"/"rest".  (I think your "last" and "rest" 
will be the same, as described here[2].)


Glen

[1] http://marc.theaimsgroup.com/?l=fop-user&m=113078517606736&w=2
[2] 
http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#fo_conditional-page-master-reference



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



Re: Error when customizing title fonts etc.

2006-05-13 Thread Glen Mazza

Matthew East wrote:


Glen Mazza  apache.org> writes:

Main problem:  If any of the fo:flows have a flow-name that map to 
something other than xsl-region-body, or if any of the 
fo:static-contents have a flow-name that map to xsl-region-body, then 
this error message will occur.  If this is occurring for you, fix your 
XSLT customization layer so this doesn't happen.



It might not be precisely on-topic for this list, but I didn't get a response to
it on docbook.apps, so maybe you can help.



Open-source requires more detective work on the part of the person 
having the problem.



When I set double.sided to 1 with docbook-xsl-1.69.1, I get this region-body
error. Otherwise, I don't get it, and I didn't get it with version 1.68 either.



OK.  Again, look at the flow-name property[1] (attributes) on each of 
the fo:flows and fo:static-contents within the 1.68-generated FO file 
(not the output PDF, this is before you process the file with FOP), and 
do the same with the 1.69.1.  If you have the problem mentioned at the 
top with the latter stylesheets but not the former, then you probably 
have a Docbook bug, to be recorded here[2].


[1] http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#fo_flow
[2] http://sourceforge.net/tracker/?group_id=21935&atid=373747

Glen

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



Re: crash

2006-05-13 Thread Glen Mazza

Matthew East wrote:


Hi all, and sorry to bother yet again.

Fop is now working nicely on my home computer. Then I tried to run it on another
pc, with basically the same setup on the same files, with the same version of
java installed, and I get this error:

http://fop.pastebin.com/715978

Any ideas? Please let me know if you require any more information!



It could be that the other pc does not have the proper graphics 
libraries to handle what you are doing.  (I think they call those 
"headless" PCs[1], but am unsure.)


Otherwise, it may be an internal FOP bug.  Looking at the code, 
"ArrayIndexOutOfBoundsException", that indicates that one method is 
sending an invalid array index value (say, position #14 of a 10-cell 
array) to another.  Perhaps best to send the very most minimal FO 
document (with no sensitive data in it) to Bugzilla that reproduces this 
error.


[Note to the FOP team, I would recommend resisting the temptation to 
alter the called method for it to quietly keep running even if an 
invalid index is provided to it.  Nothing good downstream is going to 
happen by requesting cell 14 of a possible 10--it's just going to make 
locating the bug that much harder.  Best to have the caller of this 
method fixed so it doesn't send invalid values to begin with, or will 
otherwise raise an exception if it is provided one by *its* caller.]


Glen

[1] http://marc.theaimsgroup.com/?l=fop-user&m=112897587310604&w=2

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



Re: Error when customizing title fonts etc.

2006-05-13 Thread Glen Mazza

[EMAIL PROTECTED] wrote:



I am using xsltproc and fop 0.92b to generate pdf output from docbook 
sources.
I am trying to customize my section titles by changing the 
section.title.properties attribute-set in my customization layer.


The error message I receive from FOP is:

java.lang.IllegalStateException: Flow 'xsl-region-body' does not map to 
the region-body in page-master 'blank'.  FOP presently does not support 
this.




Question:  Do you get this same error message when you *aren't* trying 
to customize the section titles?  I don't know if this customization is 
a red herring for your problem, because this error message is really 
unrelated to what you are doing.


Also, do you actually have an fo:simple-page-master called 'blank'? Look 
at the output FO document, before it is fed to FOP.


Main problem:  If any of the fo:flows have a flow-name that map to 
something other than xsl-region-body, or if any of the 
fo:static-contents have a flow-name that map to xsl-region-body, then 
this error message will occur.  If this is occurring for you, fix your 
XSLT customization layer so this doesn't happen.


Glen

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



Re: fox:outline to fo:bookmark-tree help

2006-05-11 Thread Glen Mazza

Geldersma, Matt (AGRN) wrote:



But when I try to use it I get this error
org.apache.fop.fo.ValidationExceltion:  Error(unknown location): For
fo:root,  fo:layout-master-set must be declared before fo:bookmark tree.



In this case, either you declared an fo:bookmark-tree before the 
fo:layout-master-set, or you forgot to declare an fo:l-m-s, which you 
*must* have for an fo:root.


Look at the content model of fo:root[1]:

(layout-master-set,declarations?,bookmark-tree?,(page-sequence|page-sequence-wrapper)+)

This says that fo:root must have as immediate children/descendants, 
***IN THIS ORDER***:


1.) one l-m-s
2.) an optional declarations
3.) an optional bookmark tree
4.) at least one of a series of page-sequences and page-sequence-wrappers.

(Ignore for the moment fo:page-sequence-wrapper, that's a 1.1 construct 
FOP doesn't have).


[1] http://www.w3.org/TR/xsl11/#fo_root




I try adding fo:layout-master-set and then I get an error saying
fo-bookmark-tree is not a valid child of fo:layout-master-set. What am I
doing wrong?  This is my first attempt at working with FOP so any help
would be appreciated.



Here, you're trying to make an fo:bookmark-tree an immediate child of an 
fo:l-m-s, which is invalid.


The layout master set[2] may have either of these two FO's as children ONLY:
(simple-page-master|page-sequence-master)+

[2] 
http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#fo_layout-master-set


The thing to keep in mind was that fox:outline construct was not created 
in the spirit of the XSL recommendation, where each fo: has a defined 
location in which it is valid, because fox:outline was allowed to be 
placed anywhere.  fo:bookmark-tree, OTOH, may be placed in only one 
location as defined above.


Make sure your fo: follows the content model of the 1.0 specification, 
with the exception of fo:bookmark-tree, which follows the 1.1 spec.  FOP 
0.92 enforces it.


Glen

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



Re: Java Result: 2 Why?

2006-05-04 Thread Glen Mazza

David wrote:


Dear members,
 
I am getting problmes when getting generating the PDF file from using 
FOP. I am using DocBook, vía Ant:
 


More detective work seems needed.  Have you tried to create the 
absolutely most minimal Docbook document possible, to see if the error 
still occurs?  This would help determine if the problem is in the text 
(in which case, you can slowly zoom in on the problematic XML by adding 
more of your original text in) or your Docbook setup.


Also, I think there is a fop.extensions parameter[1] that needs to be 
set for Docbook when you are using our processor.  The Docbook-Apps 
mailing list may be able to help you more on this topic, unless someone 
else here also knows.


Glen

[1] http://www.sagehill.net/docbookxsl/InstallingAnFO.html#InstallFop

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



Re: Extending fox:outline

2006-05-04 Thread Glen Mazza

Vijay Yellapragada wrote:


The current problem I am trying to solve is the following :-

I am trying to generate subsections numbers in my final PDF document. So I have 
chosen a scheme where each  tag in html maps to a corresponding section 
level. For eg :


h2 - 1
h3 - 1.1
h4 - 1.1.1 etc

My XSLT transforms the 'h' tag to FOP 'fox:outline' with an appropriate 
subsection number based on its depth in the html document. 



This will not work by the time you're ready for FOP 0.92, because 
fox:outline has been replaced with the XSL 1.1 equivalents fo:bookmark, 
fo:bookmark-tree, etc.[1], and the content model (location where 
fo:bookmarks can be placed) for XSL 1.1 is being enforced, i.e., 
fo:bookmark tree is a direct descendant of fo:root only.


[1] http://www.w3.org/TR/xsl11/#d0e14222


I noticed that inorder for me to get a tree structure of bookmarks, I need to 
have nested "fox:outline", however this gets overly complex because the 'h' 
tags are not inherently nested.


If you can use 0.92, I think you just need to go to the Mulberry List to 
determine what XSLT to use to get the nesting that you desire.


Glen

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



Re: Installing fop 0.92 (was Re: Footnotes overlapping with main text body)

2006-04-23 Thread Glen Mazza
I would first try to get the standard Docbook stylesheets working with 
FOP 0.92, using the Docbook Fop extenstions for FOP 1.0, *before* doing 
any customization of those stylesheets for your own purposes.  Again, 
use the latest Docbook stylesheet versions available--as I understand it 
the Docbook extensions for FOP 0.92 are quite new.


If you have incur any problems with this, go to the OASIS Docbook-Apps 
ML and ask there, again, *before* you make your customizations to 
Walsh's stylesheets--a greater percentage of readers can help you with 
Docbook-related extensions for FOP.  Once you have FOP working with the 
latest Docbook stylesheets and with the FOP1 extensions enabled, *then* 
proceed to make modifications to those stylesheets if you wish, 
confident in the fact that any subsequent problems you will run into 
will not be FOP or Docbook-related, but related to your customizations 
instead.


Next, as for the error that you are getting: 
"java.lang.IllegalStateException: Flow 'xsl-region-body' does not map to 
the region-body in page-master 'blank'.  FOP presently does not support 
this."  This is not bookmark-related, so something is wrong either with 
your customization of Walsh's stylesheets or with the FOP1.0 Docbook 
extensions that are being activated:  The fo:flow should point to the 
fo:region-body by having a "flow-name='xsl-region-body'" property, and 
the region-name property of the fo:region-body of the page master you 
are using, if it is using a default "xsl-region-x" name, cannot be 
anything but "xsl-region-body".  It is difficult to determine the 
problem because you are not giving us the output FO document, but the 
XSL/XSLT one instead.  As always, create a *minimum* FO document that 
still reproduces the error, and send us *that* one.


But even before that, if the minimum FO document does indeed show the 
Flow 'xsl-region-body'... error above, you may not need to even send it 
to us, just fix your XSLT so that error doesn't occur.  The Mulberry 
XSLT Mailing List can help you with your XSLT.


Glen

Matthew East wrote:

Patrick Paul  yahoo.ca> writes:


Get the latest release (1.69.1) at 
http://sourceforge.net/project/showfiles.php?group_id=21935#files



Ok, I installed and used these, by amending my custom xsl to use them. I get the
same error. Just for clarity:

ERROR: http://fop.pastebin.com/677244
XSL: http://fop.pastebin.com/677245

Matt


-
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: PDF Bookmarks detail

2006-04-21 Thread Glen Mazza

Jeremias Maerki wrote:


Slow and unreliable server you have there. Anyway, I've managed to track
down the feature andsurprise, it's implemented: Just add
starting-state="hide" to the fo:bookmark. :-) Learn something new every
day...



Also, you will need to add "hide" to *every* bookmark you have, because 
the W3C XSL default is "show" if not specified, and also this trait is 
noninheritable.  If you have many bookmarks, creating an XSLT template 
to generate a bookmark with the "hide" value already set may reduce the 
busywork involved.


Glen



On 20.04.2006 17:41:46 kralik wrote:


Here is link to the file with collapsed bookmarks:


http://o4c.wz.cz/diplomka/Karel.pdf 





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



Re: Height of region-after

2006-04-17 Thread Glen Mazza
I wonder if what he actually wants to use are footnotes.  Won't those 
grow in the manner that he desires?


Glen


Jeremias Maerki wrote:

Chapter 6.4.15 (region-after) in XSL 1.0 says:

"The block-progression-dimension of the region-viewport-area is
determined by the extent trait on the fo:region-after formatting object."

That means that the height of the region-after must be fixed and is
given by the extent property. So, there's no way that the region-after
can grow dynamically based on its content.

What you can do however, is render the content for the region-after as
part of the flow and measure its height. You can do that by rendering to
the area tree XML (-at on the command-line) and inspect the generated
XML file. I don't think that will work satisfyingly with 0.20.5. You
would have to upgrade to the latest version for that. Once you have the
dynamic height you can use that value in a second run in the extent
property of region-after. Not a very convenient approach but it can work.

On 17.04.2006 10:47:23 Guenter Bertels wrote:


hallo,

i use fop 0.20.5

and i want that the height of the region-after is dynamic.

I definde the region in this way.


I dont know exactly how much content came into the footer

Is ther any way to fit the height of the footer to the content?

Sorry for my bad english, i hope you understand what i want.





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]



[Fwd: [docbook-apps] FOP 0.91 : "trying to remove a non-trailing word space"]

2006-04-05 Thread Glen Mazza

Hello FOP Team,

This is from the Docbook-Apps list.  I think there is a stray debugging 
comment in the 0.91 version that can probably be removed--it seems 
unrelated to anything "wrong" that the user might be doing, but rather 
just a debugging note added in during algorithm development.  See below.


Thanks,
Glen

 Original message 
Subject: [docbook-apps] FOP 0.91 : "trying to remove a non-trailing word 
space"

Date: Wed, 05 Apr 2006 13:24:21 +0900
From: Michael(tm) Smith <[EMAIL PROTECTED]>
To: docbook-apps@lists.oasis-open.org

Has anyone else observed the following message when generating
PDFs from FOP 0.91? -

  trying to remove a non-trailing word space

Any idea what kind of problem (if any) it indicates? Any clues on
how to avoid it and/or how to suppress the message? It seems to
just be a notification. But it appears even when FOP is run with
the "-q" (quiet) option.

  --Mike

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



Re: generating large pdf reports using fop

2006-03-29 Thread Glen Mazza

[EMAIL PROTECTED] wrote:

Page-Sequence optimization! Well I am not really sure how to do that. I 
have tried to reduce the number of tables and font specifications in 
table-cells. But if you could throw a pointer as to how I can achieve the 
page-sequence optimization, that'd be really helpful.


I would first try to imagine what you can logically break on.  Since you 
are apparently doing some form of health insurance information, you can 
break on doctor or patient or geographical region perhaps.  Find 
something your customer would like to see subtotals of, perhaps, and 
that can be a good place to start a new page sequence.


Next, after your fo:layout-master set, call a template that creates an 
fo:page-sequence for each of whatever that you are breaking on.  I have 
yet to do this (my reports are much smaller), but this should work well 
for you.


[As an aside, I'm in the process of trying to move Oracle Reports-based 
reports to XSL at work.  One thing I have upcoming is to build a 
stylesheet for a particular report that can dynamically break as above 
on *any* user-desired field: patient, doctor, hospital, state, etc., 
instead of being hardcoded to just break on one.  So one customer gets 
his reports one-page-sequence per doctor, others one-page-sequence per 
patient, etc.  I have no clue as to the difficulty of doing this, but 
you may wish to consider such a design yourself.]


Also, thankfully you didn't here, but just to warn you in case you may 
forget for a moment, be *very* careful not to accidently post any source 
XML data in any future question you have, as it appears that you are 
handling HIPAA data.


Glen

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



Re: Java/POJO based FOP transformation (instead of XSL) like in JasperReports

2006-03-16 Thread Glen Mazza
The SAX processing model (instead of constructing DOM trees to 
subsequently feed FOP) would probably be much faster for you.  No JSP 
needed for this.  I would take a look at Jeremias' ExampleObj2PDF[1] and 
corresponding model[2] to get an idea of the process.  I've been using 
this method at work for some time now and it has been working quite well 
for me.


Glen

[1] 
http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleObj2PDF.java?rev=332791&view=markup


[2]
http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/model/


Geoffrey De Smet wrote:


I've worked with both FOP and JasperReports
and I really prefer the FO format over jasperreport's custom format.
But Jasperreports allows to use Java/POJO based transformations, so I am 
wondering if this is possible in FOP.


Basically the idea is to replace:
- generate XML based on POJO
- transform XML with XSL to FO
- feed FOP the FO
with
- supply POJO to "JSP without http" which generates FO
- feed FOP the FO

Does anyone know an (open source?) library which can do something like:

class Person {
  private String firstName;
  private String lastName;
  // getters and setters
}

...
class="java.util.List"/>

...
<% for (Person person : personList) { %>
  
<%= person.getFirstName%>
  
  
<%= person.getLastName%>
  
<% } %>
...

This should be usable in fat clients, webclients, ...: it is not bound 
to the HTTP protocol.





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



Re: NPE

2006-03-08 Thread Glen Mazza

[EMAIL PROTECTED] wrote:



Whitespace verifies as #PCDATA if #PCDATA is allowed at a particular 
point.  If #PCDATA is NOT allowed at a particular point, the whitespace 
is ignored for the purposes of verifying.



So we are currently handling it correct for XML whitespace. Now, we could catch 
those characters() events anyway, and test all individual chars to see if they 
are classified as whitespace in XML, and if not, throw a little warning...



I may be wrong here, but I think Xerces does that (i.e., this is done at 
a layer lower than FOP)--it probably tosses out insignificant whitespace 
so FOP wouldn't even get those character() calls.


Glen

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



Re: NPE

2006-03-07 Thread Glen Mazza

Andreas L Delmelle wrote:


In the latter case, however:


  
  ...
  


Note that the i-f-o now contains two text nodes (= #PCDATA):  
'
  ' and ' '




I think they call that "insignificant white space", and that would not 
be counted as PCDATA.  Partly explained here, but not definitive either way:


http://www.w3.org/TR/REC-xml/#sec-white-space

Also, this old email[1], which included the above link, has an 
interesting quote of how to interpret whitepace:


Whitespace verifies as #PCDATA if #PCDATA is allowed at a particular 
point.  If #PCDATA is NOT allowed at a particular point, the whitespace 
is ignored for the purposes of verifying.


[1] http://lists.xml.org/archives/xml-dev/199806/msg00386.html

But I'm far from an expert on this stuff.

This means we have a choice to either test every one of those  
characters, or let the 'error' slip through, possibly with a warning.  
Depending on the context, I can imagine users not being very happy if  
FOP were to be unconditionally strict here... [suppose i-f-o is on  one 
of the last pages of a 250 page document :-/]




I don't think that whitespace-only nodes are being created by FOP 
anyway, if the whitespace just exists between two consecutive opening 
tags.  So this problem may not be occuring for the user as it is.


But it is a common misperception[2] that strict validation is 
mean and cold-hearted, when in fact is it saves people from submitting 
erroneously built documents/invoices.  "Just a warning" means that the 
user is required to scroll through the log output of every document 
generation, just to make sure that the document FOP produced is valid, 
and if they fail to do that, then they may submit an incorrect document 
or invoice.  For every hacker irritated by strict validation, two or 
three are probably saved by it--especially billing invoices, where you 
almost certainly would want to halt if you had an XSLT error which would 
otherwise cause an invalid invoice to be created.


Thankfully FOP has both a strict and non-strict version to suit either 
preference.  Human nature being what it is though, most who clamor for 
the latter, as soon as it is provided to them, start using the former 
anyway.


Glen

[2] http://marc.theaimsgroup.com/?l=fop-dev&m=111365780207108&w=2


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



Re: NPE

2006-03-06 Thread Glen Mazza

Andreas L Delmelle wrote:


On Mar 6, 2006, at 10:05, Florent Georges wrote:


Andreas L Delmelle wrote:


On Mar 6, 2006, at 01:25, Florent Georges wrote:




Well, AFAICT, it's not really empty from a SAX parser's
point of view. It does contain a text-node, but this is
completely ignored by FOP. The SAX characters() events are
only handled for FOs that can contain #PCDATA.



  Mmh, I'm not sure to understand.  The document contains
some:



as well as some:

...

  I guess you only saw the later.  Furthemore, if I
understand right §6.6.6 (mmh, ok, born to be a problematic
paragraph :-p):



Yep, my mistake, I only saw the latter. Anyway, what I mean is that  the 
SAX Parser used with FOP will report those three '.' characters.  That 
is: any compliant XML parser MUST report those characters to the  
application. Only FOP does nothing with them, and those characters  are 
ignored.



Contents:

The fo:instream-foreign-object flow object has a child
from a non-XSL namespace. The permitted structure of
this child is that defined for that namespace.

  So it is required to an IFO to have a child element, isn't
it?



Yes. Exactly one child that is not in the XSL-FO namespace.


  And to don't have non-whitespace #PCDATA.  Right?



Hmm... Yes, if I catch your intention correctly.


So an FO validator would have to report an error for both the
above IFOs, isn't it?



I'd think so, yes. OTOH, if you have an i-f-o that contains some  text, 
and then a foreign XML node, I'd assume that a warning would  suffice...




I disagree, although not enough to resubscribe to FOP-DEV and veto such 
a matter.  PCDATA isn't allowed for fo:i-f-o.  Those FO's which may have 
PCDATA are expressly defined in the XSL specification.


I would rather every FOP-accepted XSL stylesheet be accepted by every 
commercial processor, than have the reverse, as the reverse would 
require watering down our validation to the extent that a FOP-accepted 
stylesheet is no longer a guarantee of XSL compliance (or anything 
else.)  "If your stylesheet is accepted by FOP it is as good as gold" is 
a nice selling point.


Glen

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



Re: [docbook] Problem with fop and fop.extension

2006-02-28 Thread Glen Mazza
Excellent!  *That's* why we don't need fox:destination.  We should be 
using the property id values instead.


FOP Users, FOP Dev -- FYI.

Thanks,
Glen


Bob Stayton wrote:


The latest stylesheet snapshot supports fop 0.91 to some degree, including
bookmarks.  Set the fop1.extensions parameter to "1" and fop.extensions to
"0" when using it.  Feedback on this early implementation is welcome.

http://docbook.sourceforge.net/snapshots/

Regarding fox:destination, most FO processors use id attributes in the FO
as PDF anchors.  For example, by default XEP adds an anchor for any id that
is referenced in the document, but has an option to output all id values
(useful when linking from other documents).

Bob Stayton
Sagehill Enterprises
DocBook Consulting
[EMAIL PROTECTED]


- Original Message - 
From: "Glen Mazza" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, February 28, 2006 7:55 AM
Subject: [docbook-apps] Re: [docbook] Problem with fop and fop.extension




Oops...need to send to the list.

Glen


Glen Mazza wrote:


Petr Hracek wrote:



Hi all,

during the fop operations I have received following exception
Exception
javax.xml.transform.TransformerException:
org.apache.fop.apps.FOPException:



file:///home/cz2b10q6/Documents/DocBooks/DenikZaslOtce/DenikZaslOtce.fo:2:24488:


Error(2/24488): No element mapping definition found for fox:outline

Can you tell me which element I have to mapped?

regards
Petr



Best to stay with FOP 0.20.5.  If you are using fop 0.91, fox:outline
does not exist, as the new version uses the new XSL 1.1 bookmarks
instead.  I don't believe there is a port yet in Docbook to the new
version of FOP, also, the fox:destination is still unimplemented in


0.91.


fox:outline had a very messy content model (basically, you could place
it anywhere), making rigorous XSL input validation very difficult.  FOP
0.91, OTOH, enforces the content model for the XSL 1.1 bookmarks per


the


XSL candidate recommendation, allowing for input validation to be much
more solid.

[Incidentally, if someone could tell me why there is no equivalent to
fox:destination (PDF anchors) in XSL 1.1, I would *love* to know.  The
XSL Working Group implemented bookmarks in 1.1--obviating fox:bookmark,
fox:outline--but not fox:destination, causing me to think there is
actually no need for it, and that the commercial FO processors are


doing


something else to create PDF anchors.]

Glen



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



Re: 0.20.3 to 0.91b migration log messages

2006-02-28 Thread Glen Mazza

[EMAIL PROTECTED] wrote:



10:01:48,302 WARN  [FONode] Warning(Unknown location): fo:table-column, 
In the separate border model (border-collapse="separate"), borders 
cannot be specified on a fo:table-column, but a non-zero value for 
border was found. The border will be ignored.


I don't like this phrasing.  One can place (specify) any property on any 
FO.  (See first sentence of Chapter 5.[1])  I wonder if the FOP 
developer who did this is mistaking FO Tree properties (where the users 
can set whatever properties they want) with area traits (in which 
certain traits will indeed be ignored or set to zero, as per the spec.)


> WARN  [FONode] Warning(Unknown location): fo:table-row, fo:table-row
> does not have padding (see the property list for fo:table-row in XSL
> 1.0), but a non-zero value for padding was found. The padding will be
> ignored.
> Solution:  Remove superfluous row padding.

This is a much better phrasing.  It states a fact (this property will be 
ignored) while not incorrectly stating that the user *cannot* set this 
property.


Glen

[1] http://www.w3.org/TR/xsl11/#refinement


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



Re: table-layout

2006-02-26 Thread Glen Mazza

Tracey Zellmann wrote:

I am using fop 0.91.
 
I am getting a warning that fo:table, table-layout="auto" is currently 
not supported by FOP.





I do not currently have any table-layout specified.


Which defaults the value to "auto"[1], hence the warning.  To stop the 
warning message, probably explicitly setting it to "fixed" will work.


Glen

[1] http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#table-layout

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



Re: porblem running new fop-0.91

2006-02-16 Thread Glen Mazza

Jeremias Maerki wrote:


Actually, this message refers to the fo:region-before element in the
single-page-master. The specification dictates that border and/or padding
must not be specified on a region-before which seems to be the case in
your example. 


Well, technically you can specify any property on any formatting object:

For 1.1, First sentence of chapter #5 here: 
http://www.w3.org/TR/xsl11/#refinement


For 1.0, Search on "Although every formatting property":
http://www.w3.org/TR/2001/REC-xsl-20011015/slice1.html#section-N639-Processing-a-Stylesheet


Specifically, I have an example tha comes with StyluStudio thate creates a 
catalog with text pictures. Using the new fop, I get this error:
(Location of error unknown)org.apache.fop.fo.expr.PropertyException: Border and padding 
for region "xsl-region-before" must be '0' (See 6.4.13 in XSL 1.0).



The specification is unfortunately vague here by which "value" it is 
referring to that must be zero, but I would be inclined to think 6.4.13 
means the *computed value* or *actual value* must be zero, not the 
(user-)specified value.  If so, they would be welcome to put anything 
they want there.  Even the spec, in 5.1.2 "computed values", mentions 
properties being forced to be set to "0pt" regardless of the specified 
value.  Perhaps it would be better to just have this as a warning in 
both the strictly validating and relaxed validation versions.


http://www.w3.org/TR/2001/REC-xsl-20011015/slice5.html#speccomact

Glen

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



Re: The id "x" already exists in this document - Headers and Footers

2006-02-06 Thread Glen Mazza

Marcel Hoffmann wrote:


Hi,
I have a problme with the "id already exists" issue that has - to my
knowledge - not been discussed in this group.

The fo file I use carries a fo:wrapper node in the header section. The
wrapper node appears only once. Nevertheless FOP is not able to process
the fo file and returns the following error code.
   


ID's must be unique for the entire XSL document, not just for a class of 
formatting objects.



[ERROR] file:/E:/chiron/batchprotest/test4.fo:2:2947 The id
"Produktname" already exists in this document

Does anyone know a solution for this that can be emplyed before the
release of FOP 1.0
 


Ensure unique ID's for all formatting objects.  Is there a reason why 
that is not possible here?


Glen


M. Hoffmann

-
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: [fop-0.91beta] Double sided layout

2006-01-23 Thread Glen Mazza

Andreas Eckstein wrote:


Hi all!

Currently I'm fooling around with fop-0.91 a bit. Now I was wondering if 
there was a simple way to do a double-sided layout, where the page 
numbers on all odd numbered pages are on the right, but on all even 
numbered pages are on the left.


http://xmlgraphics.apache.org/fop/fo.html#fo-oddeven

Glen




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



Re: xml to html

2006-01-23 Thread Glen Mazza

Reza Ghaffaripour wrote:


hi list,
I started xsl a couple of hours ago on a new project and my question may 
seem stupid.
in java, can we convert xml to html using xslt and give it some format, 
such as making some parts bold ?




But of course.  It's called XSLT and you don't need FOP for it.  The 
Apache Xalan project provides the XSLT processor for you, and you may 
ask XSLT questions on the Mulberry XSLT list (Google).  (This list is 
for XSL formatting objects-related questions, which you won't be using 
if your output is HTML.)


Very generally speaking, FOP is for PDF and Xalan is for HTML.

Glen


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



Re: Best way to adjust spacing between rows in an fo:table?

2006-01-22 Thread Glen Mazza

Clay Leeds wrote:


I always used either the padding-bottom attribute on fo:table-row, or  
margin-bottom on fo:block. I occasionally had problems w fo:table-row  
padding attributes, in which case I would apply padding-bottom to the  
fo:table-cell element.




Thanks, that did it!  (padding-bottom on fo:table-row didn't work for me 
either though, but I just needed to place it on the first fo:table-cell 
in the row instead for it to work throughout the row.)


Glen


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



Best way to adjust spacing between rows in an fo:table?

2006-01-22 Thread Glen Mazza

Hello,

I'm using FOP 0.20.5 and I would like to adjust the vertical spacing 
between rows in the  of an , but am having 
trouble doing so.  (The rows contain text only and currently are too 
close together.)


What is the preferred property (padding/space -before, -after?) to use 
for doing this, and on which FO element is it best for it to go on (the 
fo:blocks within the fo:table-cells, fo:table-cells, fo:table-rows, 
etc.)?  I would prefer a property that I can just place on the 
 and have it inherit, but that is not a requirement in 
case 0.20.5 won't support it.


Thanks,
Glen


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



Re: no runtime java--how to install

2006-01-21 Thread Glen Mazza

Paul Tremblay wrote:


I am trying to run fop from a CD (or other removable device). I am at
a different place every day and at a different computer. At some of
the places java is installed, so I can run fop no problem.



I'm assuming you're running fop by calling "fop.bat".


However, at other places there is no java runtime. So is it possible
to to install the java runtime on a removable device such as a CD? 
I want to do with java what I do with python, put the executables on a
removable device and then sat the path to these executables. 



I *think* so, although I haven't tried it.  I would install (expand) the 
J2SDK (or JRE) on your computer's hard drive, then move the entire 
expanded directory to the CD that will have FOP on it.


Next, modify FOP's fop.bat (located in FOP's root directory); the line 
at the bottom that says "java -CP %LOCALCLASSPATH%..."; switch it to 
"..\jd2sdk\jre\bin\java -CP..." or whereever the java.exe will be on the 
CD.  Make sure you use a relative path ("..\..", etc.) instead of 
hardcoding the drive letter because that will probably change from 
machine to machine.


Glen

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



Re: Dynamic charts issues in batch PDF generation

2006-01-20 Thread Glen Mazza

Clay Leeds wrote:

Heh... no, I'm not sure. That's what I understood the OP to mean when  I 
read:



My problem is that the servlets which builds the
dynamic charts are called for the first time only. On the  
subsequent calls the

old charts are only built in PDF and the servlets are not getting
called.



I take this to mean that since FOP does not see a change in the URL/ 
servlet call generating the fo:external-graphic element, it uses a  
'cached' version. I suspect that unless the call is modified--at  least 
slightly--using a technique similar to what Jeremias described,  FOP 
will continue to think that there is no need to call the servlet  again, 
thereby causing the 'old' chart to be used.




I didn't think that FOP can or is coded to make servlet calls while 
running (IIC, the SRC property[1] for external-graphics is just pointing 
to a URI reference on a file server.)  But I am unsure, and so would 
definitely welcome correction on this point if that is not the case.


[1] http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#src

Glen


Of course, it would help if vijay visu (the OP) would clarify this  point.

Web Maestro Clay




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



Re: Dynamic charts issues in batch PDF generation

2006-01-20 Thread Glen Mazza

Clay Leeds wrote:

On Jan 20, 2006, at 6:28 AM, Jeroen van der Vegt wrote:

I'm not sure I correctly understand the problem anymore, but this 
might be relevant:


Can't you let the JPEG servlet indicate that its output should not be 
cached? I use this code to disable various cache mechanism:


   private void setNoCache(HttpServletResponse resp) {
   resp.setHeader("Pragma","No-Cache");
   resp.setHeader("Cache-Control","no-Cache");
   resp.setDateHeader("Expires", 0 );
   }

Regards,

Jeroen



I understood the OP (pasted at the bottom of this msg) to mean there is 
a caching problem with the JPEG image of each chart.




Are you sure?  The proxy/client is getting only a PDF document (MIME 
type application/pdf), no JPEGs.  The JPEGs are incorporated within the 
PDF documents.  Nothing is sent to the proxy/client until the PDF 
document is finished (would have to be, if only to solve the "Page 1 of 
XXX" resolution issues.)  I would think the proxy/client would be 
completely oblivious to the fact that the PDF contains JPEGs within it 
when it receives the application/pdf stream.


No problem whatsoever with the rest of what you're saying, just this 
premise.


Glen

My previous post supported Jeremias 'simple' fix whereby each chart be 
given a different URI (PATH, name, etc.)--even if the difference is just 
'dummy' text. I still believe this is the case.


While you can set special caching parameters on the server end (such as 
described by Jeroen above), unless there is a change in the 
URI/PATH/Filename, there are other places where the file might be cached 
(thereby negating any 'NEVER CACHE THIS RESOURCE' settings).


I attended a talk by Michael Radwin, Senior Engineering Manager for 
Yahoo, at ApacheCon US 2005 in San Diego[1], entitled 'HTTP Caching and 
Cache-busting for Content Publishers'. Among other things, Y! needs to 
ensure that multiple users at an Internet Cafe checking their mail will 
*never* receive the same content.


On Jan 18, 2006, at 12:32 AM, vijay visu wrote:


i am doing a code which generates the PDF in a batch
process. 


These PDFs include dynamically built charts by
servlets. 
I am making use of external-graphic tag to pick the

images.
These servlets throw jpeg image of the charts in the
output stream.

These servlets should be called for each PDFs
generated since each chart will be unique.
My problem is that the servlets which builds the
dynamic charts are called 
for the first time only. On the subsequent calls the
old charts are 
only built in PDF and the servlets are not getting

called.

Please help me out in this problem



[1] (click on 'Cache-busting techniques' at the bottom of the navigation)
http://public.yahoo.com/~radwin/talks/http-caching-apachecon2005.htm




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



Re: Dynamic charts issues in batch PDF generation

2006-01-19 Thread Glen Mazza

Clay Leeds escribió:

On Jan 19, 2006, at 10:30 AM, Glen Mazza wrote:


Jeremias Maerki wrote:


Or you need to simply make sure that the URLs are unique. You can  use a
dummy parameter in the URL to fake uniqueness:
http://localhost/MyChartServlet?dummy=1234



Hmmm...my guess is that for any servlet-related problem for which a  
"dummy parameter to fake uniqueness" would solve it, that the  servlet 
itself can be rewritten to fix the problem instead.  (In  this case, 
have it coded to regenerate the image for every call,  with no dummy 
parameter needed.)  If I'm correct, I would refer the  questioner to 
the Sun Servlet forum for more assistance.


Glen



In my experience (mainly coming from a background where the user- agent 
tends to be a web browser), if you call the same thing twice,  there are 
a number of places where the object being served can be  'cached':

- server
- proxy
- client



Oh.  My interpretation of the problem was that a different PDF document 
*was* indeed being returned each time, but that the charts within the 
PDF document were incorrectly not being regenerated to account for the 
new data specific to each document.  If my assumption was the case, that 
would tend to rule out caching at the client or the proxy, because AFAIK 
they would just have a PDF document to cache (not inner parts, such a 
graphics within the PDF).


But if it is the case that the *same* PDF document is being sent each 
time to the browser, then yes, the caching may be at the client or 
proxy-level, and the URL modifying may be necessary.


Glen

In some cases, the server itself also might have some sort of  'caching' 
system as well, which is external to the server.


If someone is calling a cacheable resource, I've found it safest to  
somehow modify the name (even slightly) to ensure there's no caching  
involved. IMO, this alleviates the potential of cacheability (making  
words up can be fun!).


Web Maestro Clay

-
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: Dynamic charts issues in batch PDF generation

2006-01-19 Thread Glen Mazza

Jeremias Maerki wrote:


On 18.01.2006 09:44:57 Chris Bowditch wrote:


vijay visu wrote:




These servlets should be called for each PDFs
generated since each chart will be unique.
My problem is that the servlets which builds the
dynamic charts are called 
for the first time only. On the subsequent calls the
old charts are 
only built in PDF and the servlets are not getting

called.








Or you need to simply make sure that the URLs are unique. You can use a
dummy parameter in the URL to fake uniqueness:

http://localhost/MyChartServlet?dummy=1234



Hmmm...my guess is that for any servlet-related problem for which a 
"dummy parameter to fake uniqueness" would solve it, that the servlet 
itself can be rewritten to fix the problem instead.  (In this case, have 
it coded to regenerate the image for every call, with no dummy parameter 
needed.)  If I'm correct, I would refer the questioner to the Sun 
Servlet forum for more assistance.


Glen


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



Re: OT: How to send report directly to the printer.. Sorry thought it was obvious but haven't found... please give a clue :-)

2006-01-10 Thread Glen Mazza

David Gagnon wrote:


Hi all,

 I have a web application with a background thread that check for a 
condition and then this condition is meet needs to generates a report 
with fop and send it directly to a  printer.






Any help, or code example will be appreciated ..


http://www.javaworld.com/javaworld/jw-03-2005/jw-0328-xmlprinting.html?

Glen

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



Re: problem with FOP 0.91.beta and gif images

2006-01-10 Thread Glen Mazza

Jeremias Maerki wrote:


If I'm thinking about it, it is probably a bad idea to use the XML file
as base URL source when a stylesheet is used. Normally, you'd place the
resources for a stylesheet relative to the stylesheet, not the source
XML file. fop-devs, what do you think? It would be easy to fix. On the
other side, 0.20.5 seems to do the same (see
Options.setCommandLineOptions).



Hmmm...that's a good point, it depends on the scenario.  If the graphics 
are common for all generations using that stylesheet (say, a graphical 
masthead of a newsletter), your suggestion makes the most amount of sense.


But imagine a stylesheet used to print a one page biography for an 
arbitrary person, and that the stylesheet displays a "photo.gif" picture 
of the person in a certain area.  I could imagine each person for which 
we would want to use the stylesheet having his own directory with a 
"bio.xml" and "photo.gif". Then, the stylesheet would use the specific 
"photo.gif" in the directory where the specified bio.xml file is.


Perhaps an option allowing for either scenario would be best.

Glen


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



Re: Embedding PDF documents?

2006-01-06 Thread Glen Mazza

David Elliot wrote:


Hi Glen,

Sure that makes sense, FOP looks to be conceived as an Apache strength
XSL-FO -> PDF formatting utility/library that implements W3C's XSL-FO
standard - the end result being a library which task specific
applications can then confidently leverage.  Although, currently FOP
supports a variety of input formats - notionally image/graphic data
(BMP, EPS, GIF, JPEG, PNG, SVG or TIFF) - for inclusion during a
render.  Did this list of supported data formats evolve via
contribution, or is it strictly specified by standard ?

Many thanks,
David

 



I think we're talking two different things.  FOP's input is still an XML 
document in the XSL namespace, those types above are graphics 
incorporated via fo:external-graphic or fo:instream-foreign-object.  You 
would apparently like a new extension element then, possibly under 
fo:instream-foreign-object, that will allow for incorporating a PDF 
document.


PDF is not a graphic though.  It is an output type, a document--so I 
guess you would need to write a parser for FOP to be able to translate 
the PDF document into XSL-namespace events that can subsequently be 
rendered on FOP's standard output types--PDF, PS, AWT, RTF, etc.  That 
is out of scope for FOP.  But if someone wanted it to contribute it to 
FOP, I would defer that to the rest of the team (I haven't been coding 
for awhile), but it would need to be pretty robust and solid -- not just 
a partly working system that will fill up the Bugzilla list with errors 
from people trying to use FOP just to concatenate PDF documents, or to 
convert PDF documents into other output formats.  (Then again, that's 
how open source works...  ;-)


Also, AFAICT the W3C XSL Working Group does not allow for embedding XSL 
documents within other XSL documents (i.e, placing an fo:root within an 
fo:root).  Whatever their philosophical concerns are about such 
embedding may also be relevant for embedding PDF documents here.


Glen



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



Re: Embedding PDF documents?

2006-01-05 Thread Glen Mazza

David Elliot wrote:


Is there any talk of "PDF" being supported as an additional "Input
Format" for Apache FOP?  We would like to read in PDF input docs as
part of a multi-attachment XML -> PDF render.
 



That would IMHO be outside FOP's scope, as the input for Apache FOP is 
an XML document in the XSL namespace.  That's FOP's task at Apache.  
Other software products may choose to embed Apache FOP as part of 
something that you would like to see, but I think FOP's role in this 
aspect should be merely to be very easy to be embedded in other 
products, but not directly be that "other product" itself.


Glen



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



Re: Page Sequences

2005-12-08 Thread Glen Mazza

Chris Bowditch wrote:


Clifton Craig wrote:




J,
So the only time tables are realeased are at the end of a page 
sequence? That would explain my dilemma. Even though I use multiple 
smaller tables per row instead of one big table all of the smaller 
tables are held until the page sequence ends? That sux.



Non constructive comments are *not* welcome. You must realise that the 
possibility of back tracking makes the task of knowing when to release 
objects very tricky. If you think you are up to the challenge of 
writing algorithms to do layout more efficiently then please share 
them. Otherwise refrain from making such negative comments.


Chris




I disagree with you, Chris, there was nothing wrong with Clifton's 
comments.  He was just giving his legitimate opinions on the matter.


Also, Chris, for your statement "if you think you are up to the 
challenge of writing algorithms to do layout more efficiently then 
please share them", that is quite remarkable coming from you. 

I *was* up to the challenge of trying to attain better algorithms, and 
refine what we had to make sure everything was being done efficiently.  
Jeremias disparaged these efforts by calling this relatively unimportant 
"code guilding"[1] at the time, and you furthered that by declaring that 
I didn't care whether or not people use FOP[2], just because algorithm 
comprehension and refinement was my emphasis then.


When you see to it that when someone who discusses algorithm refinement 
on FOP-DEV is to be smeared with not caring about whether or not people 
use FOP, do you not see the contradiction in then requesting people to 
share their ideas to refine FOP?  Been there, done that with you.


Glen

[1] http://marc.theaimsgroup.com/?l=fop-dev&m=111730351322137&w=2
[2] http://marc.theaimsgroup.com/?l=fop-dev&m=111753251927198&w=2



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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-07 Thread Glen Mazza

Don't use XSLTInputHandler.  Use JAXP[1] instead.

Glen

[1] http://xmlgraphics.apache.org/fop/0.20.5/embedding.html#examples

[EMAIL PROTECTED] wrote:


Hello,

I struggling to create a webapps that creates pdf's for xml documents. The
problem is: I can't pipe the output of my SAX transformation to the 
XSLTInputHandler. 


My code uses a static xsl document and dynamic xml documents. For
demonstration purposes I create the xml file on the local filesystem but
that'S not very good for my webapplication :o/

Here the code:

File xmlfile = new File(session.getServletContext().getRealPath("/xml/"),
"nbw.xml");
OutputStream out = new java.io.FileOutputStream(xmlfile);
StreamResult streamResult = new StreamResult(out);
SAXTransformerFactory tf = (SAXTransformerFactory)
SAXTransformerFactory.newInstance();
TransformerHandler hd = tf.newTransformerHandler();
Transformer serializer = hd.getTransformer();
serializer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
serializer.setOutputProperty(OutputKeys.INDENT, "yes");
hd.setResult(streamResult);

//Custom transformation with SAX
XmlTransformer xmlt = new XmlTransformer(hd);
String xslParam = session.getServletContext().getRealPath("/xml/nbw.xsl");
String xmlParam = session.getServletContext().getRealPath("/xml/nbw.xml");

File xmlFile = new File(xmlParam);

//XSLT Transformation
XSLTInputHandler input = 
new XSLTInputHandler(xmlFile, new File((xslParam)));


renderXML(input, response);



cheers,
Pete

 





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



Re: Excel format

2005-12-06 Thread Glen Mazza
POI or Cocoon are probably your best bets for Excel output. POI creates 
an .xls via a Java API (no XML needed.) But if you are going to have 
other output types besides Excel for the same data, I would consider 
Cocoon, I *believe* (I haven't looked at this for a long time) they have 
an template you can use to take XML source data and convert it to a 
format that Cocoon uses to create an Excel spreadsheet.


Glen

Farid Adhami wrote:

I’m trying to use FOP as report engine. But I have to provide excel 
format for the report.


I didn’t find any information showing that FOP provides Excel output 
or anyway that could be used for this purpose.


Thanks for any help, in advance.

Farid





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



Re: Apache Question

2005-12-06 Thread Glen Mazza
No, FOP doesn't need Apache HTTP Server to run.  FOP is a Java program, 
while the HTTP Server is in C (or C++) anyway.


FOP needs just a Java Runtime Environment and the JARs kept in the FOP 
"lib" directory that comes with its download.


Glen

Charles Murphy wrote:

I have successfully installed and run FoP 0.20.5 on systems which already
had an installed OS and Apache 2.X. FoP runs fine with the Apache HTTP
server turned off. Before going through a clean install or removal of Apache
HTTP server, I was wondering if there were any shared library or other
requirements which require the install of Apache for FoP to run.

thanks in advance
Charley Murphy 





-
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: Using Docbook stylesheets in FOP

2005-12-06 Thread Glen Mazza
If you do this, I would recommend placing these options in the  
Ant task first, and then at the command-line.


Glen

Jeremias Maerki wrote:

Hey, guys, it's only a two hour job to add support for setting an
EntityResolver and a URIResolver in FOP's command-line. Today, even FOP
itself can use the Commons Resolver to resolve image URIs.

On 05.12.2005 20:55:35 Simon Pepping wrote:


On Sun, Dec 04, 2005 at 12:42:26PM -0500, Glen Mazza wrote:


Simon Pepping wrote:



Another issue I have with FOP and Docbook is that FOP out of the box
does not use catalogs. 


 I'm unsure what you mean by catalogs.


See http://www.oasis-open.org/committees/entity/ and
http://xml.apache.org/commons/components/resolver/index.html. It
allows you to have the DTDs, schemas and included stylesheets at
another path than the documents mention as the system identifier or
URL. Catalogs map Public Identifiers (of DTDs) and the starting string
of URLs to actual paths. The Debian XML system is completely based on
it. It is not really easy to set up, but once done, it provides a
robust XML system.



I think we should do something about this. It
is unrealistic to expect Docbook users to write their own startup Java
file. They want something that works from the command line. 


With my job, we use Ant build scripts for online PDF and HTML help 
sites.  Our technical writer rather easily works with the build.xml, 
understands its contents pretty well and knows how to modify it when 
needed.  (She uses JEdit for editing the XML and to activate the build 
scripts, but I have been thinking of having her try Eclipse because it 
has better CVS functionality.)


IMHO document publishing has too many moving parts to remember 
everything on the command-line.  Also, there are many aspects common 
(CSS stylesheets, FOP customization layer overrides, etc.) for 
publishing multiple documents that can be factored out and shared in the 
build script.  As a bonus, Ant can also take care of other portions of 
the publishing pipeline, such as FTP'ing the results to the website when 
everything is done.


That is a rather professional solution. Lacking a good GUI, I would
like to see a simple command be sufficient to print a Docbook article
or book to say PDF. Well, on fop-dev it was just said that FOP's
command line 'fop -xml ... -xsl ... -pdf ...' now works for docbook
files with Xalan 2.7.0. That is a step forward. Still, no catalogs are
used.

See here for an effort towards a GUI for this kind of task:
http://sourceforge.net/project/showfiles.php?group_id=54378.
Unfortunately, the project has been discontinued.





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: Page Sequences

2005-12-05 Thread Glen Mazza

David Frankson wrote:


However, if you were to
take the latest source and put it into a 20.5.1, we'd probably
enthusiastically take it, and it might solve a lot of the
performance/memory issues that are posted to the list.



No doubt.  But 0.90alpha1 will be getting better.  Very few if any 
committers really understand 0.20.5 anymore, the committers who worked 
on it are mostly gone today.


Glen

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



Re: Page Sequences

2005-12-05 Thread Glen Mazza


Clifton Craig wrote:

I'm writing a report transform usinf XSLT for XSL-FO and I have some basic 
questions. What's the best way to code for multiple page sequences. For 
example I have some static content that I like to keep in the header and 
footers and I guess it doesn't matter but I'd like to reuse chunks of XML-FO 
for that purpose rather than replicating it to the result tree. 


I may be misunderstanding your question, but it seems like you just need 
one fo:page-sequence, with predefined fo:static-contents for the header 
and footer (fo:static-contents will get automatically printed on each 
page.)  Next, put all the content that will be placed on each page in 
the one fo:flow for the fo:page-sequence.




Now from within that template I want to start new page sequences and spit out 
the following using a new-page XSLT-template:




The page handling is done by FOP -- you won't know the number of pages 
needed, that is done by FOP's layout process.




What bothers me even more is since I'm 
programmatically controlling new pages is there a better way to handle this 
type of processing? Right now it looks like I'll have to keep a line count in 
my stylesheet to detect when I should programmatically start new pages. Is 
there a better way? How do most people do multipage reports with variable 
data? Iss everybody line counting in there stylesheets? 


I don't think anybody does that.  Place all your content (except for the 
header and footer) in the single fo:flow of the fo:page-sequence, and 
that should work.


Glen

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



Re: Fw: Using Docbook stylesheets in FOP

2005-12-04 Thread Glen Mazza

Simon Pepping wrote:



Another issue I have with FOP and Docbook is that FOP out of the box
does not use catalogs. 


 I'm unsure what you mean by catalogs.


I think we should do something about this. It
is unrealistic to expect Docbook users to write their own startup Java
file. They want something that works from the command line. 


With my job, we use Ant build scripts for online PDF and HTML help 
sites.  Our technical writer rather easily works with the build.xml, 
understands its contents pretty well and knows how to modify it when 
needed.  (She uses JEdit for editing the XML and to activate the build 
scripts, but I have been thinking of having her try Eclipse because it 
has better CVS functionality.)


IMHO document publishing has too many moving parts to remember 
everything on the command-line.  Also, there are many aspects common 
(CSS stylesheets, FOP customization layer overrides, etc.) for 
publishing multiple documents that can be factored out and shared in the 
build script.  As a bonus, Ant can also take care of other portions of 
the publishing pipeline, such as FTP'ing the results to the website when 
everything is done.


Glen

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



Re: Long Table repeat header

2005-11-22 Thread Glen Mazza
There's a nice new critter in XSL 1.1, fo:retrieve-table-marker[1][2], 
that appears to be the "legal" way of doing what is wanted here.  But 
that will need to wait for implementation in the new version.


Glen

[1] http://www.w3.org/TR/xsl11/#fo_retrieve-table-marker
[2] http://www.w3.org/TR/xsl11/#d0e14560


Jeremias Maerki wrote:

static-content is usually layed out after the region-body. Only after a
region-body is fully processed do you know which elements are on the
page and therefore which markers apply. Since markers can contain
content of variable height, different content would have an influence on
the layout in the region-body and could then trigger a "relayout" of the
region-body, possibly causing changes in active markers etc. etc. The
worst case is an infinite loop. :-)

On 22.11.2005 21:44:01 Sascha Schmidt wrote:


I wonder, why fo:retrieve-marker is restricted to static content and not
allowed in the flow. Does anybody has an explanation?




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: XSL Question

2005-11-22 Thread Glen Mazza

Mike Ferrando wrote:


Glen M.,
Could you post some of your XML source document (maybe a bigger
chunk).



I'm not the one who asked the question.  I don't have any source 
document to provide.


Glen

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



Re: XSL Question

2005-11-21 Thread Glen Mazza

http://www-128.ibm.com/developerworks/library/x-xslfo2app/#b?

Read the "Notice that the select attribute..." blurb at the end of the 
 discussion here.


Glen

Dirk Bromberg wrote:

Hi,

i've a short xml->xsl->fo question.

my xml is:

Here is some text with bold and italic and 
both elements in it.


when i've a template for "text", "B" and "I" how can i get the real text 
in the right order?




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



Re: Letter in xsl

2005-11-21 Thread Glen Mazza

Ail Sahin wrote:



One 'page' is one customer with its n-Vouchers. The first page should 
contain receipient address, subject,

columnnames, text etc and the list of vouchers.
That works fine but when there are many vouchers, a second page ist 
printed, but with the receipient adress, subject etc.




I guess the problem is that you do *not* want the header information on 
pages after the first.


I think you will need to create an fo:page-sequence-master for this to 
work.  Do a search on page-position="first" here [1] for the general idea.


Next, very similar to here [2], you'll be activating different 
fo:simple-page-masters based on whether or not the page is the first in 
the page sequence.  Instead of left or right, however, the issue is 
first-page or not first-page.


[1] 
http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/fo/pagination/franklin_2pageseqs.fo?rev=197469&view=markup


[2]
http://marc.theaimsgroup.com/?l=fop-user&m=113078517606736&w=2

Glen

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



Re: Compiled FOP versions

2005-11-16 Thread Glen Mazza
Without servlets and JSPs, what will your provider allow you use to 
execute programs on the server--ASP, PHP, or cgi?  A pure HTTP server 
will not be able to activate programs, regardless of what you can 
compile FOP into.  Is the provider using IIS or Apache as the web server?


My thinking, along with Jeremias', is that it would be probably best to 
somehow distribute/install the Java VM with your application.  The JVM 
is, after all, already compiled into an executable that the server can 
run.  I can't see the reason why you would not be allowed to run the JVM 
executable but you would be allowed to run another compiled executable 
instead (what you are trying to do to FOP)--they would both be programs 
running on the server.


Glen

Manuel Strehl wrote:

Hi there.

I didn't find any post in the last months concerning my point. If it was 
discussed earlier, I'd like to apologize.


My Problem: My provider doesn't offer a Java VM on the servers. So I'm 
looking for another possibility to run FOP. I found out (at Wikipedia) 
that you can compile Java written programs to machine code (e.g., with 
the Gnu CJ). Well, actually I'm still using Windows and I have no clue 
where to compile it for Linux.


I am looking for:
- already compiled versions of FOP (for Linux; SuSe, I think)
- any tips or hints how I could use FOP on a server without having a 
Java VM.


Does anyone have an idea?

Best Regards
Manuel

-
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: generated pdf page is in iso-8859-1

2005-11-16 Thread Glen Mazza
What happens when you open the PDF file with Adobe Acrobat directly, and 
not using the browser?  Are you getting the same result opening the PDF 
with both IE and Firefox?


Is this just an annoying message, or is a corrupted/unusable PDF returned?

It very well could be, but I was unaware that the encoding in the source 
FO file somehow makes its way to the PDF document.  If the PDF is being 
returned from a web app, my suspicion is that a wrong response header 
value is being sent to the browser.


Glen

Myriam Delperier wrote:

hi,
i've got a .fo file like this

http://www.w3.org/1999/XSL/Format";>



I transform it in pdf with fop and myweb browser tells me the encoding 
is iso-8859-1 but for some url links reasons,

I need the file to be in utf-8.

is there something I can do ?

-
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: Running FOP using shell command yields Permission Problems

2005-11-14 Thread Glen Mazza

Sash Wiener wrote:



Hi,
 
Running FOP Successfully for years on Windows servers using Shell 
Command to execute from client side ie.
 
shell(fopString)
 
However according to hosting company the new security updates in Windows 
Server 2005 are causing this error message.
 


To better isolate the problem, I would create a simple.bat file that 
just has this command:  "dir".  Then try to run simple.bat instead of 
fopString.  If you get a directory listing, we know the problem is with 
"fopString"; but if simple.bat fails with the same security error, then 
this is a Microsoft security question best asked on one of their mailing 
lists.


Glen

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



Re: FOP and right to left layouts

2005-11-05 Thread Glen Mazza

Manuel Mall wrote:

>
As a matter of mailing list etiquette please post messages in plain text 
format. You can see below what can happen to "non-plain" messages.




Also, lets move this development-related thread off to the 
fop-dev@xmlgraphics.apache.org mailing list.  Thanks for your offer of 
help, Mohamed.


Glen


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



Re: FOP PDF content height calculations

2005-11-02 Thread Glen Mazza

Rachel C. Rusinski wrote:



I need FOP to render a dummy PDF upon save of a question group and return
to me the exact height in inches of that question group.



FOP doesn't do that.  It returns documents as its output.  You may wish 
to send a suggestion to the W3C's "XSL Editors" list to have the XSL 
recommendation expanded to support that functionality.  Or, look at 
commercial alternatives.


Glen


Thank You,
Rachel Rusinski
Human Resources Systems Development
Global IT Solutions - Global Customer Solutions
Ext. 4-6571



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



Re: Convert HTML to PostScript or PDF

2005-11-01 Thread Glen Mazza
Yes, that is standard--Docbook does that (maintains two separate 
stylesheets for HTML and FO.)


Glen

[EMAIL PROTECTED] escribió:
Your best bet is to use XSLT to go from your source XML to XSL:FO and skip 
trying to convert HTML into XSL:FO.


Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)




Leon Pu <[EMAIL PROTECTED]> 
11/01/2005 11:08 AM

Please respond to
fop-users@xmlgraphics.apache.org


To
fop-users@xmlgraphics.apache.org
cc

Subject
Re: Convert HTML to PostScript or PDF






My HTML's source is XML, I use Xalan to transform XML to HTML. Is the
result HTML ok for FOP? Or there is other shortcut to generate
PostScript or PDF from XML directly?

Thanks for your reply.


Best regards,
Leon

--- Glen Mazza <[EMAIL PROTECTED]> wrote:



This article may be of help:
http://www-128.ibm.com/developerworks/library/x-xslfo2app/

Glen

Jimmy Dixon wrote:


no - you would need to have your HTML in XHTML format so you can


convert 


it to XSL-FO using XSLT, FOP can then be used to convert XSL-FO to


PDF 


or (I think) Postscript.

Leon Pu wrote:



Hi all,

is it possible to use FOP to convert a HTML file to PostScript or


PDF?



Best regards,
Leon




__ Yahoo! Mail - PC Magazine


Editors' 


Choice 2005 http://mail.yahoo.com




-


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]







 
 
__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


-
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]




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



Re: Convert HTML to PostScript or PDF

2005-11-01 Thread Glen Mazza

This article may be of help:
http://www-128.ibm.com/developerworks/library/x-xslfo2app/

Glen

Jimmy Dixon wrote:
no - you would need to have your HTML in XHTML format so you can convert 
it to XSL-FO using XSLT, FOP can then be used to convert XSL-FO to PDF 
or (I think) Postscript.


Leon Pu wrote:


Hi all,

is it possible to use FOP to convert a HTML file to PostScript or PDF?


Best regards,
Leon



   
__ Yahoo! Mail - PC Magazine Editors' 
Choice 2005 http://mail.yahoo.com


-
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: FOP PDF content height calculations

2005-10-31 Thread Glen Mazza

[Happy Halloween everyone!]

Ben Geyer wrote:

At the risk of annoying the fine people on this list, I'll try to 
restate my question with the original message in context:


Since Rachel's limitation seems to be the number of pages, would another 
approach be to continue processing questions until you reached the end 
of the fourth page?  
Is there any capability in FOP that would allow for 
listening for this event and then tracking which question was the last 
rendered? 


I don't think so.  That would imply that FOP would have knowledge of the 
semantics of the text--i.e., what a question is and what delimits it.


This seems like it could be a more simplistic approach to the 
problem than pulling the latest off of the trunk.


Opinions?



Thankfully, since the number of possible questions is finite, it may be 
simplest for Rachel to just print them all out, measure them each 
manually, and use that metric in her database, instead of what she is 
calculating with the MyRenderer subclass.


I have had problems with FOP 0.20.5 too in this regard, for some reason 
the dimensions of the margins I chose have never really been that 
accurate for me when printed out.


Glen



Thanks,
Ben Geyer


Hello,

I have an application which generates surveys and converts the contents to

a PDF via FOP for printing.  There is a maximum allowable number of pages
for any given survey.  Since each survey generated is dynamic and unique
based on outside information it is necessary for me to calculate the exact

number of inches that each potential question may consume on the resulting
PDF file.  The number of inches for each potential question is stored on
the database with the question content.

When the question is saved, I need to render a PDF in order to determine

the content height in inches.  We have started off by extending the
PDFRenderer class and adding several methods.  The application basically
sends the FO file for conversion and the renderer class ("MyRenderer.java
")
provides a method to calculate height in inches.

I am encountering a problem with the calculation - when the final PDF is
printed the actual number of inches (when measured manually) is somewhat
smaller than what the application gives as the content height in inches.  I

am having trouble figuring out what is actually happening here in the
PDFRenderer.  The renderWordArea method seems to be called many times even
though there should only be a single word Area.

In the example below we are printing the survey on a 
8.5 x 14 (Legal) size

paper.  The question itself manually measures out to be approximately 6.9
or 7 inches in height with the margins specified in the FO file.  However,
the calculated height in inches is 6.88 inches.  When the size of the

question is increased the accuracy gets worse.





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



Re: Alternating Header/Footer on Odd and Even pages

2005-10-31 Thread Glen Mazza

Ross Nicholls wrote:

> Hi there,
>
> Maybe this is an easy one, in which case I apologise!
> I have an alternating page sequence that simply switches the left and 
right hand margins (for binding). However, I also need the header (a 2 
cell table placed in xsl-region-before) to be mirrored on alternating 
pages. i.e. The 2 cells consist of a logo image on the left and a 
heading text block on the right. This is correct for Left-hand (Odd) 
pages, but needs to be the other way round for Right-hand pages (Even) - 
so that the logo is always on the outside edge. Does anyone have any 
ideas how to achieve this?

>
> Thanks in advance for any assistance.
>
> Ross


Oh, this is a fun problem.  I think you want to define two 
fo:static-contents in the fo:page-sequence, with different 
flow-names--given them the values of "region-before-left" and 
"region-before-right" or similar.  Within these two fo:static-contents 
define the different header layouts desired.


Next, create two fo:simple-page-masters, identical in every way except 
they have a different region-name property for the fo:region-before. 
One's region-name is called "region-before-left" and the other 
"region-before-right".


Finally, create an fo:repeatable-page-master-alternatives, with 
different "odd-or-even" properties, as here[1].  Have the "odd" one 
reference the fo:s-p-m with a region-body w/region-name of 
"region-before-right", and the "even" one reference the fo:s-p-m with 
"region-before-left".


This will result in the fo:static-content with flow-name of r-b-r being 
ignored on even pages (and hence not rendered), and the one with r-b-l 
being ignored on odd ones.  Or something like that.  ;-)


Glen

[1] 
http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/fo/pagination/franklin_alt.fo?rev=197515&view=markup



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



Re: odd-or-even AND page-position in fo:conditional-page-master-reference

2005-10-28 Thread Glen Mazza

Daniel Brown wrote:



The region-before/after get printed on blank page unless I specify a 
conditional which has neither of them. In the piece below, I've got a 
first page, rest pages and a blank page specified as conditionals. If 
I've got this wrong, let me know, I'm trying to make things as effecient 
as possible.


Regards,
Daniel



Well, I'm unsure right now, but at any rate, I don't think you need the 
$report_number/xsl:attribute portions below, unless I'm missing 
something.  You are allowed to (actually, should) reuse the *same* 
fo:page-sequence-master with multiple fo:page-sequences.  (Just set the 
master-reference of each fo:page-sequence to the master-name of the 
single fo:p-s-m.)  So you should be able to have just one fo:p-s-m with 
one master-name here.


Also, only the fo:page-sequence-master below uses the "master-name" 
property.  As you can see in the fo:c-p-m-r description[1], 
"master-name" has no meaning as a property for this formatting object. 
So the code giving a master-name property to these FO's can also be removed.


Glen

[1] 
http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#fo_conditional-page-master-reference




 > 
 >Report_Layout_ select="$report_number" />
 >
 >
 >  page-position="first" blank-or-not-blank="not-blank">
 >  Report_FirstPage_ select="$report_number" />
 >
 >
 >   
 >  Report_Blank_ select="$report_number" />
 >
 >
 > page-position="rest">

 > name="master-name">Report_OtherPages_ select="$report_number" />
 >
 >
 > 
 > 
 >
 >  
 > *Glen Mazza <[EMAIL PROTECTED]>*

 > 10/28/2005 02:35 PM ASTPlease respond [EMAIL PROTECTED]
 >
 > To   fop-users@xmlgraphics.apache.org
 > cc  
 > bcc  
 > Subject   Re: odd-or-even AND page-position in

 > fo:conditional-page-master-reference
 >  
 >

 > I think all you need is to set initial-page-number to "even" on the
 > fo:page-sequence:
 > 
http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#initial-page-number

 >
 > and just use a simple fo:single-page-master-reference instead of 
fo:c-p-m-r.

 >
 > Glen
 >
 > Daniel Brown wrote:
 >  > Shouldn't it be possible to use both the odd-or-even AND the
 >  > page-position within the fo:conditional-page-master-reference? I'm
 >  > finding (0.20.5) that one or the other works but not both. In the case
 >  > of both being entered, it simply takes the first defined.
 >  >
 >  > What I'm trying to do it insert a page sequence which will add a blank
 >  > page before a page which is EVEN numbered. I need to have all my new
 >  > page-sequence start with an ODD page number so that when printed on
 >  > 2-sided paper they will always appear on the front of a sheet of 
paper.

 >  > any ideas??
 >  >
 >  > Regards,
 >  >
 > 
Daniel-


-
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: odd-or-even AND page-position in fo:conditional-page-master-reference

2005-10-28 Thread Glen Mazza

Daniel Brown wrote:

Thank you all for your help. I have an unknown number of page sequences 
which all needed to start with Page 1 so I did the following:


I added the blank-or-not-blank to the conditional-page-master-reference 
and also set the force-page-count="end-on-even"  on my page-sequences. 
That did the trick. Now, it will print my new page-seq on the front of 
2-sided pages. If the previous sequence ends on an odd number, it will 
force the additional page (which will tell the conditional will to print 
out the Report_Blank_###).




I guess I'm missing something here.  Since you want each page to start 
on 1, and also to start on the front of the page, it seems like you can 
just set initial-page-number to "1" and force-page-count="end-on-even" 
for each fo:page-sequence without all the fo:c-p-m-r's you have below.


Glen





   Report_Layout_select="$report_number" />

   

page-position="first" blank-or-not-blank="not-blank">
 Report_FirstPage_select="$report_number" />

   

  
 Report_Blank_select="$report_number" />

   


   name="master-name">Report_OtherPages_select="$report_number" />

   




 
*Glen Mazza <[EMAIL PROTECTED]>*

10/28/2005 02:35 PM ASTPlease respond [EMAIL PROTECTED]

To   fop-users@xmlgraphics.apache.org
cc  
bcc  
Subject   Re: odd-or-even AND page-position in 
fo:conditional-page-master-reference
 


I think all you need is to set initial-page-number to "even" on the
fo:page-sequence:
http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#initial-page-number

and just use a simple fo:single-page-master-reference instead of fo:c-p-m-r.

Glen

Daniel Brown wrote:
 > Shouldn't it be possible to use both the odd-or-even AND the
 > page-position within the fo:conditional-page-master-reference? I'm
 > finding (0.20.5) that one or the other works but not both. In the case
 > of both being entered, it simply takes the first defined.
 >
 > What I'm trying to do it insert a page sequence which will add a blank
 > page before a page which is EVEN numbered. I need to have all my new
 > page-sequence start with an ODD page number so that when printed on
 > 2-sided paper they will always appear on the front of a sheet of paper.
 > any ideas??
 >
 > Regards,
 > 
Daniel-


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



Re: odd-or-even AND page-position in fo:conditional-page-master-reference

2005-10-28 Thread Glen Mazza
I think all you need is to set initial-page-number to "even" on the 
fo:page-sequence:

http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#initial-page-number

and just use a simple fo:single-page-master-reference instead of fo:c-p-m-r.

Glen

Daniel Brown wrote:
Shouldn't it be possible to use both the odd-or-even AND the 
page-position within the fo:conditional-page-master-reference? I'm 
finding (0.20.5) that one or the other works but not both. In the case 
of both being entered, it simply takes the first defined.


What I'm trying to do it insert a page sequence which will add a blank 
page before a page which is EVEN numbered. I need to have all my new 
page-sequence start with an ODD page number so that when printed on 
2-sided paper they will always appear on the front of a sheet of paper. 
any ideas??


Regards,
Daniel- 
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: Can't get FOP to work with Cocoon / Apache

2005-10-28 Thread Glen Mazza
http://www.mail-archive.com/fop-dev@xml.apache.org/msg08481.html?--perhaps 
you will need to update your Xerces parser.


Glen

Stephen Cunliffe wrote:

Hi group,

I was hoping someone has encountered this, and found the solution 
already (my Googling didn't return any solution)


Issue:
I can't get FOP to "parse" my xml:fo file, (a simple Hello World file) 
to PDF. using:


Bea Web Server
Apache (2.0.45)* (I believe, not too sure on the exact version)
Cocoon 2.0.3, using the Xerces parser
FOP (from the above cocoon pkg.)

So, my XML is fine, I can serve it up ok
My XSL is fine, I can transform to xml:fo  (I've also successfully 
transformed many to HTML, SVG, etc.)


...but I just get text/html in the browser... no PDF...

With the following error in my log.
   <[ServletContext (...)] Root cause of 
ServletException.
java.lang.NoSuchMethodError: 
org.apache.fop.apps.Driver.getParserClassName()Ljav

a/lang/String;
   at 
org.apache.fop.configuration.ConfigurationReader.createParser(Configu...


Anyone spot the missing needle in my haystack that can save me pulling 
out my hair?


Cheers and TIA,
Steve



PS The following is a snip from my Cocoon sitemap, and an example xml:fo 
file...







 
 
 
 




http://www.w3.org/1999/XSL/Format";>
 
   page-width="21cm" margin-left="2.5cm" margin-right="2.5cm">

 
   
 
 
   
 
   Hello World
 
 
   Hello Again
 
   
 







-
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]



  1   2   >