FOP+Graphics

2001-11-19 Thread Matthias Fischer

I summarized the advice supplied by Christian Beer in an HTML document
(enclosed). You can use it for the FOP online documentation.

Regards,

Matthias


Mit freundlichen Grüßen

Dott. Matthias Fischer
abc.Mediaservice GmbH

Nebelhornstraße 8
86807 Buchloe
Tel. (08241) 9686-38
Fax  (08241) 9686-26
http://www.abc-media.de
e-mail: [EMAIL PROTECTED]

ein Unternehmen der abc.Mediengruppe



Graphics in FO
(FOP v.0.20.1/Cocoon v.2 rc.2)


No vector graphics are possible. Only possible formats: TIF, GIF, JPG.
The following rules apply to graphics in FO:



  Feature
  TIF
  GIF
  JPG


  DPI setting in FO
  Should be possible to set attribute "dpi" in FO (did not try out whether it works or not)
  Always rendered as 96dpi, cannot specifiy otherwise
  Can specifiy otherwise, but always rendered as 72dpi


  Image size
  Can force TIF into specific resolution, e.g. 305 dpi, by specifying attributes "width" and "height"; better specify both attributes
  Although attributes "width" and/or "height" are specified, image is computed to its 96dpi dimensions
  Can force JPG into resolution different than 72dpi by specifiying attributes "width" and "height"; better specifiy both attributes





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


AW: FOP+Graphics

2001-11-19 Thread Beer, Christian

Hi Matthias!

Looking at the HTML, I think you understood my advices wrong!
I think will send you a eMail in german (because I can explain 
better)!

Christian

-Ursprüngliche Nachricht-
Von: Matthias Fischer [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 19. November 2001 10:40
An: FOP-Liste
Betreff: FOP+Graphics


I summarized the advice supplied by Christian Beer in an HTML document
(enclosed). You can use it for the FOP online documentation.

Regards,

Matthias


Mit freundlichen Grüßen

Dott. Matthias Fischer
abc.Mediaservice GmbH

Nebelhornstraße 8
86807 Buchloe
Tel. (08241) 9686-38
Fax  (08241) 9686-26
http://www.abc-media.de
e-mail: [EMAIL PROTECTED]

ein Unternehmen der abc.Mediengruppe



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




Re: Question about colour

2001-11-19 Thread Ulrich Mayring

Tore Engvig wrote:
 
 The short version is that a color profile is errr, a color profile :)
 The point is to make color handling consistent. Let's assume that you have a
 calibrated system (you must have a calibrated system if it should be any
 point).
 Then you scan an image, edit it in photoshop and sends it to a printer. All
 those devices (your scanner, screen and printer) probably have different
 color profiles and by embedding an icc profile you ensure (well, almost)
 that what you see on the screen is the same that comes out of your printer).

Here's some basics about ICC profiles:

You can embed an ICC profile into your image. The embedded profile tells
the recipient of the image about the device used to create the image,
e.g. the scanner. If you're using Photoshop (or another ICC-enabled
tool) to view the image, then you can define your desired output device
(by pointing Photoshop to the output device's ICC profile). You also
point Photoshop to a profile of your screen. Then Photoshop can take all
three profiles into account and display the image correctly on your
screen. Correctly in this case means the way it would look, when printed
to the specified output device.

So, an ICC profile is a description of the color space of some kind of
input, display or output device. Here's how you create profiles:

1) Print an ICC testchart (consists of many color patches) to your
output device.
2) Use an expensive hardware device to measure the print.
3) Use an expensive software to read in the measured values and compare
them to the actual values in the testchart file.
4) Tell the expensive software to encode the differences in an ICC
profile.

In the case of a monitor profile, there's a different type of expensive
hardware device to measure the colors and you don't print the testchart,
you display it on the screen. Finally, to get round-trip color safety,
you can scan the printed ICC testchart with your scanner to calculate a
profile for your scanner.

Apart from embedding ICC profiles into images (or, for that matter, PDF
or PostScript files), there's many other use cases for ICC color
management technology, which probably are not relevant to fop at this
time, so I'll leave that out for the moment.

 sRGB is a limited color space, there are a lot of colors you can't express
 in sRGB. E.g. pastel colors can be described in CMYK but not in RGB.

sRGB is almost useless for any kind of serious color management. It may
be good enough for office-use, even though I doubt it would do a
secretary any good either. There is no RGB standard out there, period.
The only one that makes sense from a technical point of view and has
some distribution is Adobe RGB. It's proprietary, of course, but it's
good quality. Generally it's not that bad to use proprietary color
spaces, because it has no consequences for your application. Internally
every application should work with the LAB color space, which includes
all colors known to man and is an accepted international standard (CIE
being the standards body in this area). If your app works with LAB
internally, then other color spaces like Adobe RGB or SWOP CMYK are just
bytes you read in or write out.

 My knowledge about these things is limited but if you ask someone in the
 press industry they can lecture you hours about problems with reproducing
 colors (just don't belive everything they say about CMYK - it's not that
 great :)

CMYK sucks, but it beats sRGB any day. This is a real shame, because RGB
in general is a much larger color space - and no computer monitor I know
of is limited to sRGB colors.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

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




FOP+GRaphics

2001-11-19 Thread Matthias Fischer

The enclosed file replaces the one mailed earlier today.

This how far I got. If someone wants to elaborate on the subject, let the
list members know. The aim would be to supply a (non-theoretical, because
theory with FOP sometimes is different from reality) description of graphics
in FOP/Cocoon.

Best regards,

Matthias


 MattFi9A.htm

Title: Graphics with FOP





Graphics with FOP
(FOP v.0.20.1/Cocoon v.2 rc.2)


Both vector and pixel graphics are possible.
Vector format(s)

SVG

Pixel format(s):

TIF
BMP
GIF
JPG
PNG
TGA


The following rules apply to graphics in FO (most frequent formats):



  Feature
  TIF
  JPG
  GIF


  Internal dpi rate 
  (to be set inside image editing program)
 
  Any
  Any
  96dpi per default


  Rendering resolution
  Internal dpi rate overridden by 72dpi default rendering resolution

 
 
   Attention!
 
 
   FOP enlarges graphics proportionally, the internal dpi rate of which is higher than 72dpi.
 
 

 


  Rendering size
  If not specified using the "width" and "height" attributes, the rendering size of an image is calculated by FOP out of the 72dpi default rendering resolution

 
 
   Attention!
 
 
   FOP skips without error message enlarged graphics, the rendering dimensions of which exceed the size of their container, e.g. fo:block. These graphics are not displayed in the rendered PDF document.
 
 

 






  Note...


  To ensure controlled image rendering when creating PDF's for printout with FOP, create e.g. TIF graphics in image editor with the envisaged rendering size (width, height), e.g. at 305dpi (appropriate rendering resolution). Specify rendering size in FO setting the attributes "width" and "height" accordingly.
 Alternatively, create graphic in image editor with a multiple ("n") of the envisaged rendering size (width, height), setting an internal dpi rate which is a fraction ("1/n") of the envisaged rendering resolution, which might be again 305dpi. The outcome is the same as above.






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


Re: Support for ICC profiles and CMYK jpeg

2001-11-19 Thread Thomas

am 16.11.2001 19:18 Uhr schrieb Tore Engvig unter [EMAIL PROTECTED]:

 
 I've just added support for ICC profiles and CMYK jpeg's.
 Source code, a prebuilt jop.jar and a test pdf can be found at
 http://vaggen.net/~tengvig/fop/
 
 Caveat: PhotoShop generates inverted cmyk jpegs. I've added a decode matrix
 in PDFXObject to deal with it. Thus PhotoShop generated cmyk jpeg's will
 look fine, but I guess cmyk jpegs generated from other applications will
 become inverted. Does anyone have a clue how to check if a jpeg is inverted?
 
 I've not added it to cvs yet, there are routing problems between me and the
 cvs server (loop at iad1-lga1-oc192-2.iad1.above.net).
 
 
 Tore
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 


hallo,

i have added your support to fop, and it works for cmyk-pictures from
photoshop. when i convert with jai-classes a rgb to cmyk it looks
very good in photoshop, but very bad in fop. perhaps you know
what i have to change in the code. i think it must be on the jpeg-files,
perhaps i have to generated a numbering for the colors, but i don't know
where.

thanks.

thomas kübler


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




TOC

2001-11-19 Thread Kunal Mittal
Title: TOC





All -


How do I create a TOC using FOP. Any examples would help.


Thanks
Kunal





RE: New FOP Code Don't Work

2001-11-19 Thread Shkuro, Yuri

 I could not get driver.setLogger(logger); to compile.  
 The versions I have of FOP (0.19 and 0.20.1) do not have a
  ^^^

  Wow!  You neglected to mention that, didn't you? ;-)  I guess
I had to be more specific about which version of FOP I use when
I posted the code.

  0.20.1 never worked for me at all, I had to build from CVS
until 0.20.2RC came out.  With 0.19 the method works, but
FOP doesn't really produce the PDF on the fly, instead it
builds the whole FO tree in memory, and after the parsing is
done you have to call 

driver.format();
driver.render();

In other words, you don't buy much by using SAX events with 0.19.
0.20.2RC has a major improvement for more streamlined processing.

Yuri.

-Original Message-
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 3:02 PM
To: [EMAIL PROTECTED]
Subject: RE: New FOP Code Don't Work


The method that calls my renderFo creates the iInputSource as follows:
Source iInputSource= new StreamSource(new StringReader(xmlString));

My translator is cached, and worked fine with my orginal code.

I get no exceptions.  Where would I see error messages?

I could not get driver.setLogger(logger); to compile.  The versions I have
of FOP (0.19 and 0.20.1) do not have a
org.apache.fop.apps.Driver.setLogger(org.apache.log.Logger) method.

I am using Xalan/Xerces, does this matter?

Jim

-Original Message-
From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 1:42 PM
To: '[EMAIL PROTECTED]'
Subject: RE: New FOP Code Don't Work


As far as I can tell, the code is correct (although you didn't indicate
how you create iInputSource).  Are you sure you are not getting any
exceptions, error messages, etc.?


 -Original Message-
 From: Jim Urban [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 19, 2001 2:38 PM
 To:   [EMAIL PROTECTED]
 Subject:  New FOP Code Don't Work

 Recently someone suggested using SAX events to run XML through XSLT then
 FOP and to send the PDF back to the browser from a servlet.  I tried
 implmenting this (see code below) but all I don't get any output back.  I
 even routed the output to a file, and the file was empty.  My old code
 worked great, but I was told I was wasting memory.  Can someone tell me
 why this code does not work?

 Thanks,

 Jim Urban
 Product Manager
 Netsteps Inc.
 Suite 505E
 1 Pierce Pl.
 Itasca, IL  60143
 Voice:  (630) 250-3045 x2164
 Fax:  (630) 250-3046


   public void renderFO(Transformer pdfTransformer, Source
 iInputSource, HttpServletResponse uResponse)
   {
   try
   {
   OutputStream out = uResponse.getOutputStream();
   uResponse.setContentType(application/pdf);
   Driver driver = new Driver();
   driver.setRenderer(driver.RENDER_PDF);
   driver.setOutputStream(out);
   // ---
   // Create SAXResult based on FOP Driver content
 handler
   // which will accept SAX events and build FOP tree
   // ---
   Result saxResult = new
 SAXResult(driver.getContentHandler());

   // Use the Transformer to transform an XML Source
 and
   // send the output to a Result object. Implicitely
 it will
   // create the FOP tree by firing SAX events.
   pdfTransformer.transform(iInputSource, saxResult);

   // The user is already viewing the PDF!
   out.flush();
   out.close();
   }
   catch (TransformerException e1)
   {
   System.err.println(Unable to generate PDF:   +
 e1.toString());
   }
   catch (IOException e2)
   {
   System.err.println(File error:   + e2.toString());
   }
   }
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

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



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

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




RE: New FOP Code Don't Work

2001-11-19 Thread Savino, Matt C

Make sure you have both namespaces in your stylesheet:

xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:fo=http://www.w3.org/1999/XSL/Format;

I spent several days wrestling with this one :(

-Matt



 -Original Message-
 From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 19, 2001 12:09 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: New FOP Code Don't Work
 
 
  I could not get driver.setLogger(logger); to compile.  
  The versions I have of FOP (0.19 and 0.20.1) do not have a
   ^^^
 
   Wow!  You neglected to mention that, didn't you? ;-)  I guess
 I had to be more specific about which version of FOP I use when
 I posted the code.
 
   0.20.1 never worked for me at all, I had to build from CVS
 until 0.20.2RC came out.  With 0.19 the method works, but
 FOP doesn't really produce the PDF on the fly, instead it
 builds the whole FO tree in memory, and after the parsing is
 done you have to call 
 
   driver.format();
   driver.render();
 
 In other words, you don't buy much by using SAX events with 0.19.
 0.20.2RC has a major improvement for more streamlined processing.
 
 Yuri.
 
 -Original Message-
 From: Jim Urban [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 19, 2001 3:02 PM
 To: [EMAIL PROTECTED]
 Subject: RE: New FOP Code Don't Work
 
 
 The method that calls my renderFo creates the iInputSource as follows:
 Source iInputSource= new StreamSource(new StringReader(xmlString));
 
 My translator is cached, and worked fine with my orginal code.
 
 I get no exceptions.  Where would I see error messages?
 
 I could not get driver.setLogger(logger); to compile.  The 
 versions I have
 of FOP (0.19 and 0.20.1) do not have a
 org.apache.fop.apps.Driver.setLogger(org.apache.log.Logger) method.
 
 I am using Xalan/Xerces, does this matter?
 
 Jim
 
 -Original Message-
 From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 19, 2001 1:42 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: New FOP Code Don't Work
 
 
 As far as I can tell, the code is correct (although you 
 didn't indicate
 how you create iInputSource).  Are you sure you are not getting any
 exceptions, error messages, etc.?
 
 
  -Original Message-
  From:   Jim Urban [mailto:[EMAIL PROTECTED]]
  Sent:   Monday, November 19, 2001 2:38 PM
  To: [EMAIL PROTECTED]
  Subject:New FOP Code Don't Work
 
  Recently someone suggested using SAX events to run XML 
 through XSLT then
  FOP and to send the PDF back to the browser from a servlet.  I tried
  implmenting this (see code below) but all I don't get any 
 output back.  I
  even routed the output to a file, and the file was empty.  
 My old code
  worked great, but I was told I was wasting memory.  Can 
 someone tell me
  why this code does not work?
 
  Thanks,
 
  Jim Urban
  Product Manager
  Netsteps Inc.
  Suite 505E
  1 Pierce Pl.
  Itasca, IL  60143
  Voice:  (630) 250-3045 x2164
  Fax:  (630) 250-3046
 
 
  public void renderFO(Transformer pdfTransformer, Source
  iInputSource, HttpServletResponse uResponse)
  {
  try
  {
  OutputStream out = uResponse.getOutputStream();
  uResponse.setContentType(application/pdf);
  Driver driver = new Driver();
  driver.setRenderer(driver.RENDER_PDF);
  driver.setOutputStream(out);
  // ---
  // Create SAXResult based on FOP Driver content
  handler
  // which will accept SAX events and 
 build FOP tree
  // ---
  Result saxResult = new
  SAXResult(driver.getContentHandler());
 
  // Use the Transformer to transform an 
 XML Source
  and
  // send the output to a Result object. 
 Implicitely
  it will
  // create the FOP tree by firing SAX events.
  pdfTransformer.transform(iInputSource, 
 saxResult);
 
  // The user is already viewing the PDF!
  out.flush();
  out.close();
  }
  catch (TransformerException e1)
  {
  System.err.println(Unable to generate PDF:   +
  e1.toString());
  }
  catch (IOException e2)
  {
  System.err.println(File error:   + 
 e2.toString());
  }
  }
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, email: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: 

RE: New FOP Code Don't Work

2001-11-19 Thread Jim Urban

Sorry about not mentioning the level up front.  I'll download 0.20.2RC and
try it.  Question:  Is 0.20.2RC solid enough for production use?

Jim

-Original Message-
From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 2:09 PM
To: '[EMAIL PROTECTED]'
Subject: RE: New FOP Code Don't Work


 I could not get driver.setLogger(logger); to compile.
 The versions I have of FOP (0.19 and 0.20.1) do not have a
  ^^^

  Wow!  You neglected to mention that, didn't you? ;-)  I guess
I had to be more specific about which version of FOP I use when
I posted the code.

  0.20.1 never worked for me at all, I had to build from CVS
until 0.20.2RC came out.  With 0.19 the method works, but
FOP doesn't really produce the PDF on the fly, instead it
builds the whole FO tree in memory, and after the parsing is
done you have to call

driver.format();
driver.render();

In other words, you don't buy much by using SAX events with 0.19.
0.20.2RC has a major improvement for more streamlined processing.

Yuri.

-Original Message-
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 3:02 PM
To: [EMAIL PROTECTED]
Subject: RE: New FOP Code Don't Work


The method that calls my renderFo creates the iInputSource as follows:
Source iInputSource= new StreamSource(new StringReader(xmlString));

My translator is cached, and worked fine with my orginal code.

I get no exceptions.  Where would I see error messages?

I could not get driver.setLogger(logger); to compile.  The versions I have
of FOP (0.19 and 0.20.1) do not have a
org.apache.fop.apps.Driver.setLogger(org.apache.log.Logger) method.

I am using Xalan/Xerces, does this matter?

Jim

-Original Message-
From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 1:42 PM
To: '[EMAIL PROTECTED]'
Subject: RE: New FOP Code Don't Work


As far as I can tell, the code is correct (although you didn't indicate
how you create iInputSource).  Are you sure you are not getting any
exceptions, error messages, etc.?


 -Original Message-
 From: Jim Urban [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 19, 2001 2:38 PM
 To:   [EMAIL PROTECTED]
 Subject:  New FOP Code Don't Work

 Recently someone suggested using SAX events to run XML through XSLT then
 FOP and to send the PDF back to the browser from a servlet.  I tried
 implmenting this (see code below) but all I don't get any output back.  I
 even routed the output to a file, and the file was empty.  My old code
 worked great, but I was told I was wasting memory.  Can someone tell me
 why this code does not work?

 Thanks,

 Jim Urban
 Product Manager
 Netsteps Inc.
 Suite 505E
 1 Pierce Pl.
 Itasca, IL  60143
 Voice:  (630) 250-3045 x2164
 Fax:  (630) 250-3046


   public void renderFO(Transformer pdfTransformer, Source
 iInputSource, HttpServletResponse uResponse)
   {
   try
   {
   OutputStream out = uResponse.getOutputStream();
   uResponse.setContentType(application/pdf);
   Driver driver = new Driver();
   driver.setRenderer(driver.RENDER_PDF);
   driver.setOutputStream(out);
   // ---
   // Create SAXResult based on FOP Driver content
 handler
   // which will accept SAX events and build FOP tree
   // ---
   Result saxResult = new
 SAXResult(driver.getContentHandler());

   // Use the Transformer to transform an XML Source
 and
   // send the output to a Result object. Implicitely
 it will
   // create the FOP tree by firing SAX events.
   pdfTransformer.transform(iInputSource, saxResult);

   // The user is already viewing the PDF!
   out.flush();
   out.close();
   }
   catch (TransformerException e1)
   {
   System.err.println(Unable to generate PDF:   +
 e1.toString());
   }
   catch (IOException e2)
   {
   System.err.println(File error:   + e2.toString());
   }
   }
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

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



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

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

RE: New FOP Code Don't Work

2001-11-19 Thread Jim Urban

Using 0.20.2RC did the trick.  Now all I have to do is get rid of all the
messages in my Catalina window.  I'm sure the logger should take care of
this.

Thanks,

Jim

-Original Message-
From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 2:09 PM
To: '[EMAIL PROTECTED]'
Subject: RE: New FOP Code Don't Work


 I could not get driver.setLogger(logger); to compile.
 The versions I have of FOP (0.19 and 0.20.1) do not have a
  ^^^

  Wow!  You neglected to mention that, didn't you? ;-)  I guess
I had to be more specific about which version of FOP I use when
I posted the code.

  0.20.1 never worked for me at all, I had to build from CVS
until 0.20.2RC came out.  With 0.19 the method works, but
FOP doesn't really produce the PDF on the fly, instead it
builds the whole FO tree in memory, and after the parsing is
done you have to call

driver.format();
driver.render();

In other words, you don't buy much by using SAX events with 0.19.
0.20.2RC has a major improvement for more streamlined processing.

Yuri.

-Original Message-
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 3:02 PM
To: [EMAIL PROTECTED]
Subject: RE: New FOP Code Don't Work


The method that calls my renderFo creates the iInputSource as follows:
Source iInputSource= new StreamSource(new StringReader(xmlString));

My translator is cached, and worked fine with my orginal code.

I get no exceptions.  Where would I see error messages?

I could not get driver.setLogger(logger); to compile.  The versions I have
of FOP (0.19 and 0.20.1) do not have a
org.apache.fop.apps.Driver.setLogger(org.apache.log.Logger) method.

I am using Xalan/Xerces, does this matter?

Jim

-Original Message-
From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 1:42 PM
To: '[EMAIL PROTECTED]'
Subject: RE: New FOP Code Don't Work


As far as I can tell, the code is correct (although you didn't indicate
how you create iInputSource).  Are you sure you are not getting any
exceptions, error messages, etc.?


 -Original Message-
 From: Jim Urban [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 19, 2001 2:38 PM
 To:   [EMAIL PROTECTED]
 Subject:  New FOP Code Don't Work

 Recently someone suggested using SAX events to run XML through XSLT then
 FOP and to send the PDF back to the browser from a servlet.  I tried
 implmenting this (see code below) but all I don't get any output back.  I
 even routed the output to a file, and the file was empty.  My old code
 worked great, but I was told I was wasting memory.  Can someone tell me
 why this code does not work?

 Thanks,

 Jim Urban
 Product Manager
 Netsteps Inc.
 Suite 505E
 1 Pierce Pl.
 Itasca, IL  60143
 Voice:  (630) 250-3045 x2164
 Fax:  (630) 250-3046


   public void renderFO(Transformer pdfTransformer, Source
 iInputSource, HttpServletResponse uResponse)
   {
   try
   {
   OutputStream out = uResponse.getOutputStream();
   uResponse.setContentType(application/pdf);
   Driver driver = new Driver();
   driver.setRenderer(driver.RENDER_PDF);
   driver.setOutputStream(out);
   // ---
   // Create SAXResult based on FOP Driver content
 handler
   // which will accept SAX events and build FOP tree
   // ---
   Result saxResult = new
 SAXResult(driver.getContentHandler());

   // Use the Transformer to transform an XML Source
 and
   // send the output to a Result object. Implicitely
 it will
   // create the FOP tree by firing SAX events.
   pdfTransformer.transform(iInputSource, saxResult);

   // The user is already viewing the PDF!
   out.flush();
   out.close();
   }
   catch (TransformerException e1)
   {
   System.err.println(Unable to generate PDF:   +
 e1.toString());
   }
   catch (IOException e2)
   {
   System.err.println(File error:   + e2.toString());
   }
   }
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

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



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

-
To unsubscribe, e-mail: [EMAIL 

[Bug 4562]: XSL 1.0 uses master-reference now, not master-name

2001-11-19 Thread Norman Walsh

Can anyone suggest when this bug might be addressed? I need to decide when to
upgrade the DocBook stylesheets. I'm in a bind now with some tools expecting the
last call syntax and some expecting the REC syntax.

Be seeing you,
  norm

-- 
[EMAIL PROTECTED]   | Where are you dying tonight?--Evelyn Waugh
XML Standards Engineer |
XML Technology Center  | 
Sun Microsystems, Inc. | 

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




keep-with-next?

2001-11-19 Thread Savino, Matt C

It's my understanding that keep-with-next=always at the row level is the
only keep-together | with-*=* property currently implemented in FOP. Is
this true? I've also noticed that if the number of rows included is too big
to fit on one page, you get an endless loop. This makes keep-with-next
unusable for me in 90% of the places where I would like to use it. Are there
any solutions I'm overlooking here?

Thanks a lot,
-Matt


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




Re: Support for ICC profiles and CMYK jpeg

2001-11-19 Thread ektan


hi Thomas,

I can't download the source code that you provided for rendering  CMYK jpeg
in pdf file, so, can you please send it to me, thank you very much.


best rgds,
ektan






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




Inline text-align problem

2001-11-19 Thread David Warnock

Hi,

I am trying to format a line with 3 elements one to be left aligned, one 
centered and one right aligned.

 From my reading I believe the following should work.

  fo:static-content flow-name=toc-first-page-header
fo:block
  fo:inline text-align=left
left text
  /fo:inline
  fo:inline text-align=center
center text
  /fo:inline
  fo:inline text-align=right
right text
  /fo:inline
/fo:block
  /fo:static-content


But the text all comes out just as if there are no inline elements ie 
all on one line with each inline element continuing immediately after 
the one before.

Am I doing something wrong or is this expected in fop 0.20.2?

Thanks

Dave


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