Re: LPI and CPI vs line-height and font-size

2004-07-27 Thread john farrow
That looks like a problem with FOP.  By setting line-height="0.125in" you
should get 8 lines per inch.

If you have Acrobat you can press control-U which brings up the grid, so you
can measure things without needing to print them.

Regards

John


Visual Programming Ltd mail PO Box 22-222, Khandallah, Wellington, New
Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand
phone +64 4 479 1738 fax +64 4 479 1294 web http://www.xmlpdf.com
- Original Message - 
From: "Neil Guinto" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 28, 2004 9:42 AM
Subject: LPI and CPI vs line-height and font-size


> Are they ever the same in meaning?  Because I based my presumption on
> it, otherwise my calculation based on having a similar effect will be
> wrong then.  LPI: 8 = 1/8 in and CPI: 10 = 1/10 in.
>
> I verified the result by measuring the printed output on paper.  It was
> printed on a Lexmark Optra S 1250 laser printer.  It didn't come out
> exactly as I expect.  I tried it on the following renderers:  PDF, PCL,
> AWT.   They all have the same result.
>
> I'm using version FOP 0.20.5.
>
> Here's a sample of my FO file:
> 
> http://www.w3.org/1999/XSL/Format";>
>
>margin-bottom="0.0in" margin-top="0.0in" page-width="11in"
>page-height="8.5in" master-name="US Letter Landscape">
>
>
>
>font-family="Courier" master-reference="US Letter Landscape">
>
> 
> 
>
>JTRP006 - QPRINT  Override w/ Printer File
> Page: 1
> 
>This will print LPI(8) & CPI(10).
>This will print LPI(8) & CPI(10).
>This will print LPI(8) & CPI(10).
>This will print LPI(8) & CPI(10).
>This will print LPI(8) & CPI(10).
>This will print LPI(8) & CPI(10).
>This will print LPI(8) & CPI(10).
>This will print LPI(8) & CPI(10).
>This will print LPI(8) & CPI(10).
>This will print LPI(8) & CPI(10).
>This will print LPI(8) & CPI(10).
>
>
> 
>
>
>
>
> -
> 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]



LPI and CPI vs line-height and font-size

2004-07-27 Thread Neil Guinto
Are they ever the same in meaning?  Because I based my presumption on 
it, otherwise my calculation based on having a similar effect will be 
wrong then.  LPI: 8 = 1/8 in and CPI: 10 = 1/10 in.

I verified the result by measuring the printed output on paper.  It was 
printed on a Lexmark Optra S 1250 laser printer.  It didn't come out 
exactly as I expect.  I tried it on the following renderers:  PDF, PCL, 
AWT.   They all have the same result.

I'm using version FOP 0.20.5.
Here's a sample of my FO file:

http://www.w3.org/1999/XSL/Format";>
  
  
  margin-bottom="0.0in" margin-top="0.0in" page-width="11in"
  page-height="8.5in" master-name="US Letter Landscape">
  
  
  
  
  font-family="Courier" master-reference="US Letter Landscape">
  
   
   
  
  JTRP006 - QPRINT  Override w/ Printer File 
Page: 1
   
  This will print LPI(8) & CPI(10).
  This will print LPI(8) & CPI(10).
  This will print LPI(8) & CPI(10).
  This will print LPI(8) & CPI(10).
  This will print LPI(8) & CPI(10).
  This will print LPI(8) & CPI(10).
  This will print LPI(8) & CPI(10).
  This will print LPI(8) & CPI(10).
  This will print LPI(8) & CPI(10).
  This will print LPI(8) & CPI(10).
  This will print LPI(8) & CPI(10).
  
  



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


Border issue

2004-07-27 Thread Zaleski, Matthew (M.E.)
I saw a recent post to the list that had a slightly 
different problem than I'm experiencing.
 
I hope attachments go through to the list.  My .fo file is being 
generated via XSLT and is usually 150k to 200k in size.  I've managed to 
pare it down to 13k and still have the problem visible.  My apologies for 
it even being that large.
 
Look at the line with the light blue background.  The borders on 
extreme left are right edge are getting overwritten by the background 
color.  (the background color is bleeding on the top as well.)  I'm 
doing nested tables for layout purposes.  I've tried having the outside 
border be generated by the  and (in this example) the 
enclosing  element.  The problem doesn't change.
 
Am I making a newbie mistake or is this a fundamental problem in FOP 
0.20.5?  If it is a "feature" in 0.20.5, are there any known 
workarounds?
 
Thanks,
Matthew Zaleski
 
http://www.w3.org/1999/XSL/Format";>
   
  
 
 
 
  
   
   
  
  
  
  
  
 




   
  
  
 Table 1
  
  
   
   
  
  
 




   
  
 
	Column 1

  
  
 Column 2
 (subtitle)
  
  
 Column 3
 (subtitle)
  
   
   
  
 run 1 ***
 
  
  
 L
  
  
 3.93
  
   
   
  
 run 2
  
  
 L
  
  
 3.93
  
   
   
  
 run 3
  
  
 R
  
  
 3.90
  
   
   
  
 run 4
  
  
 R
  
  
 4.11
  
   
   
  
 Average Lefts
  
  
  
 3.94
  
   
   
  
 Average Rights
  
  
  
 4.06
  
   
   
  
 Average
  
  
 
  
  
 4.00
  
   
   
  
 Std Error
  
  
  
 0.05
  
   
   
  
 Std Error %
  
  
  
 1.20
  
   

 
  
  
   
   
  

table height problem

2004-07-27 Thread Chandrasekhar Sanku








Hi ,

 

   I am creating a pdf using fop. In the generated
pdf, the height of the table is stretched very long even the content is small.

   Why this happened? 

   Does anybody faced this problem?

   

   Expecting a positive reply …

 

Thanks & Regards,

Chandrasekhar Sanku










Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.


Re: FOP in tomcat servlet - path to fonts

2004-07-27 Thread J.Pietschmann
Ondra Nekola wrote:
This configuration works ok. But it seems impossible to change 
filesystem paths to relative ones - the font metrics aren't found.
There is a fontBaseURL for setting a base URL for
resolving relative paths to font metrics files.
I think it should be possible to create an Options
object, then set the fontBaseURL to whatever
"/" resolves in your servlet.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Partial solution: FOP in tomcat servlet - path to fonts

2004-07-27 Thread Ondra Nekola
The problem seems to be caused mainly by the fact, that working direcory 
is set to some obscure directory ($CATALINA_HOME/bin/ in
my case) in the container, so relative paths are relative to the middle of 
nowhere and not to a well defined point inside the application.

OK, I have found a partial solution. I have changed code for the
org.apache.fop.tools.URLBuilder.buildURL(String s), so it can use a
special format of URL in form resource:/my/direcory/file. The method now
looks like this:

if (spec == null)
throw new NullPointerException("spec must not be null");
File f = new File(spec);
if (f.exists()) {
return f.toURL();
}

if (spec.startsWith("resource:")) {
URL result = 
URLBuilder.class.getResource(spec.replaceFirst("resource:", ""));
if (result != null)
return result;
}

URL u1 = new URL(spec);
return u1;

This "solution" isn't perfect, but someone other can find it usefull for 
purpose of his own.

> I'm using FOP in a home-written tomcat servlet.

> 
>  metrics-file="file:///projekty/projekt/WEB-INF/classes/component/resources/timescs.xml"
>  
>   kerning="yes" embed-file="C:\WINNT\Fonts\times.ttf">
>
>
>  
> 
...
> This configuration works ok. But it seems impossible to change 
> filesystem paths to relative ones - the font metrics aren't found.
> 
-- 
   S pozdravem
   Ondrej Nekola
   [EMAIL PROTECTED]
   http://www.matfyz.cz/ondra
   ICQ# 160692888

PS: The font configuration now looks like this:

 
 
 
  

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



FOP in tomcat servlet - path to fonts

2004-07-27 Thread Ondra Nekola
I'm using FOP in a home-written tomcat servlet.
The core of my java code looks like this:

InputStream in = 
getClass().getResourceAsStream("/component/resources/fopconfig.xml");
try {
Options options = new Options(in);

} catch (Exception e1) {
...
}
Driver driver = new Driver(new InputSource(new StringReader(myXmlString)), 
response.getOutputStream());
...
driver.setRenderer(Driver.RENDER_PDF);

try {
driver.run();
} catch (Exception e) {
...
}

I have a custom fopconfig.xml, because I need to use local fonts. This 
configuration is placed in the ..myApp\WEB-INF\classes\component\resources 
directory. In the same directory there is myFont.xml - xml metrics of my 
font.
The only change to the configuration is this:

 
 
 

This configuration works ok. But it seems impossible to change 
filesystem paths to relative ones - the font metrics aren't found.

I use 1.4.2_04-b05, Apache Tomcat/5.0.24, Windows 2000 x86, and FOP 
0.20.5. I have found the same problem in the history of this conference 
several years ago - it was said to be bug of FOP. Is this still bug in FOP 
or do I do something wrong? 
 -- 
   S pozdravem
   Ondrej Nekola
   [EMAIL PROTECTED]
   http://www.matfyz.cz/ondra
   ICQ# 160692888

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



RE: Bulleted list

2004-07-27 Thread Amita Rathore

Thanks everyone.

I could solve the problem. I used •
from font-family Courier and got the bullet similar to ul in html. Works
!!

RE: Bulleted list

2004-07-27 Thread Ganesh Babu Nallamothu, Integra-India



Please 
find fo codings of bulleted list.
 

A list is content divided into two 
columns, called the label and the body. A list is created with the list-block 
element. A list-block contains one or more list-item elements, each of which 
contains exactly one list-item-label element and one list-item-body 
element.
 
An example of a simple list is 
this:
 

 

 
•
 
this is item 
one
 

 

 
•
 
this is item 
two
 

 

 
Srinivasan
 

  -Original Message-From: Amita Rathore 
  [mailto:[EMAIL PROTECTED]Sent: Monday, July 26, 2004 6:41 
  PMTo: [EMAIL PROTECTED]Subject: Bulleted 
  listWhat code can I use 
  in xsl-fo to get a bullet similat to one generated by  in 
  html ?


AW: FOP 0.20.5 and XDK 10.10.0.2.0

2004-07-27 Thread Slavko Dzalto








Hello,

 

they work together now. I
have compiled the XSQLFOPSerializer but Apache Tomcat used only the old one. In
my solution I gave the XSQLFOPSerializer a new name and it works now.

 

Slavko Dzalto

 









Von:
Slavko Dzalto [mailto:[EMAIL PROTECTED] 
Gesendet: Montag, 26. Juli 2004
13:33
An: Apache
 Mailinglist FOP
Betreff: FOP 0.20.5 and
XDK 10.10.0.2.0



 

Hello,

 

I tried to use FOP 0.20.5 and XDK 10.10.0.2.0 but
they don´t work together. If I use an older version of the XDK it works but I
have to use the new one.

 

The XDK needs a XSQLFOPSerializer class. The code of
this class is at the bottom.

 

I would by happy if someone can help me.

 

 

 

package oracle.xml.xsql.serializers;

 

import org.w3c.dom.Document;

import org.apache.fop.messaging.MessageHandler;

import oracle.xml.xsql.XSQLPageRequest;

import oracle.xml.xsql.XSQLDocumentSerializer;

import org.apache.fop.apps.Driver;

import org.apache.avalon.framework.logger.Logger;

import
org.apache.avalon.framework.logger.ConsoleLogger;

 

/**

* Tested with the FOP 0.20.3RC release from
19-Jan-2002

*/

public class XSQLFOPSerializer implements
XSQLDocumentSerializer {

private static final String PDFMIME =
"application/pdf";

public void serialize(Document doc, XSQLPageRequest
env) throws Throwable {

try {

 

// First make sure we can load the driver

Driver FOPDriver = new Driver();

 

// Tell FOP not to spit out any messages by default.

// You can modify this code to create your own FOP
Serializer

// that logs the output to one of many different
logger targets

// using the Apache LogKit API

Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO);

MessageHandler.setScreenLogger(logger);

FOPDriver.setLogger(logger);

 

// Some of FOP's messages appear to still use
MessageHandler.

MessageHandler.setOutputMethod(MessageHandler.NONE);

 

// Then set the content type before getting the
reader/

env.setContentType(PDFMIME);

 

FOPDriver.setOutputStream(env.getOutputStream());

FOPDriver.setRenderer(FOPDriver.RENDER_PDF);

FOPDriver.render(doc);

}

catch (Exception e) {

// Cannot write PDF output for the error anyway.

// So maybe this stack trace will be useful info

e.printStackTrace(System.err);

}

}

}

 








Re: FOP 0.20.5 and XDK 10.10.0.2.0

2004-07-27 Thread Peter B. West
Jörg, I love your work.
Peter
J.Pietschmann wrote:
Slavko Dzalto wrote:
I tried to use FOP 0.20.5 and XDK 10.10.0.2.0 but they don´t work 
together. If I use an older version of the XDK it works but I have to 
use the new one.

Are there any details available about the "don't work
together" part? Like: error messages, stack traces,
browser behaviour description etc.
J.Pietschmann
--
Peter B. West 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: FOP 0.20.5 and XDK 10.10.0.2.0

2004-07-27 Thread Glen Mazza
My thinking is that this might be an question for a
relevant Oracle ML (one for JDeveloper, perhaps). 
IIRC  their XDK incorporates FOP 0.20.4.

Another option for Slavko might be: can you use FOP
separate from the XDK?  I.e., perhaps just use the XDK
to get the XML, and then use FOP "natively" to
generate the PDF.  You may wish to look at our
embedding examples
http://xml.apache.org/fop/embedding.html to see if you
can use FOP in this manner.

Glen

--- "J.Pietschmann" <[EMAIL PROTECTED]> wrote:
> Slavko Dzalto wrote:
> > I tried to use FOP 0.20.5 and XDK 10.10.0.2.0 but
> they don´t work 
> > together. If I use an older version of the XDK it
> works but I have to 
> > use the new one.
> 
> Are there any details available about the "don't
> work
> together" part? Like: error messages, stack traces,
> browser behaviour description etc.
> 
> J.Pietschmann


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