Re: horizontal line won't print?

2001-11-15 Thread Matt Savino

Thanks Maneshi. I tried leader but I couldn't seem to get it to come
close enough to text above. There alway seems to be a several pixel gap
no matter what settings I try. I think I've managed to get table-cell
borders to do what I want.

thx
-Matt

Maneshi Tuli wrote:
> 
> For horizental line , i am using this code and it is working for me , u can try also 
>, might be it help u
> 
> 
>  color="green" />
>  
> 
> thanks
> 
>  Message History 
>
> 
> From: Matt Savino <[EMAIL PROTECTED]> on 11/13/2001 06:14 PM PST
> 
> Please respond to [EMAIL PROTECTED]
> 
> To:   "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> cc:
> Subject:  horizontal line won't print?
> 
> I've been using this constriction for the occasional horizontal line in
> my reports:
> 
>  space-before.optimum="4pt" space-after.optimum="4pt"
> line-height="1pt">
> 
> I like it because it's independent of any table structures I insert it
> into. Problem is, while it looks fine in the PDF viewer, the line
> doesn't print. Also, no matter what I set the line-height to, it seems
> to come out 1pt.
> 
> The only other way I know to get a horizontal line--that does print--is
> a table (or table-cell) border. Has anyone else seen this phenomenon,
> and does anyone know of an easy way to insert horizontal lines that show
> up in print?
> 
> thanks a lot,
> Matt
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 
> --
> 
> This e-mail may contain confidential and/or privileged information. If you are not 
>the intended recipient (or have received this e-mail in error) please notify the 
>sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
>distribution of the material in this e-mail is strictly forbidden.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

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




fop generation

2001-11-15 Thread Maneshi Tuli


Hi ,
I want to generate fo into memory not into file system
currently i am doing like t his


StreamSource xslSrc=   //read from string //
  StreamSource xmlSrc= //read from string //
  StringBuffer sb = new StringBuffer();

 I WANT TO DO THIS STEP INTO MEMORY like IN any INPUT STream
  StreamResult sr= new 
StreamResult("C:\\XMLWork\\HTML\\InSight\\html\\english\\FullPage\\testBal.fo");

  //StreamResult sr= new StreamResult(fopout);
  tb.realTransformer(xmlSrc, xslSrc, sr, m);
  System.out.print("done FO part");

   File inFile = new 
File("C:\\XMLWork\\HTML\\InSight\\html\\english\\FullPage\\testBal.fo");
   Driver driver = new Driver(new InputSource(new FileInputStream (inFile)),out);


 I WANT TO READ FO From Stream not from filesystem

 plz can u give me any idea which stream i can use
thanks

Maneshi Tuli
  212-454-1646 (O)
  732 -882-0353(H)



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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




Re: printing embedded fonts from Linux

2001-11-15 Thread jthaemlitz



We're using the standard lpr/lpd on the neoware boxes.  In our testing,
lpr/lpd is pointing to a instance of Mocha lpd on an NT box.
Any of our stores that have a PC use Mocha as the print server
for the neoware boxes.  In which case they could print from the PC, so
we're realy only concerned with neoware boxes with direct connections to
Lexmark printers.  We can print pdf's with default fonts.  I'm
thinking it's a problem with the postscript and Linux not having access to
the embedded font.

JohnPT



   
  
Ulrich Mayring <[EMAIL PROTECTED]> 
  
Sent by:   To: 
[EMAIL PROTECTED]
fop-dev-return-11553-jthaemlitz=oreillyauto.com@XML.   cc: 
  
APACHE.ORG 
Subject: Re: printing embedded fonts from Linux   
   
  
   
  
11/15/01 10:50 AM  
  
Please respond to fop-dev  
  
   
  
   
  




[EMAIL PROTECTED] wrote:
>
> this is a little off topic, if I could get pointed to some documetation
> that would be great.  Othewise if you have a solution or some knowledge
to
> pass on I'd appreciate it.
>
> We have 800+ neoware boxes that we're sending FOP generated PDF's too.
The
> PDF's display the embedded font (Aachen) correctly.  However when we go
to
> print nothing happens.  The printer fires up, says "flushing buffer" then
> just stops.  We can print the same PDF to the printer from NT.  The
> embedded font is a PFM.  What do we need to do to get these to print?

What printing software do you use? Have you looked at CUPS?

Ulrich

--
Ulrich Mayring
DENIC eG, Systementwicklung

-
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: printing embedded fonts from Linux

2001-11-15 Thread Jim Wright

Hey John:

Try downloading the font to printer memory directly before sending in the
pdfs. Use font downloader (or another similar tool) to get the font directly
into printer RAM.

The "flushing buffer" message often refers to printer documents that are
either damaged, or exceed printer memory for some reason.

Hope that helps.

jw

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 15, 2001 10:32 AM
To: [EMAIL PROTECTED]
Subject: printing embedded fonts from Linux

this is a little off topic, if I could get pointed to some documetation
that would be great.  Othewise if you have a solution or some knowledge to
pass on I'd appreciate it.

We have 800+ neoware boxes that we're sending FOP generated PDF's too.  The
PDF's display the embedded font (Aachen) correctly.  However when we go to
print nothing happens.  The printer fires up, says "flushing buffer" then
just stops.  We can print the same PDF to the printer from NT.  The
embedded font is a PFM.  What do we need to do to get these to print?
We've tried selecting the different levels of postscript (thought
postscript 1 would do it ) from acrobats print dialog, but no dice.

Thanks for any help.

JohnPT





-
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: printing embedded fonts from Linux

2001-11-15 Thread Ulrich Mayring

[EMAIL PROTECTED] wrote:
> 
> this is a little off topic, if I could get pointed to some documetation
> that would be great.  Othewise if you have a solution or some knowledge to
> pass on I'd appreciate it.
> 
> We have 800+ neoware boxes that we're sending FOP generated PDF's too.  The
> PDF's display the embedded font (Aachen) correctly.  However when we go to
> print nothing happens.  The printer fires up, says "flushing buffer" then
> just stops.  We can print the same PDF to the printer from NT.  The
> embedded font is a PFM.  What do we need to do to get these to print?

What printing software do you use? Have you looked at CUPS?

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

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




printing embedded fonts from Linux

2001-11-15 Thread jthaemlitz

this is a little off topic, if I could get pointed to some documetation
that would be great.  Othewise if you have a solution or some knowledge to
pass on I'd appreciate it.

We have 800+ neoware boxes that we're sending FOP generated PDF's too.  The
PDF's display the embedded font (Aachen) correctly.  However when we go to
print nothing happens.  The printer fires up, says "flushing buffer" then
just stops.  We can print the same PDF to the printer from NT.  The
embedded font is a PFM.  What do we need to do to get these to print?
We've tried selecting the different levels of postscript (thought
postscript 1 would do it ) from acrobats print dialog, but no dice.

Thanks for any help.

JohnPT





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




FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics

2001-11-15 Thread Matthias Fischer

Thanks to Got and Christian from DIRON.de in Münster/Germany I got my
Corporate Design together.
Now my probably last question before I leave for a well-deserved weekend
(maybe the information is of any interest also to others): Everything
explained by Christian worked at 305dpi. Is there a limit to the dpi's
Cocoon/FOP/PDF support?


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: Difficulties embedding FOP by firing SAX events myself

2001-11-15 Thread Smith, Paul

That is a much more sensible than messing about with pretend XMLReaders.

Cheers

---
Paul Smith


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 15 November 2001 13:55
> To: [EMAIL PROTECTED]
> Subject: Re: Difficulties embedding FOP by firing SAX events myself
> 
> 
> 
> This is the code I use to get the handler.  I don't set the 
> input stream at
> all.  The setup order is hightly dependent.  This works on 0.20.2.
> 
> // THIS IS JUST SOME SET UP CODE
> // set up Logger
> Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
> PatternFormatter formatter = new PatternFormatter( "
> [%{priority}]:%{message}\n%{throwable}" );
> LogTarget target = new StreamTarget(System.out, formatter);
> hierarchy.setDefaultLogTarget(target);
> Logger log = hierarchy.getLoggerFor("fop");
> // get output stream one way or
> FileOutputStream out = new FileOutputStream( "filename.pdf" );
> 
> // HERE's THE CODE YOU NEED
> Driver driver = new Driver();
> driver.setOutputStream(out);
> driver.setLogger( log );
> driver.setRenderer( driver.RENDER_PDF );
> DefaultHandler handler = (DefaultHandler) 
> driver.getContentHandler() );
> handler.startDocument();
> ...
> handler.endDocument();
> out.close(); 


***
DISCLAIMER: The information contained in this email
 is confidential and is intended solely for the use of the
 named addressee.  Access, copying or re-use of the
 information in it by any other person is not authorised.



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




ANN: Hands-on XSLFO tutorial in Orlando December 10 is at risk

2001-11-15 Thread G. Ken Holman

Hi folks,

Just a quick note to those who were planning to attend the big conference 
in Orlando in December.  IDEAlliance is a business and has to have a 
business case to run each of the tutorials being staged at the conference.

There are as yet not enough pre-registrations for the hands-on XSLFO course 
being held Monday December 10 at XML'2001, so the course is at risk:

   http://www.xmlconference.org/xmlusa/2001/montutorialsfull.htm#5

(The North American perspective on XSLFO must be different than in Europe 
as there were 30 people at the Berlin delivery in May and 28 people at the 
Amsterdam delivery in September).

Note this is preceded the day before by our hands-on XSLT/XPath course, 
which is not at risk:

   http://www.xmlconference.org/xmlusa/2001/suntutorialsfull.htm#5

If you were planning to register for the course when you get there, the 
course may not be available due to the low pre-registrations.  To see the 
syllabi of all of our instructor-led courses, please follow the 
"Instructor-led lecture and hands-on delivery calendar" link on our home 
page noted below.

Thanks!

. Ken

cc:
XSLFO
XSLFO-WWW
fop-dev

--
G. Ken Holman  mailto:[EMAIL PROTECTED]
Crane Softwrights Ltd.   http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999   (Fax:-0995)
Web site: XSL/XML/DSSSL/SGML/OmniMark services, training, products.
Book:  Practical Transformation Using XSLT and XPath ISBN 1-894049-06-3
Article: What is XSLT? http://www.xml.com/pub/2000/08/holman/index.html
Next public training (instructor-live, Internet-live, and web-based):
-   2001-11-19,11-21,12-03,12-05,12-09,12-10,12-19,2002-02-18,02-21


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




Re: Difficulties embedding FOP by firing SAX events myself

2001-11-15 Thread jthaemlitz


This is the code I use to get the handler.  I don't set the input stream at
all.  The setup order is hightly dependent.  This works on 0.20.2.

// THIS IS JUST SOME SET UP CODE
// set up Logger
Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
PatternFormatter formatter = new PatternFormatter( "
[%{priority}]:%{message}\n%{throwable}" );
LogTarget target = new StreamTarget(System.out, formatter);
hierarchy.setDefaultLogTarget(target);
Logger log = hierarchy.getLoggerFor("fop");
// get output stream one way or
FileOutputStream out = new FileOutputStream( "filename.pdf" );

// HERE's THE CODE YOU NEED
Driver driver = new Driver();
driver.setOutputStream(out);
driver.setLogger( log );
driver.setRenderer( driver.RENDER_PDF );
DefaultHandler handler = (DefaultHandler) driver.getContentHandler() );
handler.startDocument();
...
handler.endDocument();
out.close();




   
  
fop-dev-return-11540-jthaemlitz=oreillyauto.com@XML.   
  
APACHE.ORG To: 
"Fop-Dev (E-mail)" <[EMAIL PROTECTED]>   
   cc: 
"Smith, Paul" <[EMAIL PROTECTED]>
11/15/01 06:10 AM  
Subject: Difficulties embedding FOP by firing SAX 
Please respond to fop-dev   events 
myself
   
  
   
  




Hi,

I am trying to embed FOP within my own Java application as described in
http://xml.apache.org/fop/embedding.html, specifically the third method:
"calling getContentHandler() and firing the SAX events yourself" and I am
running into difficulties!

I have a class called MyParser which fires the required events (it
implements XMLReader). Its parse method that calls SAX events on
ContentHandler and ignores the InputStream. If I do:
(I have simplifed the code samples so their maybe a few typos)

   MyParser parser = new MyParser();
   XMLSerializer serializer = new XMLSerializer(new
FileOutputStream("output.fo"), new OutputFormat(method, encoding,
indenting));
   ContentHandler handler = serializer.asContentHandler();
   parser.setContentHandler(handler);
   parser.parse(new InputStream());

Then I can produce a well formed XSL-FO file that validates against the DTD
provided by N. Grigoriev from RenderX. Running fop on this file eg. "fop
output.fo output.pdf", generates output.pdf successfully.

HOWEVER, If I try and embed FOP by doing:

   Driver driver = new Driver();
   driver.setOutputStream(new FileOutputStream("output.pdf");
   driver.setInputSource(new InputSource());
   Logger logger =
Hierarchy.getDefaultHierarchy().getLoggerFor("foRender");
   logger.setPriority(Priority.INFO);
   driver.setLogger(logger);

   MyParser parser = new MyParser();
   driver.render(parser, new InputSource());

FOP generates output.pdf but when opened in Acrobat Reader I get "There was
an error opening this document. Could not repair file."
Closer inspection shows that the PDF has not been correctly generated at
all. The first 9 lines look like:

%PDF-1.3
%ª«¬­
4 0 obj
<< /Type /Info
/Producer (null) >>
endobj
5 0 obj
<< /Length 235 /Filter /FlateDecode
 >>

where as the first 9 lines of the PDF generated by running FOP from the
command line look like:

%PDF-1.3
%ª«¬­
4 0 obj
<< /Type /Info
/Producer (FOP 0.20.1) >>
endobj
5 0 obj
<< /Length 296 /Filter [ /ASCII85Decode /FlateDecode ]
 >>

During driver.render the logger prints out:

INFO10058   [foRender] (): building formatting object tree
DEBUG   10058   [fop ] (): setting up fonts
INFO10058   [foRender] (): [1]


Any help you can offer is much appreciated. Thanks in advance

---
Paul Smith


***
DISCLAIMER: The information contained in this email
 is confidential and is intended solely for the use of the
 named addressee.  Access, copying or re-use of the
 information in it by any other person is not authorised.



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









-
To unsubscribe, e-mail:

AW: Difficulties embedding FOP by firing SAX events myself

2001-11-15 Thread Beer, Christian

But fop uses xerces and xalan. This two packages contain all xml-stuff!

-Ursprüngliche Nachricht-
Von: Smith, Paul [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 15. November 2001 14:44
An: '[EMAIL PROTECTED]'
Betreff: RE: Difficulties embedding FOP by firing SAX events myself


Unfortunately I am using Java 1.3.1, javax.xml.* doesn't make an appearance
until 1.4 so I can't use TransformerFactory.

---
Paul Smith

> -Original Message-
> From: Beer, Christian [mailto:[EMAIL PROTECTED]]
> Sent: 15 November 2001 13:14
> To: '[EMAIL PROTECTED]'
> Subject: AW: Difficulties embedding FOP by firing SAX events myself
> 
> 
> I did it this way:
> 
> 
> // FO --> PDF
> driver.reset();
> driver.setOutputStream(pdf);
> driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF);
> 
> TransformerFactory tFactory = TransformerFactory.newInstance();
> if (tFactory.getFeature(SAXSource.FEATURE) &&
> tFactory.getFeature(SAXResult.FEATURE)) {
>   SAXTransformerFactory saxTFactory = 
> ((SAXTransformerFactory)tFactory);
> 
>   TransformerHandler th = saxTFactory.newTransformerHandler(new
> StreamSource(xsl));
> 
>   // Create SAXResult based on FOP Driver content handler 
> which will accept
>   // SAX events and build FOP tree
>   SAXResult saxResult = new SAXResult(driver.getContentHandler());
> 
>   th.setResult(saxResult);
> 
> 
> Now you can use th as a ContentHandler and fire the events on it!
> 
> 
>   pdf.close();
> }
> 
> 
> Christian
> 
> -Ursprüngliche Nachricht-
> Von: Smith, Paul [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 15. November 2001 13:11
> An: Fop-Dev (E-mail)
> Cc: Smith, Paul
> Betreff: Difficulties embedding FOP by firing SAX events myself
> 
> 
> Hi,
> 
> I am trying to embed FOP within my own Java application as 
> described in
> http://xml.apache.org/fop/embedding.html, specifically the 
> third method:
> "calling getContentHandler() and firing the SAX events 
> yourself" and I am
> running into difficulties!
> 
> I have a class called MyParser which fires the required events (it
> implements XMLReader). Its parse method that calls SAX events on
> ContentHandler and ignores the InputStream. If I do:
> (I have simplifed the code samples so their maybe a few typos)
> 
>   MyParser parser = new MyParser();
>   XMLSerializer serializer = new XMLSerializer(new
> FileOutputStream("output.fo"), new OutputFormat(method, encoding,
> indenting));
>   ContentHandler handler = serializer.asContentHandler();
>   parser.setContentHandler(handler);
>   parser.parse(new InputStream());
> 
> Then I can produce a well formed XSL-FO file that validates 
> against the DTD
> provided by N. Grigoriev from RenderX. Running fop on this 
> file eg. "fop
> output.fo output.pdf", generates output.pdf successfully.
> 
> HOWEVER, If I try and embed FOP by doing:
> 
>   Driver driver = new Driver();
>   driver.setOutputStream(new FileOutputStream("output.pdf");
>   driver.setInputSource(new InputSource());
>   Logger logger =
> Hierarchy.getDefaultHierarchy().getLoggerFor("foRender");
>   logger.setPriority(Priority.INFO);
>   driver.setLogger(logger);
>   
>   MyParser parser = new MyParser();
>   driver.render(parser, new InputSource());
>   
> FOP generates output.pdf but when opened in Acrobat Reader I 
> get "There was
> an error opening this document. Could not repair file."
> Closer inspection shows that the PDF has not been correctly 
> generated at
> all. The first 9 lines look like:
> 
> %PDF-1.3
> %ª«¬­
> 4 0 obj
> << /Type /Info
> /Producer (null) >>
> endobj
> 5 0 obj
> << /Length 235 /Filter /FlateDecode 
>  >>
> 
> where as the first 9 lines of the PDF generated by running 
> FOP from the
> command line look like:
> 
> %PDF-1.3
> %ª«¬­
> 4 0 obj
> << /Type /Info
> /Producer (FOP 0.20.1) >>
> endobj
> 5 0 obj
> << /Length 296 /Filter [ /ASCII85Decode /FlateDecode ]
>  >>
> 
> During driver.render the logger prints out:
> 
> INFO10058   [foRender] (): building formatting object tree
> DEBUG   10058   [fop ] (): setting up fonts
> INFO10058   [foRender] (): [1]
> 
> 
> Any help you can offer is much appreciated. Thanks in advance
> 
> ---
> Paul Smith
> 
> 
> ***
> DISCLAIMER: The information contained in this email
>  is confidential and is intended solely for the use of the
>  named addressee.  Access, copying or re-use of the
>  information in it by any other person is not authorised.
> 
> 
> 
> -
> 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: Difficulties embedding FOP by firing SAX events myself

2001-11-15 Thread Smith, Paul

Unfortunately I am using Java 1.3.1, javax.xml.* doesn't make an appearance
until 1.4 so I can't use TransformerFactory.

---
Paul Smith

> -Original Message-
> From: Beer, Christian [mailto:[EMAIL PROTECTED]]
> Sent: 15 November 2001 13:14
> To: '[EMAIL PROTECTED]'
> Subject: AW: Difficulties embedding FOP by firing SAX events myself
> 
> 
> I did it this way:
> 
> 
> // FO --> PDF
> driver.reset();
> driver.setOutputStream(pdf);
> driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF);
> 
> TransformerFactory tFactory = TransformerFactory.newInstance();
> if (tFactory.getFeature(SAXSource.FEATURE) &&
> tFactory.getFeature(SAXResult.FEATURE)) {
>   SAXTransformerFactory saxTFactory = 
> ((SAXTransformerFactory)tFactory);
> 
>   TransformerHandler th = saxTFactory.newTransformerHandler(new
> StreamSource(xsl));
> 
>   // Create SAXResult based on FOP Driver content handler 
> which will accept
>   // SAX events and build FOP tree
>   SAXResult saxResult = new SAXResult(driver.getContentHandler());
> 
>   th.setResult(saxResult);
> 
> 
> Now you can use th as a ContentHandler and fire the events on it!
> 
> 
>   pdf.close();
> }
> 
> 
> Christian
> 
> -Ursprüngliche Nachricht-
> Von: Smith, Paul [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 15. November 2001 13:11
> An: Fop-Dev (E-mail)
> Cc: Smith, Paul
> Betreff: Difficulties embedding FOP by firing SAX events myself
> 
> 
> Hi,
> 
> I am trying to embed FOP within my own Java application as 
> described in
> http://xml.apache.org/fop/embedding.html, specifically the 
> third method:
> "calling getContentHandler() and firing the SAX events 
> yourself" and I am
> running into difficulties!
> 
> I have a class called MyParser which fires the required events (it
> implements XMLReader). Its parse method that calls SAX events on
> ContentHandler and ignores the InputStream. If I do:
> (I have simplifed the code samples so their maybe a few typos)
> 
>   MyParser parser = new MyParser();
>   XMLSerializer serializer = new XMLSerializer(new
> FileOutputStream("output.fo"), new OutputFormat(method, encoding,
> indenting));
>   ContentHandler handler = serializer.asContentHandler();
>   parser.setContentHandler(handler);
>   parser.parse(new InputStream());
> 
> Then I can produce a well formed XSL-FO file that validates 
> against the DTD
> provided by N. Grigoriev from RenderX. Running fop on this 
> file eg. "fop
> output.fo output.pdf", generates output.pdf successfully.
> 
> HOWEVER, If I try and embed FOP by doing:
> 
>   Driver driver = new Driver();
>   driver.setOutputStream(new FileOutputStream("output.pdf");
>   driver.setInputSource(new InputSource());
>   Logger logger =
> Hierarchy.getDefaultHierarchy().getLoggerFor("foRender");
>   logger.setPriority(Priority.INFO);
>   driver.setLogger(logger);
>   
>   MyParser parser = new MyParser();
>   driver.render(parser, new InputSource());
>   
> FOP generates output.pdf but when opened in Acrobat Reader I 
> get "There was
> an error opening this document. Could not repair file."
> Closer inspection shows that the PDF has not been correctly 
> generated at
> all. The first 9 lines look like:
> 
> %PDF-1.3
> %ª«¬­
> 4 0 obj
> << /Type /Info
> /Producer (null) >>
> endobj
> 5 0 obj
> << /Length 235 /Filter /FlateDecode 
>  >>
> 
> where as the first 9 lines of the PDF generated by running 
> FOP from the
> command line look like:
> 
> %PDF-1.3
> %ª«¬­
> 4 0 obj
> << /Type /Info
> /Producer (FOP 0.20.1) >>
> endobj
> 5 0 obj
> << /Length 296 /Filter [ /ASCII85Decode /FlateDecode ]
>  >>
> 
> During driver.render the logger prints out:
> 
> INFO10058   [foRender] (): building formatting object tree
> DEBUG   10058   [fop ] (): setting up fonts
> INFO10058   [foRender] (): [1]
> 
> 
> Any help you can offer is much appreciated. Thanks in advance
> 
> ---
> Paul Smith
> 
> 
> ***
> DISCLAIMER: The information contained in this email
>  is confidential and is intended solely for the use of the
>  named addressee.  Access, copying or re-use of the
>  information in it by any other person is not authorised.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 


***
DISCLAIMER: The information contained in this email
 is confidential and is intended solely for the use of the
 named addressee.  Access, copying or re-use of the
 information in it by any other person is not authorised.

**

FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics

2001-11-15 Thread Beer, Christian

Hi!

Yes, the TIF-Format also gives you the opportunity to save DPI.

If you want information about the graphic-formats look at:
http://www.wotsit.org

Christian

-Ursprüngliche Nachricht-
Von: Matthias Fischer [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 15. November 2001 14:08
An: [EMAIL PROTECTED]
Betreff: RE: FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics


To have it complete, Christian: And in TIF I can do the same thing you
advised me to do in JPG?


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




AW: Difficulties embedding FOP by firing SAX events myself

2001-11-15 Thread Beer, Christian

I did it this way:


// FO --> PDF
driver.reset();
driver.setOutputStream(pdf);
driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF);

TransformerFactory tFactory = TransformerFactory.newInstance();
if (tFactory.getFeature(SAXSource.FEATURE) &&
tFactory.getFeature(SAXResult.FEATURE)) {
  SAXTransformerFactory saxTFactory = ((SAXTransformerFactory)tFactory);

  TransformerHandler th = saxTFactory.newTransformerHandler(new
StreamSource(xsl));

  // Create SAXResult based on FOP Driver content handler which will accept
  // SAX events and build FOP tree
  SAXResult saxResult = new SAXResult(driver.getContentHandler());

  th.setResult(saxResult);


Now you can use th as a ContentHandler and fire the events on it!


  pdf.close();
}


Christian

-Ursprüngliche Nachricht-
Von: Smith, Paul [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 15. November 2001 13:11
An: Fop-Dev (E-mail)
Cc: Smith, Paul
Betreff: Difficulties embedding FOP by firing SAX events myself


Hi,

I am trying to embed FOP within my own Java application as described in
http://xml.apache.org/fop/embedding.html, specifically the third method:
"calling getContentHandler() and firing the SAX events yourself" and I am
running into difficulties!

I have a class called MyParser which fires the required events (it
implements XMLReader). Its parse method that calls SAX events on
ContentHandler and ignores the InputStream. If I do:
(I have simplifed the code samples so their maybe a few typos)

MyParser parser = new MyParser();
XMLSerializer serializer = new XMLSerializer(new
FileOutputStream("output.fo"), new OutputFormat(method, encoding,
indenting));
ContentHandler handler = serializer.asContentHandler();
parser.setContentHandler(handler);
parser.parse(new InputStream());

Then I can produce a well formed XSL-FO file that validates against the DTD
provided by N. Grigoriev from RenderX. Running fop on this file eg. "fop
output.fo output.pdf", generates output.pdf successfully.

HOWEVER, If I try and embed FOP by doing:

Driver driver = new Driver();
driver.setOutputStream(new FileOutputStream("output.pdf");
driver.setInputSource(new InputSource());
Logger logger =
Hierarchy.getDefaultHierarchy().getLoggerFor("foRender");
logger.setPriority(Priority.INFO);
driver.setLogger(logger);

MyParser parser = new MyParser();
driver.render(parser, new InputSource());

FOP generates output.pdf but when opened in Acrobat Reader I get "There was
an error opening this document. Could not repair file."
Closer inspection shows that the PDF has not been correctly generated at
all. The first 9 lines look like:

%PDF-1.3
%ª«¬­
4 0 obj
<< /Type /Info
/Producer (null) >>
endobj
5 0 obj
<< /Length 235 /Filter /FlateDecode 
 >>

where as the first 9 lines of the PDF generated by running FOP from the
command line look like:

%PDF-1.3
%ª«¬­
4 0 obj
<< /Type /Info
/Producer (FOP 0.20.1) >>
endobj
5 0 obj
<< /Length 296 /Filter [ /ASCII85Decode /FlateDecode ]
 >>

During driver.render the logger prints out:

INFO10058   [foRender] (): building formatting object tree
DEBUG   10058   [fop ] (): setting up fonts
INFO10058   [foRender] (): [1]


Any help you can offer is much appreciated. Thanks in advance

---
Paul Smith


***
DISCLAIMER: The information contained in this email
 is confidential and is intended solely for the use of the
 named addressee.  Access, copying or re-use of the
 information in it by any other person is not authorised.



-
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: FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics

2001-11-15 Thread Matthias Fischer

To have it complete, Christian: And in TIF I can do the same thing you
advised me to do in JPG?


--- Begin Message ---

Hi Matthias!

Okay:

In GIFs you can't save how much dpi you specified! GIFs always have 96 DPI.
In JPGs you can save the dpi, but FOP doesn't recognize that!
All Images are taken as if they have 72 DPI. So if you don't specify a
width and height in the external-graphic-Tag a jpg which was saved with
300 DPI will come out larger!

So the best is to save the image at 300+ DPI and then specify the width
and/or height in xsl:fo. Then the quality will be right!

I hope one can understand what I mean. Difficult to explain in english!

Christian

-Ursprüngliche Nachricht-
Von: Matthias Fischer [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 15. November 2001 13:03
An: FOP-Liste
Betreff: FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics


Christian,

please let me understand you better:
The other day you said (wrote), that forced scaling, e.g. by creating a gif
with 1cmx1cm at 300dpi and trying to force Cocoon to create a PDF with a
300dpi picture of 1cmx1cm would not work, because Cocoon (FOP) computes
everything down to 72dpi, whatever dimensions I specify.

I paid attention to create all graphics in Photoshop in exactly the size
they should have in the pdf, and with 72dpi. The outcome is of poor quality.

Now, set apart tif's, lets take gif's, which seem to be the more docile
format at the moment.

Did your last mail then specifiy that in fo I can set an image height and
width successfully, take a 305dpi gif and transform it into a 305dpi picture
in pdf, without Cocoon (FOP) watering it down to 72dpi and re-sizing it to
multiples of the set dimensions?


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]

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



--- End Message ---

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


AW: FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics

2001-11-15 Thread Beer, Christian

Hi Matthias!

Okay:

In GIFs you can't save how much dpi you specified! GIFs always have 96 DPI.
In JPGs you can save the dpi, but FOP doesn't recognize that!
All Images are taken as if they have 72 DPI. So if you don't specify a 
width and height in the external-graphic-Tag a jpg which was saved with
300 DPI will come out larger!

So the best is to save the image at 300+ DPI and then specify the width
and/or height in xsl:fo. Then the quality will be right!

I hope one can understand what I mean. Difficult to explain in english!

Christian

-Ursprüngliche Nachricht-
Von: Matthias Fischer [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 15. November 2001 13:03
An: FOP-Liste
Betreff: FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics


Christian,

please let me understand you better:
The other day you said (wrote), that forced scaling, e.g. by creating a gif
with 1cmx1cm at 300dpi and trying to force Cocoon to create a PDF with a
300dpi picture of 1cmx1cm would not work, because Cocoon (FOP) computes
everything down to 72dpi, whatever dimensions I specify.

I paid attention to create all graphics in Photoshop in exactly the size
they should have in the pdf, and with 72dpi. The outcome is of poor quality.

Now, set apart tif's, lets take gif's, which seem to be the more docile
format at the moment.

Did your last mail then specifiy that in fo I can set an image height and
width successfully, take a 305dpi gif and transform it into a 305dpi picture
in pdf, without Cocoon (FOP) watering it down to 72dpi and re-sizing it to
multiples of the set dimensions?


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]

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




Re: SVG error question

2001-11-15 Thread Ulrich Mayring

Joerg Pietschmann wrote:
> 
> I fixed this by inserting a line
>org.apache.fop.configuration.Configuration.put("baseDir", 
>"file:///some/random/name");
> before invoking the driver.

Works like a charm, many thanks.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

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




cvs commit: xml-fop/src/org/apache/fop/fo/pagination ConditionalPageMasterReference.java LayoutMasterSet.java PageMasterReference.java PageSequence.java PageSequenceMaster.java Region.java RepeatablePageMasterAlternatives.java RepeatablePageMasterReference.java Root.java SimplePageMaster.java SinglePageMasterReference.java

2001-11-15 Thread keiron

keiron  01/11/15 04:40:31

  Modified:src/org/apache/fop/fo/pagination
ConditionalPageMasterReference.java
LayoutMasterSet.java PageMasterReference.java
PageSequence.java PageSequenceMaster.java
Region.java RepeatablePageMasterAlternatives.java
RepeatablePageMasterReference.java Root.java
SimplePageMaster.java
SinglePageMasterReference.java
  Log:
  some comments and cleaned up a bit
  
  Revision  ChangesPath
  1.8   +18 -10
xml-fop/src/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java
  
  Index: ConditionalPageMasterReference.java
  ===
  RCS file: 
/home/cvs/xml-fop/src/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ConditionalPageMasterReference.java   2001/11/09 11:32:40 1.7
  +++ ConditionalPageMasterReference.java   2001/11/15 12:40:31 1.8
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ConditionalPageMasterReference.java,v 1.7 2001/11/09 11:32:40 keiron Exp $
  + * $Id: ConditionalPageMasterReference.java,v 1.8 2001/11/15 12:40:31 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -13,6 +13,14 @@
   
   import org.xml.sax.Attributes;
   
  +/**
  + * A conditional-page-master-reference formatting object.
  + * This is a reference to a page master with a set of conditions.
  + * The conditions must be satisfied for the referenced master to
  + * be used.
  + * This element is must be the child of a repeatable-page-master-alternatives
  + * element.
  + */
   public class ConditionalPageMasterReference extends FObj {
   
   private RepeatablePageMasterAlternatives repeatablePageMasterAlternatives;
  @@ -25,8 +33,6 @@
   
   public ConditionalPageMasterReference(FONode parent) {
   super(parent);
  -
  -this.name = getElementName();
   }
   
   public void handleAttrs(Attributes attlist) throws FOPException {
  @@ -52,8 +58,12 @@
   public String getMasterName() {
   return masterName;
   }
  -
   
  +/**
  + * Check if the conditions for this reference are met.
  + * checks the page number and emptyness to determine if this
  + * matches.
  + */
   protected boolean isValid(int currentPageNumber, boolean thisIsFirstPage,
 boolean isEmptyPage) {
   // page-position
  @@ -127,11 +137,10 @@
   return this.blankOrNotBlank;
   }
   
  -protected String getElementName() {
  -return "fo:conditional-page-master-reference";
  -}
  -
  -
  +/**
  + * Check that the parent is the right type of formatting object
  + * repeatable-page-master-alternatives.
  + */
   protected void validateParent(FONode parent) throws FOPException {
   if (parent.getName().equals("fo:repeatable-page-master-alternatives")) {
   this.repeatablePageMasterAlternatives =
  @@ -149,6 +158,5 @@
  + parent.getName());
   }
   }
  -
   
   }
  
  
  
  1.14  +36 -8 xml-fop/src/org/apache/fop/fo/pagination/LayoutMasterSet.java
  
  Index: LayoutMasterSet.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/LayoutMasterSet.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- LayoutMasterSet.java  2001/11/14 13:45:45 1.13
  +++ LayoutMasterSet.java  2001/11/15 12:40:31 1.14
  @@ -1,5 +1,5 @@
   /*
  - * $Id: LayoutMasterSet.java,v 1.13 2001/11/14 13:45:45 keiron Exp $
  + * $Id: LayoutMasterSet.java,v 1.14 2001/11/15 12:40:31 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -19,34 +19,44 @@
   
   import org.xml.sax.Attributes;
   
  +/**
  + * The layout-master-set formatting object.
  + * This class maintains the set of simple page master and
  + * page sequence masters.
  + * The masters are stored so that the page sequence can obtain
  + * the required page master to create a page.
  + * The page sequence masters can be reset as they hold state
  + * information for a page sequence.
  + */
   public class LayoutMasterSet extends FObj {
  -
   private HashMap simplePageMasters;
   private HashMap pageSequenceMasters;
   private HashMap allRegions;
   
  -private Root root;
  -
   public LayoutMasterSet(FONode parent) {
   super(parent);
   }
   
   public void ha

Difficulties embedding FOP by firing SAX events myself

2001-11-15 Thread Smith, Paul

Hi,

I am trying to embed FOP within my own Java application as described in
http://xml.apache.org/fop/embedding.html, specifically the third method:
"calling getContentHandler() and firing the SAX events yourself" and I am
running into difficulties!

I have a class called MyParser which fires the required events (it
implements XMLReader). Its parse method that calls SAX events on
ContentHandler and ignores the InputStream. If I do:
(I have simplifed the code samples so their maybe a few typos)

MyParser parser = new MyParser();
XMLSerializer serializer = new XMLSerializer(new
FileOutputStream("output.fo"), new OutputFormat(method, encoding,
indenting));
ContentHandler handler = serializer.asContentHandler();
parser.setContentHandler(handler);
parser.parse(new InputStream());

Then I can produce a well formed XSL-FO file that validates against the DTD
provided by N. Grigoriev from RenderX. Running fop on this file eg. "fop
output.fo output.pdf", generates output.pdf successfully.

HOWEVER, If I try and embed FOP by doing:

Driver driver = new Driver();
driver.setOutputStream(new FileOutputStream("output.pdf");
driver.setInputSource(new InputSource());
Logger logger =
Hierarchy.getDefaultHierarchy().getLoggerFor("foRender");
logger.setPriority(Priority.INFO);
driver.setLogger(logger);

MyParser parser = new MyParser();
driver.render(parser, new InputSource());

FOP generates output.pdf but when opened in Acrobat Reader I get "There was
an error opening this document. Could not repair file."
Closer inspection shows that the PDF has not been correctly generated at
all. The first 9 lines look like:

%PDF-1.3
%ª«¬­
4 0 obj
<< /Type /Info
/Producer (null) >>
endobj
5 0 obj
<< /Length 235 /Filter /FlateDecode 
 >>

where as the first 9 lines of the PDF generated by running FOP from the
command line look like:

%PDF-1.3
%ª«¬­
4 0 obj
<< /Type /Info
/Producer (FOP 0.20.1) >>
endobj
5 0 obj
<< /Length 296 /Filter [ /ASCII85Decode /FlateDecode ]
 >>

During driver.render the logger prints out:

INFO10058   [foRender] (): building formatting object tree
DEBUG   10058   [fop ] (): setting up fonts
INFO10058   [foRender] (): [1]


Any help you can offer is much appreciated. Thanks in advance

---
Paul Smith


***
DISCLAIMER: The information contained in this email
 is confidential and is intended solely for the use of the
 named addressee.  Access, copying or re-use of the
 information in it by any other person is not authorised.



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




[GUMP] Build Failure - Fop

2001-11-15 Thread Sam Ruby


This email is autogenerated from the output from:



Buildfile: build.xml

init-avail:

init-filters-xalan2:
 [copy] Copying 1 file to /home/rubys/jakarta/xml-fop/build/src/codegen

init:
 [echo] --- Fop 1.0dev [1999-2001] 

prepare:
 [echo] Preparing the build directories
[mkdir] Created dir: 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/fo/properties
[mkdir] Created dir: 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/render/pdf/fonts
[mkdir] Created dir: /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/svg
[mkdir] Created dir: /home/rubys/jakarta/xml-fop/build/classes/conf
[mkdir] Created dir: /home/rubys/jakarta/xml-fop/build/classes/hyph
 [copy] Copying 3 files to /home/rubys/jakarta/xml-fop/build/classes/conf

codegen:
 [echo] Resetting codegen directory
 [copy] Copying 34 files to /home/rubys/jakarta/xml-fop/build/src/codegen
 [echo] Generating the java files from xml resources
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/allprops.xml
 [xslt] style: ./build/src/codegen/genconst.xsl
 [xslt] out: ./build/src/org/apache/fop/fo/properties/Constants.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/foproperties.xml
 [xslt] style: ./build/src/codegen/properties.xsl
 [xslt] out: ./build/src/org/apache/fop/fo/properties/fo_ignore_this.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/foproperties.xml
 [xslt] style: ./build/src/codegen/propmap.xsl
 [xslt] out: ./build/src/org/apache/fop/fo/properties/FOPropertyMapping.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/foproperties.xml
 [xslt] style: ./build/src/codegen/enumgen.xsl
 [xslt] out: ./build/src/org/apache/fop/fo/properties/foenums_ignore_this.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/extproperties.xml
 [xslt] style: ./build/src/codegen/properties.xsl
 [xslt] out: ./build/src/org/apache/fop/fo/properties/ext_ignore_this.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/extproperties.xml
 [xslt] style: ./build/src/codegen/propmap.xsl
 [xslt] out: ./build/src/org/apache/fop/fo/properties/ExtensionPropertyMapping.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/extproperties.xml
 [xslt] style: ./build/src/codegen/enumgen.xsl
 [xslt] out: ./build/src/org/apache/fop/fo/properties/extenums_ignore_this.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/charlist.xml
 [xslt] style: ./build/src/codegen/code-point-mapping.xsl
 [xslt] out: ./build/src/org/apache/fop/render/pdf/CodePointMapping.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/Courier.xml
 [xslt] style: ./build/src/codegen/font-file.xsl
 [xslt] out: ./build/src/org/apache/fop/render/pdf/fonts/Courier.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/Courier-Oblique.xml
 [xslt] style: ./build/src/codegen/font-file.xsl
 [xslt] out: ./build/src/org/apache/fop/render/pdf/fonts/CourierOblique.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/Courier-Bold.xml
 [xslt] style: ./build/src/codegen/font-file.xsl
 [xslt] out: ./build/src/org/apache/fop/render/pdf/fonts/CourierBold.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/Courier-BoldOblique.xml
 [xslt] style: ./build/src/codegen/font-file.xsl
 [xslt] out: ./build/src/org/apache/fop/render/pdf/fonts/CourierBoldOblique.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/Helvetica.xml
 [xslt] style: ./build/src/codegen/font-file.xsl
 [xslt] out: ./build/src/org/apache/fop/render/pdf/fonts/Helvetica.java
 [xslt] 
 [xslt] 
 [xslt] xslt 
 [xslt] in: ./build/src/codegen/Helvetica-Oblique.xml
   

FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics

2001-11-15 Thread Matthias Fischer

Christian,

please let me understand you better:
The other day you said (wrote), that forced scaling, e.g. by creating a gif
with 1cmx1cm at 300dpi and trying to force Cocoon to create a PDF with a
300dpi picture of 1cmx1cm would not work, because Cocoon (FOP) computes
everything down to 72dpi, whatever dimensions I specify.

I paid attention to create all graphics in Photoshop in exactly the size
they should have in the pdf, and with 72dpi. The outcome is of poor quality.

Now, set apart tif's, lets take gif's, which seem to be the more docile
format at the moment.

Did your last mail then specifiy that in fo I can set an image height and
width successfully, take a 305dpi gif and transform it into a 305dpi picture
in pdf, without Cocoon (FOP) watering it down to 72dpi and re-sizing it to
multiples of the set dimensions?


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]




SVG error question

2001-11-15 Thread Joerg Pietschmann

Ulrich Mayring <[EMAIL PROTECTED]> wrote:
> I get this exception with fop:
> ... (xml): Could not set base URL for svg
> What is this URL and how can I set it?

You probably have an SVG embedded in you FO which
is generated on the fly, perhaps in a servlet. The
error message is from Batik which tries to create
a document reader for the SVG for navigation inside
the SVG, even though there is no separate SVG document.

I fixed this by inserting a line 
   org.apache.fop.configuration.Configuration.put("baseDir", 
"file:///some/random/name");
before invoking the driver.
The URL is never read in my case, if you use cross
reference URLs in your SVG, like referencing fragments
or shaders, things might be more complicated.

HTH
J.Pietschmann

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




AW: FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics

2001-11-15 Thread Beer, Christian

Hi Matthias!

Do you set width and height at the external-graphic-Tag? Try setting
the resulting size in "cm". If you set only one of width or height
the image will be scaled acording to the given aspect ratio.

Christian

-Ursprüngliche Nachricht-
Von: Matthias Fischer [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 15. November 2001 12:32
An: [EMAIL PROTECTED]
Betreff: RE: FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics


Hallo Christian,

I tried to implement your piece of advice. I got the following problems:
- tif's remain problematic, even if I create them with their final
dimensions at 72dpi
- 72dpi is a bit low for printouts, e.g. of technical drawings
I'm getting closer and closer to desperation...

Matthias

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




RE: FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics

2001-11-15 Thread Matthias Fischer

Hallo Christian,

I tried to implement your piece of advice. I got the following problems:
- tif's remain problematic, even if I create them with their final
dimensions at 72dpi
- 72dpi is a bit low for printouts, e.g. of technical drawings
I'm getting closer and closer to desperation...

Matthias

--- Begin Message ---

Hi Matthias,

did you specify a DPI for the JPGs or TIFFs?? If yes, that might be your
problem! FOP doesn't consider any of this information!

For example:
 If you insert a JPG with 1 cm x 1 cm at 300 DPI, it will become
 4,16 cm x 4,16 cm because FOP uses 72 DPI!

Christian

-Ursprüngliche Nachricht-
Von: Matthias Fischer [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 13. November 2001 14:47
An: [EMAIL PROTECTED]
Betreff: RE: FOP v.0.20.1/Cocoon v.2 rc.2 + Graphics


Hi Christian,

thanks for the quick response. Your answer seems partially correct, since a
bigger graphics was displayed and a smaller one wasn't. However, generally
docs should satisfy the requirement that graphics are no bigger than the
space in fo for displaying them.

Any clue to what concerns the tif's?

Matthias

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



--- End Message ---

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


cvs commit: xml-fop/src/org/apache/fop/fo Declarations.java ColorProfile.java

2001-11-15 Thread keiron

keiron  01/11/15 02:25:27

  Modified:src/org/apache/fop/fo Declarations.java ColorProfile.java
  Log:
  basic implementation of declarations and color profile
  
  Revision  ChangesPath
  1.6   +45 -5 xml-fop/src/org/apache/fop/fo/Declarations.java
  
  Index: Declarations.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Declarations.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Declarations.java 2001/11/09 11:32:36 1.5
  +++ Declarations.java 2001/11/15 10:25:26 1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Declarations.java,v 1.5 2001/11/09 11:32:36 keiron Exp $
  + * $Id: Declarations.java,v 1.6 2001/11/15 10:25:26 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -8,18 +8,58 @@
   package org.apache.fop.fo;
   
   // FOP
  -import org.apache.fop.fo.*;
   import org.apache.fop.fo.flow.*;
  -import org.apache.fop.fo.properties.*;
  -import org.apache.fop.layout.AreaTree;
   import org.apache.fop.apps.FOPException;
   
  +import java.util.ArrayList;
  +import java.util.HashMap;
  +import java.util.Iterator;
  +
   /**
  + * Declarations formatting object.
  + * A declarations formatting object holds a set of color-profiles
  + * and optionally additional non-XSL namespace elements.
  + * The color-profiles are held in a hashmap for use with color-profile
  + * references.
*/
  -public class Declarations extends ToBeImplementedElement {
  +public class Declarations extends FObj {
  +HashMap colorProfiles = null;
  +ArrayList external = null;
   
   protected Declarations(FONode parent) {
   super(parent);
   }
   
  +/**
  + * At then end of this element sort out the child into
  + * a hashmap of color profiles and a list of external xml.
  + */
  +public void end() {
  +for(Iterator iter = children.iterator(); iter.hasNext(); ) {
  +FONode node = (FONode)iter.next();
  +if(node.getName().equals("fo:color-profile")) {
  +ColorProfile cp = (ColorProfile)node;
  +if(!"".equals(cp.getProfileName())) {
  +if(colorProfiles == null) {
  +colorProfiles = new HashMap();
  +}
  +if(colorProfiles.get(cp.getProfileName()) != null) {
  +// duplicate names
  +log.warn("Duplicate fo:color-profile profile name : " + 
cp.getProfileName());
  +}
  +colorProfiles.put(cp.getProfileName(), cp);
  +} else {
  +log.warn("color-profile-name required for color profile");
  +}
  +} else if(node instanceof XMLObj) {
  +if(external == null) {
  +external = new ArrayList();
  +}
  +external.add(node);
  +} else {
  +log.warn("invalid element " + node.getName() + "inside 
declarations");
  +}
  +}
  +children = null;
  +}
   }
  
  
  
  1.7   +35 -10xml-fop/src/org/apache/fop/fo/ColorProfile.java
  
  Index: ColorProfile.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ColorProfile.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ColorProfile.java 2001/11/09 11:32:36 1.6
  +++ ColorProfile.java 2001/11/15 10:25:26 1.7
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ColorProfile.java,v 1.6 2001/11/09 11:32:36 keiron Exp $
  + * $Id: ColorProfile.java,v 1.7 2001/11/15 10:25:26 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -8,23 +8,48 @@
   package org.apache.fop.fo;
   
   // FOP
  -import org.apache.fop.fo.*;
  -import org.apache.fop.fo.flow.*;
  -import org.apache.fop.fo.properties.*;
  -import org.apache.fop.layout.AreaTree;
  -import org.apache.fop.apps.FOPException;
  +import org.apache.fop.datatypes.ColorType;
   
   /**
* The fo:color-profile formatting object.
  + * This loads the color profile when needed and resolves a requested color.
*/
  -public class ColorProfile extends ToBeImplementedElement {
  +public class ColorProfile extends FObj {
  +int intent;
  +String src;
  +String profileName;
   
   protected ColorProfile(FONode parent) {
   super(parent);
  +}
  +
  +public void end() {
  +src = this.properties.get("src").getString();
  +profileName = this.properties.get("color-profile-name").getString();
  +intent = this.p

RE: inculde image

2001-11-15 Thread Tore Engvig
Title: RE: inculde image



 

  -Original Message-From: Hoang Nam 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, November 15, 2001 
  10:33To: [EMAIL PROTECTED]Subject: Re: inculde 
  image
   If the image is changed, will it be changed 
  in the Pdf document ? Is the image embbeded in the Pdf Docuemtn 
  or only a link to the image ?
   
  The 
  image is embedded in the pdf document and I guess it behaves like other svg 
  images. I think you can use something like:
   
  
  
  http://www.w3.org/2000/svg  width="100px" 
  height="100px">
  Embedded png 
  image
  
   
   
  
  
   
  Tore
   
  Thanks ! 
  
- Original Message - 
From: 
Tore 
Engvig 
To: [EMAIL PROTECTED] 
Sent: Thursday, November 15, 2001 10:08 
AM
Subject: RE: inculde image

 

  -Original Message-From: Clute, Andrew 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 14, 2001 
  20:09To: '[EMAIL PROTECTED] 
  'Subject: RE: inculde image
   What is making your image dynamic? 
  When you mean dynamic, do you mean the URI to the image 
  could change based on the state of the app? If so, there is no way to do 
  it in the stock FOP. I was able to add dynamic images that were barcodes 
  based upon the page number, but I had to modify FOP to do it. 
  I guess he's generating the image in the same servlet that 
  generates to pdf document and thus have no uri for the 
  image. 
  What is your images of? Maybe you can use SVG?  
  I guess SVG is the way to go. I'm not sure here, but vaguely 
  remeber something about the possibility to embed a base64 encoded 
  gif/jpeg/whatever image into the SVG and that batik handles it. That 
  could be a solution. 
  Tore
   
  -Original Message- From: 
  Maneshi Tuli To: [EMAIL PROTECTED] 
  Sent: 11/14/2001 2:01 PM Subject: 
  inculde image 
  I have to inculde dynamic image into fop , i,e  I am 
  generating that image through servlet . 
  how can i do that into FOP 
  plz give me any suggestion thanks 
  -- 
  This e-mail may contain confidential and/or privileged 
  information. If you are not the intended recipient 
  (or have received this e-mail in error) please 
  notify the sender immediately and destroy this e-mail. Any 
  unauthorized copying, disclosure or distribution of the 
  material in this e-mail is strictly 
  forbidden. 
  - 
  To unsubscribe, e-mail: 
  [EMAIL PROTECTED] For additional 
  commands, email: [EMAIL PROTECTED] 
  


Re: inculde image

2001-11-15 Thread Hoang Nam
Title: RE: inculde image



 If the image is changed, will it be changed 
in the Pdf document ? Is the image embbeded in the Pdf Docuemtn 
or only a link to the image ?
 
Thanks ! 

  - Original Message - 
  From: 
  Tore 
  Engvig 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, November 15, 2001 10:08 
  AM
  Subject: RE: inculde image
  
   
  
-Original Message-From: Clute, Andrew 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 14, 2001 
20:09To: '[EMAIL PROTECTED] 
'Subject: RE: inculde image
 What is making your image dynamic? 
When you mean dynamic, do you mean the URI to the image 
could change based on the state of the app? If so, there is no way to do it 
in the stock FOP. I was able to add dynamic images that were barcodes based 
upon the page number, but I had to modify FOP to do it. 
I guess he's generating the image in the same servlet that 
generates to pdf document and thus have no uri for the 
image. 
What is your images of? Maybe you can use SVG?  
I guess SVG is the way to go. I'm not sure here, but vaguely 
remeber something about the possibility to embed a base64 encoded 
gif/jpeg/whatever image into the SVG and that batik handles it. That 
could be a solution. 
Tore
 
-Original Message- From: 
Maneshi Tuli To: [EMAIL PROTECTED] 
Sent: 11/14/2001 2:01 PM Subject: 
inculde image 
I have to inculde dynamic image into fop , i,e  I am 
generating that image through servlet . 
how can i do that into FOP 
plz give me any suggestion thanks 
-- 
This e-mail may contain confidential and/or privileged 
information. If you are not the intended recipient 
(or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in 
this e-mail is strictly forbidden. 

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



RE: inculde image

2001-11-15 Thread Tore Engvig
Title: RE: inculde image



 

  -Original Message-From: Clute, Andrew 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 14, 2001 
  20:09To: '[EMAIL PROTECTED] 'Subject: RE: inculde 
  image
   What is making your image dynamic? 
  When you mean dynamic, do you mean the URI to the image could 
  change based on the state of the app? If so, there is no way to do it in the 
  stock FOP. I was able to add dynamic images that were barcodes based upon the 
  page number, but I had to modify FOP to do it. 
  I guess he's generating the image in the same servlet that 
  generates to pdf document and thus have no uri for the 
  image. 
  What is your images of? Maybe you can use SVG?  
  I guess SVG is the way to go. I'm not sure here, but vaguely 
  remeber something about the possibility to embed a base64 encoded 
  gif/jpeg/whatever image into the SVG and that batik handles it. That 
  could be a solution. 
  Tore
   
  -Original Message- From: 
  Maneshi Tuli To: [EMAIL PROTECTED] 
  Sent: 11/14/2001 2:01 PM Subject: 
  inculde image 
  I have to inculde dynamic image into fop , i,e  I am 
  generating that image through servlet . 
  how can i do that into FOP 
  plz give me any suggestion thanks 
  -- 
  This e-mail may contain confidential and/or privileged 
  information. If you are not the intended recipient (or 
  have received this e-mail in error) please notify the 
  sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in 
  this e-mail is strictly forbidden. 
  - 
  To unsubscribe, e-mail: 
  [EMAIL PROTECTED] For additional 
  commands, email: [EMAIL PROTECTED] 



cvs commit: xml-fop/src/org/apache/fop/svg PDFDocumentGraphics2D.java PDFTranscoder.java SVGElement.java SVGUserAgent.java SVGUtilities.java

2001-11-15 Thread keiron

keiron  01/11/15 00:12:37

  Modified:src/org/apache/fop/fo XMLObj.java
   src/org/apache/fop/image/analyser SVGReader.java
   src/org/apache/fop/layout FontInfo.java
   src/org/apache/fop/pdf PDFDocument.java
   src/org/apache/fop/svg PDFDocumentGraphics2D.java
PDFTranscoder.java SVGElement.java
SVGUserAgent.java SVGUtilities.java
  Log:
  made the batik pdf transcoder work again
  
  some improvements to svg handling
  Submitted by: Thomas E Deweese <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.6   +30 -29xml-fop/src/org/apache/fop/fo/XMLObj.java
  
  Index: XMLObj.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/XMLObj.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XMLObj.java   2001/11/09 11:32:37 1.5
  +++ XMLObj.java   2001/11/15 08:12:33 1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: XMLObj.java,v 1.5 2001/11/09 11:32:37 keiron Exp $
  + * $Id: XMLObj.java,v 1.6 2001/11/15 08:12:33 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -53,51 +53,52 @@
   public abstract String getNameSpace();
   
   protected static HashMap ns = new HashMap();
  +static {
  +ns.put("xlink", "http://www.w3.org/1999/xlink";);
  +}
   
   public void addElement(Document doc, Element parent) {
   this.doc = doc;
   element = doc.createElementNS(getNameSpace(), name);
   
  -for (int count = 0; count < attr.getLength(); count++) {
  -String rf = attr.getValue(count);
  -String qname = attr.getQName(count);
  -if (qname.indexOf(":") == -1) {
  -element.setAttribute(qname, rf);
  +for (int count = 0; count < attr.getLength(); count++) {
  +String rf = attr.getValue(count);
  +String qname = attr.getQName(count);
  +int idx = qname.indexOf(":");
  +if (idx == -1) {
  +element.setAttribute(qname, rf);
  +} else {
  +String pref = qname.substring(0, idx);
  +String tail = qname.substring(idx + 1);
  +if (pref.equals("xmlns")) {
  +ns.put(tail, rf);
   } else {
  -String pref =
  -qname.substring(0, qname.indexOf(":"));
  -if (pref.equals("xmlns")) {
  -ns.put(qname.substring(qname.indexOf(":")
  -  + 1), rf);
  -}
  -ns.put("xlink", "http://www.w3.org/1999/xlink";);
  -element.setAttributeNS((String)ns.get(pref),
  -   qname, rf);
  +element.setAttributeNS((String)ns.get(pref), tail, rf);
   }
   }
  +}
   attr = null;
   parent.appendChild(element);
   }
   
   public void buildTopLevel(Document doc, Element svgRoot) {
   // build up the info for the top level element
  -for (int count = 0; count < attr.getLength(); count++) {
  -String rf = attr.getValue(count);
  -String qname = attr.getQName(count);
  -if (qname.indexOf(":") == -1) {
  -element.setAttribute(qname, rf);
  +for (int count = 0; count < attr.getLength(); count++) {
  +String rf = attr.getValue(count);
  +String qname = attr.getQName(count);
  +int idx = qname.indexOf(":");
  +if (idx == -1) {
  +element.setAttribute(qname, rf);
  +} else {
  +String pref = qname.substring(0, idx);
  +String tail = qname.substring(idx + 1);
  +if (pref.equals("xmlns")) {
  +ns.put(tail, rf);
   } else {
  -String pref =
  -   qname.substring(0, qname.indexOf(":"));
  -if (pref.equals("xmlns")) {
  -ns.put(qname.substring(qname.indexOf(":")
  -  + 1), rf);
  -}
  -ns.put("xlink", "http://www.w3.org/1999/xlink";);
  -element.setAttributeNS((String)ns.get(pref),
  -   qname, rf);
  +element.setAttributeNS((String)ns.get(pref), tail, rf);
   }
   }
  +}
   }
   
   public Document createBasicDocument() {
  
  
  
  1.14  +2 -2  xml-f