Re: Printing PDF on the client default printer.

2004-10-20 Thread Glen Mazza
--- [EMAIL PROTECTED] wrote:
>
> I already have an applet on the client side which
> uses PrinterJob class to
> popup the printer selection box on client side.
> 
> Now how do I redirect the content from server to
> this printer?
> 

I don't think you can, because of applet sandbox
rules.  They just can't wander over to other machines,
including printers.  But I may be incorrect here.

> Should I use Driver.RENDER_PRINT / Driver.RENDER_PCL
> set in the fop driver
> renderer ? 

No, those are non-PDF devices.  One is Java2D, the
other is HP printer control language.


> and what content type should the response
> object return?
> 
> Thanks
> Manoj
> 
> PS: I have successfully use the FopPrinter example (
> FopPrintServlet ) to
> print pdfs on the app servers default printer but
> what I need is to be able
> to print on the clients default printer and not on
> servers printer.
> 

This issue has come up in the past, and (I believe)
the normal suggestion is to change your requirements. 
Isn't it strange to go to a website and have something
automatically print out of your printer?

Glen

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



Printing PDF on the client default printer.

2004-10-20 Thread Manoj_Nair
My requirement is to render an XML as  a PDF and then print the PDF on the
clients default printer. I dont want the PDF to prompt user to open the
acrobat reader.

I already have an applet on the client side which uses PrinterJob class to
popup the printer selection box on client side.

Now how do I redirect the content from server to this printer?

Should I use Driver.RENDER_PRINT / Driver.RENDER_PCL set in the fop driver
renderer ? and what content type should the response object return?

Thanks
Manoj

PS: I have successfully use the FopPrinter example ( FopPrintServlet ) to
print pdfs on the app servers default printer but what I need is to be able
to print on the clients default printer and not on servers printer.



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



Re: (Moved from fop-dev:) RE: Help required -- Converting TeX files to XML

2004-10-20 Thread Christopher Milton
Hermes genrates XML from TeX http://www.aei.mpg.de/hermes/

--- "Andreas L. Delmelle" <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> > > Can anyone guide me how to add hyphenation
> > > for Japanese language? I have got .tex file for SJIS i.e.
> > > SJIS.tex, but according to FOP's documentation,
> > > I need to convert it in .xml file. I don't
> > > know how to convert it. So, please guide for the
> > > same.
> 
> Check: http://xml.apache.org/fop/hyphenation.html#patterns
> 
> All the relevant data on the creation of FOP hyphenation patterns is
> explained there. No real profound knowledge on TeX patterns here, but having
> taken a look at a few TeX-files, it looks like it wouldn't pose too much of
> a problem to create a FOP hyphenation XML from one of those --maybe one
> could write a Java class that does exactly that, or maybe a Perl script
> would be more appropriate. Who knows... also conceivable to write a Xerces
> XNI TeXParserConfiguration[1] to parse a TeX-file, then use Xerces to send
> the generated SAX events back to a file.
> 
> HTH,
> 
> Andreas
> 
> [1] see: http://xml.apache.org/xerces2-j/xni-config.html for an example of a
> CSVParserConfig; use spaces instead of commas to tokenize the buffered line
> of TeXt, change or add to the element names, add a few rules... --and don't
> forget to donate it back to Xerces, as to return the favor ;-)
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



RE: XPath 2.0 & XSLT 2.0

2004-10-20 Thread Andreas L. Delmelle
> -Original Message-
> From: J.Pietschmann [mailto:[EMAIL PROTECTED]

> Andreas L. Delmelle wrote:
>   > Should be quite simple really: replace the Xalan jar in your JVM's
> > 'lib/endorsed' directory with Saxon's jar.
>
> Note that this will wreck all Java applications on the system
> which need a writable DOM implementation, because the read-only
> DOM implementation supplied with Saxon overrides the JRE
> implementation. Use with care.

Thanks for the warning! Hadn't run into any problems yet, but at least now I
know where to look if it happens.

Greetz,

Andreas


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



(Moved from fop-dev:) RE: Help required -- Converting TeX files to XML

2004-10-20 Thread Andreas L. Delmelle

Hi,

> > Can anyone guide me how to add hyphenation
> > for Japanese language? I have got .tex file for SJIS i.e.
> > SJIS.tex, but according to FOP's documentation,
> > I need to convert it in .xml file. I don't
> > know how to convert it. So, please guide for the
> > same.

Check: http://xml.apache.org/fop/hyphenation.html#patterns

All the relevant data on the creation of FOP hyphenation patterns is
explained there. No real profound knowledge on TeX patterns here, but having
taken a look at a few TeX-files, it looks like it wouldn't pose too much of
a problem to create a FOP hyphenation XML from one of those --maybe one
could write a Java class that does exactly that, or maybe a Perl script
would be more appropriate. Who knows... also conceivable to write a Xerces
XNI TeXParserConfiguration[1] to parse a TeX-file, then use Xerces to send
the generated SAX events back to a file.

HTH,

Andreas

[1] see: http://xml.apache.org/xerces2-j/xni-config.html for an example of a
CSVParserConfig; use spaces instead of commas to tokenize the buffered line
of TeXt, change or add to the element names, add a few rules... --and don't
forget to donate it back to Xerces, as to return the favor ;-)


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



Re: XPath 2.0 & XSLT 2.0

2004-10-20 Thread J.Pietschmann
Andreas L. Delmelle wrote:
 > Should be quite simple really: replace the Xalan jar in your JVM's
'lib/endorsed' directory with Saxon's jar.
Note that this will wreck all Java applications on the system
which need a writable DOM implementation, because the read-only
DOM implementation supplied with Saxon overrides the JRE
implementation. Use with care.
Setting the system property javax.xml.transform.TransformerFactory
to Saxon's implementation should do the trick without global
consequences:
java -Djavax.xml.transform.TransformerFactory=\
com.icl.saxon.TransformerFactoryImpl org.apache.fop.appl.Fop ...
This is for Saxon 6.x, Saxon 7.x and 8.x use another class name.
(We could also have opted not to distribute *any* XML parser or XSLT engine,
and leave it all up to the end-user, but this would needlessly complicate
things --no more running FOP 'out-of-the-box' :-( )
It was necessary to distribute Xalan+Xerces in the Java 1.3
days. Now that nearly everybody who got past Java 1.1.8 should
have upgraded to 1.4, we can change this.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: XPath 2.0 & XSLT 2.0

2004-10-20 Thread Clay Leeds
On Oct 20, 2004, at 11:41 AM, Clay Leeds wrote:
On Oct 20, 2004, at 10:28 AM, Andreas L. Delmelle wrote:
-Original Message-
From: Clay Leeds [mailto:[EMAIL PROTECTED]

Could you explain how one would 'plug in Saxon 7 instead' of Xalan 
for
parsing?
Maestro,
Should be quite simple really: replace the Xalan jar in your JVM's
'lib/endorsed' directory with Saxon's jar. (Maybe to make sure all 
goes
well, you could also replace it in FOP's own lib directory, then 
rebuild
FOP, but IIRC this shouldn't be necessary...)
Thank you Andreas! I'm sure future browsers for this issue will thank 
you! Would you be willing to write up some documentation on how to do 
this so I can add it to the FAQ as well as the Running page (unless it 
would be more appropriate on the Configuration page).

Try it, and use the following in your XSLT to check:

I haven't tried it yet as I haven't had the need. But I will flag this 
message (and use it to update the docs when I get the chance...).
I suppose I could write the documentation myself, but I'm a bit behind 
in that regard, as I work through issues processing xml-fop's xdocs 
with forrest. I think I'm pretty close on that (and I'm getting help 
from the Forrest Team), but I'm/we're not there yet. One nice benefit, 
is that I've been doing a bunch of documentation (for my company and 
for Barcode4J) using forrest and the xdoc format. I'm now a lot more 
knowledgeable about forrest than I was before.

Web Maestro Clay
--
Clay Leeds - <[EMAIL PROTECTED]>
Webmaster/Developer - Medata, Inc. - 
PGP Public Key: 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: XPath 2.0 & XSLT 2.0

2004-10-20 Thread Clay Leeds
On Oct 20, 2004, at 10:28 AM, Andreas L. Delmelle wrote:
-Original Message-
From: Clay Leeds [mailto:[EMAIL PROTECTED]

Could you explain how one would 'plug in Saxon 7 instead' of Xalan for
parsing?
Maestro,
Should be quite simple really: replace the Xalan jar in your JVM's
'lib/endorsed' directory with Saxon's jar. (Maybe to make sure all goes
well, you could also replace it in FOP's own lib directory, then 
rebuild
FOP, but IIRC this shouldn't be necessary...)
Thank you Andreas! I'm sure future browsers for this issue will thank 
you! Would you be willing to write up some documentation on how to do 
this so I can add it to the FAQ as well as the Running page (unless it 
would be more appropriate on the Configuration page).

Try it, and use the following in your XSLT to check:

I haven't tried it yet as I haven't had the need. But I will flag this 
message (and use it to update the docs when I get the chance...).

The theory:
FOP never references classes in Xalan's own packages 
(org.apache.xalan.*).
All Xalan does for us is offer an implementation for the
javax.xml.transform.* API spec. Any provider of an implementation for 
these
packages --Saxon, for example-- should work seamlessly with FOP.
The javax.xml.transform API spec hasn't been altered in any way as a 
result
of XSLT/XPath 2.0 --it didn't *need* to be, which is the whole point, 
of
course... XSLT can continue to evolve, but the javax.xml.transform API
should be generic enough to support possible changes.

In the same fashion, one could opt to use an XML parser other than 
Xerces.
We offer Xerces and Xalan because we can distribute them freely with 
FOP.
(We could also have opted not to distribute *any* XML parser or XSLT 
engine,
and leave it all up to the end-user, but this would needlessly 
complicate
things --no more running FOP 'out-of-the-box' :-( )

Cheers,
Andreas
Thanks again for the education!
Web Maestro Clay
--
Clay Leeds - <[EMAIL PROTECTED]>
Webmaster/Developer - Medata, Inc. - 
PGP Public Key: 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: XPath 2.0 & XSLT 2.0

2004-10-20 Thread Andreas L. Delmelle
> -Original Message-
> From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
>

> In the same fashion, one could opt to use an XML parser other than Xerces.

FYI: While browsing through the sources, I found only one direct reference
to a Xerces-specific class (in: org.apache.fop.hyphenation.PatternParser),
and here it is explicitly mentioned as 'default' parser, in case none is
specified in the  'org.xml.sax.parser' system property.

Greetz,

Andreas


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



RE: XPath 2.0 & XSLT 2.0

2004-10-20 Thread Andreas L. Delmelle
> -Original Message-
> From: Clay Leeds [mailto:[EMAIL PROTECTED]

> Could you explain how one would 'plug in Saxon 7 instead' of Xalan for
> parsing?

Maestro,

Should be quite simple really: replace the Xalan jar in your JVM's
'lib/endorsed' directory with Saxon's jar. (Maybe to make sure all goes
well, you could also replace it in FOP's own lib directory, then rebuild
FOP, but IIRC this shouldn't be necessary...)

Try it, and use the following in your XSLT to check:


The theory:
FOP never references classes in Xalan's own packages (org.apache.xalan.*).
All Xalan does for us is offer an implementation for the
javax.xml.transform.* API spec. Any provider of an implementation for these
packages --Saxon, for example-- should work seamlessly with FOP.
The javax.xml.transform API spec hasn't been altered in any way as a result
of XSLT/XPath 2.0 --it didn't *need* to be, which is the whole point, of
course... XSLT can continue to evolve, but the javax.xml.transform API
should be generic enough to support possible changes.

In the same fashion, one could opt to use an XML parser other than Xerces.
We offer Xerces and Xalan because we can distribute them freely with FOP.
(We could also have opted not to distribute *any* XML parser or XSLT engine,
and leave it all up to the end-user, but this would needlessly complicate
things --no more running FOP 'out-of-the-box' :-( )

Cheers,

Andreas


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



Re: XPath 2.0 & XSLT 2.0

2004-10-20 Thread Clay Leeds
Andreas,
Could you explain how one would 'plug in Saxon 7 instead' of Xalan for 
parsing? I looked in the FAQ, and only found this blurb[1]:

Problems specific to a certain XSLT processor, like Xalan, Saxon or  
MSXML, should be handled by processor specific lists. This includes  
problems with deployment, processor specific extensions, suspected  
bugs and processor specific APIs. Note that JDK 1.4 comes with an  XML 
parser and an XSLT processor which are older versions of  Xerces and 
Xalan, respectively, and both have a number of annoying  bugs. See 
$$$FIXME on how to use more recent versions or other  packages 
instead.
hehehe... looks like this entry needs to be updated, so whatever 
information can be provided could at least be in the mailing list 
archives until the FAQ and/or site is updated. ;-)

[1]
http://xml.apache.org/fop/faq.html#postquestions
On Oct 20, 2004, at 8:43 AM, Andreas L. Delmelle wrote:
-Original Message-
From: MIDON ALEXIS [mailto:[EMAIL PROTECTED]

I would like to know if FOP is compliant with XPath 2.0 & XSLT 2.0.
Yes and No.
No, since FOP is by default distributed with Apache Xalan as XSLT 
Engine,
and AFAICT Xalan does not yet implement XSLT 2.0.

Yes, because if you like, you can plug in Saxon 7 instead, which does 
offer
support for XSLT/XPath 2.0.

Greetz,
Andreas
Web Maestro Clay
--
Clay Leeds - <[EMAIL PROTECTED]>
Webmaster/Developer - Medata, Inc. - 
PGP Public Key: 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: XPath 2.0 & XSLT 2.0

2004-10-20 Thread Andreas L. Delmelle
> -Original Message-
> From: MIDON ALEXIS [mailto:[EMAIL PROTECTED]

> I would like to know if FOP is compliant with XPath 2.0 & XSLT 2.0.

Yes and No.

No, since FOP is by default distributed with Apache Xalan as XSLT Engine,
and AFAICT Xalan does not yet implement XSLT 2.0.

Yes, because if you like, you can plug in Saxon 7 instead, which does offer
support for XSLT/XPath 2.0.


Greetz,

Andreas


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



XPath 2.0 & XSLT 2.0

2004-10-20 Thread MIDON ALEXIS



 
Hi,
 
I would like to know 
if FOP is compliant with XPath 2.0 & XSLT 2.0.
I guess it is not 
since the last FOP release is former to these standards.
 
Could you 
confirm?
 
 
Thx,
 
Alexis