Antwort: page numbering problem...

2001-10-16 Thread joerg . pietschmann


Hi wali,
I creat a PDF document which have reports for different customers.  One
document can contain many reports. Now I want to mark the pages for
reports
individually. i.e.
...
Every new report starts at new page. and every report can consist of
different number of pages.

Create a page sequence for each report. If you are creating the
FO via XSLT, and if you have the reports in individual XML
elements (here called report), you can use something like
  xsl:template match=report
   fo:page-sequence master-name=report initial-page-number=1 
 fo:static-content flow-name=xsl-region-before
   xsl:textReport /xsl:text
   xsl:value-of select=title
 /fo:static-content
 fo:static-content flow-name=xsl-region-after
   fo:blockfo:leader leader-pattern=rule leader-length
=max//fo:block
   fo:block text-align=endxsl:textPage
/xsl:textfo:page-number//fo:block
 /fo:static-content
 fo:flow flow-name=xsl-region-body
   xsl:apply-templates/
 /fo:flow
/fo:page-sequence
  /xsl:template

Tailor this to your needs. Of course you'll have to define
a page master report (you may have different page masters
for the title page, the TOC, appendices etc.)

HTH

Joerg Pietschmann




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




AW: Embedding fop in IE..Help!!!

2001-10-16 Thread Beer, Christian

What you do is printing CHARACTER data!! Try this:
code
OutputStream os = response.getOutputStream();
os.write(binary-data/);
os.close();
/code

Cheers
Christian

-Ursprüngliche Nachricht-
Von: Rajagopal. V [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 15. Oktober 2001 20:49
An: [EMAIL PROTECTED]
Betreff: Re: Embedding fop in IE..Help!!!


Hi
Im using a JSP to generate this PDF. I am able to open
other Static pdfs.
This is what i do, i create a bytearrayoutputstream
which will hold the output of the render and then use
a 

pageContext.getOut().print(bytearrayoutputstreamobject);

and this results in printing binary content on the
screen.. I assume this is bcoz IE doesnt recognize the
content type and print jst prints it on the screen,
whereas Netscape understands the Content Type and
displays it as a PDF.
I tried to create a servlet which will generate the
PDF(using streams to generate the output) and it works
in IE and Netscape.

Now, is it not possible to render a PDF using
JSP(especially on IE)?? IS there a way?

Thanks
Raj

--- Amit [EMAIL PROTECTED] wrote:
 Can you open other pdf files (via a link in a html
 page) in IE?
 
 
 Rajagopal. V wrote:
 
  Hi All
  I have an XML file which i combine with a XSL to
  generate the FO file and render it. It works fine
 with
  Netscape but im having a tough time with IE. It is
  displaying garbage on teh screen. All i get is
 binary
  characters for the PDF File. I have IE 5.5 Sp1.
 and i
  tried all the workarounds. These are the ones I
 tried
  1) Changed the name of the file to be .pdf so that
 IE
  will look at the extension and treat it as PDF
 
  2) Bloated the file size to be more than 8k so
 that
  there is no buffer problem with IE
 
  3) Downloaded the Fo file generated and ran the fo
  command line and it generates the PDF properly(as
 an
  application). So there is nothing wrong with the
 FO.
 
  IS there any other way to get a PDF on IE? Im not
 sure
  why im getting binary content all over the screen?
 
  Please HElpp...
 
  TIA
  Raj
 
  __
  Do You Yahoo!?
  Make a great connection at Yahoo! Personals.
  http://personals.yahoo.com
 
 

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

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


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

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

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




Antwort: XML parser question

2001-10-16 Thread joerg . pietschmann


Willie Wu wrote:
 Is it possible to configure FOP to use a XML parser other than Xerces?
In
 my existing app, I'm already using Crimson, which I want to reuse for
FOP.

Yes, it is possible. It's a little bit arcane, though: you'll have
to set the javax.xml.parsers.SAXParserFactory service to the full
classname of your parser factory implementation class. You can set
the service by creating a META-INF/services directory in your
classpath (may be in a jar file) and create a file with the name
javax.xml.parsers.SAXParserFactory and with the aforementioned
class name as the only content. There may be other ways, ask a
local guru.
I'm not sure whether crimson comes already with a parser factory
implementation, ask a local guru.
Check your crimson distribition whether the precompiled jar
already contains such a file in the META-INF/services directory,
if so, you'll only need to put this jar into the classpath instead
of the Xerces jar. Be sure to place it before the Xalan and the
FOP jar.

HTH

Joerg Pietschmann



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




Antwort: Calling FOP with strings rather than filenames

2001-10-16 Thread joerg . pietschmann



Hi, Bob,
you can do it but FOP isn't exactly optimized for your problem.
You'll have to do the following steps:
1. Create an XSL transformer factory:
  TransformerFactory tfactory  = TransformerFactory.newInstance();
2. Create a transformer with your XSL string source:
  Transformer transformer = tfactory.newTransformer(
new StreamSource(new StringReader(xslString)));
3. Create a FOP driver, set any parameters you want.
Driver driver=new Driver();
driver.setRenderer(Driver.RENDER_PDF);
driver.setOutputStream(outStream);
4. Invoke the transform() method of the transformer,
   supplying the XML string as a source and the FOP driver
   as the result:
transformer.transform(new StreamSource(
   new StringReader(xmlString)),
   new SAXResult(driver.getContentHandler));
Look at java.xml.transform (from the Xalan or j2ee distribution)
for details about creating and invoking Transformers and dealing
with ErrorListener stuff.
BTW you can save a great deal of memory and processor capacity
if you can get your program parts to communicate via SAX events
instead of strings.
You'll need a FOP 0.20.2 distribution for doing the above.

All untested, as i'm using something more convoluted due to
FOP 0.20.1 legacy. HTH anyway.


Joerg Pietschmann



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




AW: Invalid Image URL - error on relative URL : no protocol

2001-10-16 Thread Ursprung Manfred

That's nice for absolute path.
How do yo do it on relative path ?
Like: 
file:..\graphics\some.gif
it doesn't work.

Thats the trick ?
-Manfred

 -Ursprüngliche Nachricht-
 Von:  Amit [SMTP:[EMAIL PROTECTED]]
 Gesendet am:  Mittwoch, 10. Oktober 2001 20:03
 An:   [EMAIL PROTECTED]
 Betreff:  Re: Invalid Image URL - error on relative URL : no protocol
 
 If on Windows do this:
 
 file:C:\path\some.gif
 
 If on Unix like OS do this
 
 file:///www/images/some.gif
 
 
 Amit
 
 MEMMADI Said wrote:
 
  Hi all,
 
  I have the folowing error with fop 0.20.1
 
  Error while creating area : Invalid Image URL - error on relative URL :
 no protocol:
  null./images/mypicture.png
 
  In my xsl file :
  fo:external-graphic src=file:.\images\mypicture.png/ or
  fo:external-graphic src=file:images\mypicture.png/
 
  Thanks in advance.
 
  -
  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]




block centering and entities

2001-10-16 Thread Louis . Masters

Is this a bug?  Let me explain:

I have a block that should be centered on the screen.  Sometimes it
contains the '' sign and sometimes it does not.  When it does not, the
block is centered correctly.  When it has an '' sign, my code translates
it to the entity representation 'amp;' and it is then fed into the
translation.  When it renders the document, the text is now off-center.  It
looks like it is centering on the text with the entity (i.e. Pamp;ON Value
Added Services) and not the translated text(i.e. PON Value Added
Services).  Is this correct?

Am I doing something wrong?
XSL snippet:
fo:block font-size=12pt color=black text-align=center
 xsl:apply-templates select=reporttitle/
/fo:block

-Lou



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




sending PDF directly to printer

2001-10-16 Thread Louis . Masters

Anyone know how to send the generated PDF directly to the printer.  I'm
generating a PDF and using IE.  By default it invokes the PDF File Open
([FileOpenEx(%1)]), but I want to invoke the PDF Print
( [FilePrintSilentEx(%1)]).

Basically, I need the doc to print without the user seeing it on the
screen.

Thanks,
Lou



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




Problems with hyphenation and links

2001-10-16 Thread spam_from_fop_dev


Dear FOP developers,

I sent a message to this list last week describing various problems
that I've encountered with FOP (look for Probs with underline,
background, hyphenation, svg and more).  No-one has replied :-(
It would be really good to get someone's opinion, especially with
these two which I don't have a work-around for:

Hyphenation:


Hyphenation works when there is more than one word in the block.  If
there is only one word in the block, it is not hyphenated.  I think it
should be.  If I have one word in the block and the source has
whitespace before and after it, I get a run-time error.  Here's the
example:

?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
fo:simple-page-master margin-right=25mm margin-left=25mm
   margin-bottom=20mm margin-top=15mm
   page-height=297mm page-width=210mm
   master-name=a4
  fo:region-before extent=10mm/
  fo:region-after extent=10mm/
  fo:region-body margin-bottom=15mm margin-top=15mm/
/fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-name=a4
fo:flow flow-name=xsl-region-body

  fo:block language=en hyphenate=true
Thisparagraphwillbehyphenated becauseithasmorethanonewordinit
andthisseemstoworkok.  Theseverylongwords existonlysothat
thereisahighprobability thathyphenationwillberequired.
  /fo:block

!-- Uncommenting this block gives ERROR: null.  This is identical to the
 next block apart from white space before and after the single very-long
 word.
 fo:block language=en hyphenate=true

ThisparagraphwillnotbehyphenatedbecauseitcontainsonlyoneextreemelylongwordandthisdoesnotseemtoworkIwasoriginallysufferingfromthisproblemintableswithnarrowcolumnsandwiththingslikeURLsthatareoftenverylongwithnospacesinthem.
  /fo:block --

!-- there should be no line breaks in the following; watch out if
they have been added in the post. --

  fo:block language=en 
hyphenate=trueThisparagraphwillnotbehyphenatedbecauseitcontainsonlyoneextreemelylongwordandthisdoesnotseemtoworkIwasoriginallysufferingfromthisproblemintableswithnarrowcolumnsandwiththingslikeURLsthatareoftenverylongwithnospacesinthem./fo:block

/fo:flow
  /fo:page-sequence
/fo:root


Links:
--

When I try this code, containing a basic-link and a break-before=page:

?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
fo:simple-page-master margin-right=25mm margin-left=25mm
   margin-bottom=20mm margin-top=15mm
   page-height=297mm page-width=210mm
   master-name=a4
  fo:region-body margin-bottom=15mm margin-top=15mm/
/fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-name=a4
fo:flow flow-name=xsl-region-body

  fo:block
fo:basic-link internal-destination=Y
  X
/fo:basic-link
  /fo:block

  fo:block break-before=page/

  fo:block id=Y/

/fo:flow
  /fo:page-sequence
/fo:root

I get this output:

FOP 0.20.1
using SAX parser org.apache.xerces.parsers.SAXParser
building formatting object tree
setting up fonts
 [1] [2ERROR: The id Y already exists in this document


Any help very, very much appreciated.

--Phil.

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




Attaching text to bottom of page

2001-10-16 Thread panos

Is there a way to attach text to the bottom of page without making it part
of a footer?  I have a variable content page but I always want to have
disclaimer
text right above the footer without making it part of the footer.

Thanks for any help!


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




padding in table-row

2001-10-16 Thread Keen Tim

I'm attempting to use padding-top and padding-bottom to put some space
between rows of a table. These attributes don't seem to be working in
table-row, but the desired result can be achieved using padding in
table-cell.

I think this might be a bug and would just like to make whoever needs to
know aware.

Cheers

Tim



The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.

Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.  

If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.  



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




XSL is now a W3C recommendation

2001-10-16 Thread wongkokwai

In case you don't know it yet, XSL (and FO) is now formally a W3C recommendation. You 
can 
get it http://www.w3.org/TR/2001/REC-xsl-20011015/



__
For the latest news, go to http://www.asia1.com

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