Re: Using FOP on a ASP.NET server to convert FO to PDF

2002-06-19 Thread gary cor
Wim,
This sounds really interesting.  When you run a com component you don't need 
a servlet for FOP or to integrate servlets into IIS? Very interesting!! How 
easy is it to write the component itself? And, if you can do this easily why 
is there a project for FOP C# at http://sourceforge.net/projects/fop-dotnet/ 
for a full implementation.

G.
PS
I'm finding Java really complicated compared with .NET so I hope there is 
some open source integration for FOP on it soon! My you I don't really know 
what a com component is so I .NET turns my brains to liquid also!


From: FOP Newsgroup (@Basebeans.com) [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Using FOP on a ASP.NET server to convert FO to PDF
Date: Tue, 18 Jun 2002 14:10:01 -0700
Subject: Re: Using FOP on a ASP.NET server to convert FO to PDF
From: Wim Sandra [EMAIL PROTECTED]
 ===
I've integrated FOP in a ASP.NET server by implementing a COM component.
The COM components export a very simple interface with a method that takes
some XML data, a XSL-FO stylesheet and writes a PDF file (or writes the PDF
data to some memory).   The COM component calls the FOP java methods with
JNI (Java Native Interface).
Ultimately, in your C# ASP.NET application, we more or less write:
FOPLib.Fop fop = new FOPLib.Fop();
fop.fop2File(xmlData,xsltData,outputFileName);
Response.Redirect(outputFileName);
or
FOPLib.Fop fop = new FOPLib.Fop();
uint numBytes = fop.fop2Memory(xmlData,xsltData);
byte [] bytes = new byte [numBytes];
renderer.read(bytes);
Response.Expires = 0;
Response.Buffer = true;
Response.ContentType = @application/pdf;
Response.BinaryWrite(bytes);
Response.End();
Wim
Balaji Loganathan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,
Did u able to install Tomcat with IIS.if so then
 integrating FOP with .NET server is easy.
   My suggestion is ,
 1.Try to install Tomcat and run some sample servlet
 examples.
 2.Try to configure FOP with Tomcat so that u can run
 the FopServlet(a sample servlet which convert FO/XSL
 to pdf)from the browser.
 3.Try to configure Tomcat with IIS
 4.Then u can do the same with .NET server.

 Documentation/steps/guidelines are available from
 Tomcat,FOP packages.
  Just give another try.It will work.

 Rgds
 Balaji

 http://www.sold.com.au - SOLD.com.au
 - Find yourself a bargain!


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


Region Border

2002-06-19 Thread @Basebeans.com
Subject: Region Border
From: Owen Thomas [EMAIL PROTECTED]
 ===
How do I create a border around the region-body?

Or Alternatively create a block that fills the region-body?

TIA

Owen




RE: error handling

2002-06-19 Thread Roland Neilands
 You're right. The command line wrapper can and probably should delete
 the target file in case of an error. Could you check if the
 return code
 is set on the command line? If not, we should fix that.
 Jeremias Märki

 Don't know about UNIX but on Windows it seems that the return
 code is always 0.

 Regards
 Con

Sorry about the delay, my Solaris test box was reconfigured.
The return code is not set by FOP on Linux: even appending:
exit $?
to fop.sh makes no difference as FOP itself returns 0 regardless.

NB: running 'java' with no parameters does return error code 1.

I have no idea how to set or check DOS return codes.

Regards,
Roland



RE: Configuring Portrait/landscape from PSRenderer

2002-06-19 Thread Ismaeil, Sameh Z
Yes, we convert pdf to ps from the command line using Acrobat. I don't know
about the printer because I'm not the one who wrote the code (that I want to
get rid of) and I'm not the one who is concerned. I only know they accept
PS.  Anyways, it seems from your answer that if I render fo to PS directly,
the code will be more dependant not only on the application (and its
parameters, which I wanted to remove), but also on the printer. That's
something I really don't want to do. 

Right now everything is fine. I only posted the questions because I wanted
the code to look better (and because I wanted to understand why things must
be done this way). From an OO point of view, I thought it could be better to
pass to the printer (the printing object, that is) only one thing that has
is all ( the document, pdf or ps) and not like what is happening now;
passing also the paper size and the orientation, to be used by Acorbat.

Thank you very much Jeremais

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 18, 2002 7:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Configuring Portrait/landscape from PSRenderer


 We use Acrobat on Unix to print PDF's. Currently we have to call Acrobat
 with the correct parameters of paper size and orientation from Java code.
I
 was wondering maybe I could get rid of this step by including such
 parameters into the pdf itself. It seems I can't.

No. Do I get you correctly, that you convert the PDF to PS on the
command line and print the resulting PS file? What printer are you
printing on? We're printing on big Xerox DocuPrint printers that have no
trouble with the PostScript generated by Acrobat Reader on Unix. If
you're printing on a HP LaserJet or similar there might be some special
PS commands available that you could patch the PS with to get what you
want.

 I understood from Amine's question that it is not the same case with PS
(of
 course, it is a printer language). I think his question meant that in PS
it
 is possible to set the orientation (and the paper size??) in PS. If so, I
 might consider changing my output format to PS, and hence get rid of the
 ugly Acrobat call, with parameters, from code. Currently I don't know if
 switching to PS is that easy, or if it would work as I expect.

Switching to PS may not be so easy, switching to PSRenderer that is. The
PS renderer still lacks considerable features when compared to the PDF
renderer. I'm still using the PDF renderer for our stuff and convert the
PDFs to PostScript using Acrobat Reader on Unix. But it may be
worthwhile to try it out if you only need Times, Helvetica or Courier.

 It all depends on whether the paper size can be set inside the fo
(probably
 not?) and rendered correctly to PS using FOP. Or, possibly by using
another
 workaround in PSRenderer e.g. by measuring the page width/height
combination
 against standard paper sizes and setting the closest one into the PS.

You set the paper size in the page master. And FOP does everything right
what paper size is concerned. The only problem is mastering the
different target printers. PDF is meant to be portable so it doesn't
contain printer specific stuff. Printing a PDF means you have to do some
stuff before everything prints out as expected. In PS this is currently
the same, because the PS renderer doesn't support PPD's that describes
the PS printer's capabilities. When you install a PostScript printer on
Windows you often get the standard Adobe PS driver plus a PPD. I think
the solution to your problem really depends on the printer you're using.
If you can tell me which one you're using, then I can probably propose a
solution.

 But thanks for implementing the orientation for PS orientation anyway :)

You're welcome.

Cheers,
Jeremias Märki


RE: Fop Servlet Problems

2002-06-19 Thread mike . witt
Did you try giving the fo file a path?  For example when I ran this I gave
it fo=c:\temp\simple.fo and it worked (assuming my fo file was found in
c:\temp.  Of course, an absolute path isn't so good for servlets, but you
get the idea.

Mike

-Original Message-
From: gary cor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 18, 2002 6:46 PM
To: [EMAIL PROTECTED]
Subject: Fop Servlet Problems


Dear All,

I am up and running with my first ever servlets in Tomcat4.03 (although they

only run in the examples folder). So, I put all five of the latest version 
of the jar files as instructed in FOP servlets into the lib directory ( 
avalon-framework-4.1.2.jar batik-all-1.5b1.jar fop-0.20.3rc.jar 
logkit-1.0.1.jar and xalan-2.3.1.jar) and complied servlets OK as well.  
However, following this I've tried everything I can think possible to make a

servelt produce a pdf from fo and still no joy and very soar eyes now as 
well!

First I ran them without an fo file but they error as follows:
http://localhost:8080/examples/servlet/FopPrintServlet?
or
http://localhost:8080/examples/servlet/FopServlet?
Results in:
FopServlet Error
No 'fo' or 'xml/xsl' request param given.

So then I assume I it is just a case of not finding an file.fo but when I 
try to give in one

http://localhost:8080/examples/servlet/FopServlet?fo=border.fo

and it always causes a status 500 internal service error (maybe something to

do with it running only in the examples folder I have no idea!).  I also 
found a mail a while ago from the group saying to put the fo files in the 
C:\Apache-Tomcat\bin file but still I get the same errors.

Please can someone help?

G.

PS. I have also found a servlet in saxon for FOP has anyone tried this out 
is it easier to get working!



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


-unsubscribe

2002-06-19 Thread Jens Posingies



Re: -unsubscribe

2002-06-19 Thread Magnus Sjöberg
When unsubscribing to a mailing list at xml.apache.org send
an email to:
'listname'[EMAIL PROTECTED]

So to unsubscribe to this list, send an email to:
[EMAIL PROTECTED]
This will unsubscribe your *current* emailadress.

Info about this can be found at:
http://xml.apache.org/mail.html

///Magnus


RE: Fop Servlet Problems

2002-06-19 Thread gary cor
Mike,
I haven't access to it right now. But I did try fo=c:\borber.fo and the web 
browser goes white with the FopServlet only but no PDF anywhere. I haven't 
access to it now but I'll try it again later, I think I probably do it with 
escaping next ie.

fo=c%3a\borber.fo
Cheers
G.

From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Fop Servlet Problems
Date: Tue, 18 Jun 2002 18:57:08 -0700
Did you try giving the fo file a path?  For example when I ran this I gave
it fo=c:\temp\simple.fo and it worked (assuming my fo file was found in
c:\temp.  Of course, an absolute path isn't so good for servlets, but you
get the idea.
Mike
-Original Message-
From: gary cor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 18, 2002 6:46 PM
To: [EMAIL PROTECTED]
Subject: Fop Servlet Problems
Dear All,
I am up and running with my first ever servlets in Tomcat4.03 (although 
they

only run in the examples folder). So, I put all five of the latest version
of the jar files as instructed in FOP servlets into the lib directory (
avalon-framework-4.1.2.jar batik-all-1.5b1.jar fop-0.20.3rc.jar
logkit-1.0.1.jar and xalan-2.3.1.jar) and complied servlets OK as well.
However, following this I've tried everything I can think possible to make 
a

servelt produce a pdf from fo and still no joy and very soar eyes now as
well!
First I ran them without an fo file but they error as follows:
http://localhost:8080/examples/servlet/FopPrintServlet?
or
http://localhost:8080/examples/servlet/FopServlet?
Results in:
FopServlet Error
No 'fo' or 'xml/xsl' request param given.
So then I assume I it is just a case of not finding an file.fo but when I
try to give in one
http://localhost:8080/examples/servlet/FopServlet?fo=border.fo
and it always causes a status 500 internal service error (maybe something 
to

do with it running only in the examples folder I have no idea!).  I also
found a mail a while ago from the group saying to put the fo files in the
C:\Apache-Tomcat\bin file but still I get the same errors.
Please can someone help?
G.
PS. I have also found a servlet in saxon for FOP has anyone tried this out
is it easier to get working!

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


Re: PNG with FOP

2002-06-19 Thread Vikram Verma

Hi ,

Thanks Bill. I got it working.

Regards,
  -Vikram

   From:
Bill Collins [EMAIL PROTECTED]
 To:
[EMAIL PROTECTED]



You cannot just add jimi to the lib you must add it and recompile fop.
Be
sure to add it in the build file as well.
I went though the same issue yesterday (with tiff images) and this
method
fixed my problem.
-Bill Collins

-Original Message-
From: Vikram Verma [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 18, 2002 8:55 AM
To: [EMAIL PROTECTED]; fop-dev@xml.apache.org
Subject: PNG with FOP


Hi,

I am trying to incorporate a PNG image file in a PDF through FOP.

The release notes say that I need to have JIMI also in the codebase.

But despite adding JIMI  its not generating the PNG format images
in the resultant PDF whereas I can do the same for a GIF image file.

any guess why ??

Regards,
 Vikram Verma



Re: Region Border

2002-06-19 Thread Oleg Tkachenko
FOP Newsgroup (@Basebeans.com) wrote:
How do I create a border around the region-body?
I believe you cannot. xsl spec insists that In version 1.0 of this 
Recommendation, the values of the padding and border-width traits must be 0.

--
Oleg Tkachenko
Multiconn International Ltd, Israel


Re: More xslt than fop perhapes

2002-06-19 Thread Oleg Tkachenko
Hanlan, Dominic - Senior Developer wrote:
 I have an xml document to be styled to pdf with Fop, two questions arise,
1. if I have a construct such as 

section id=parathis is text section id=url
url=http://xx.yy.zz;which is to be a link/section/section
How do I, in xslt, recognise the url tag within the para tag
xsl:template match=[EMAIL PROTECTED]'para']/[EMAIL PROTECTED]'url']
But that's offtopic, try excelent xsl-list at 
http://www.mulberrytech.com/xsl/xsl-list.

2. how do I then insert a link into the pdf
xsl:template match=[EMAIL PROTECTED]'para']/[EMAIL PROTECTED]'url']
fo:basic-link external-destination=[EMAIL PROTECTED]
xsl:value-of select=./
/fo:basic-link
/xsl:template
--
Oleg Tkachenko
Multiconn International Ltd, Israel


Hyphenation

2002-06-19 Thread Ralf Steppacher
Hi everybody.
Is FOP supposed to behave the same as (La)TeX does when evaluating the 
hyphenation patterns?

The problem I have is with words already containing a hyphen character. 
Such words are hyphenated in TeX at no other position. For example 
'Leinfelden-Echterdingen', 'Leinfelden--Echterdingen' and 'Leinfelden 
Echterdingen' are hyphenated: Leinfelden-Echterdingen; 
Leinfelden--Echterdingen; Lein-fel-den Ech-ter-din-gen.

FOP seems to ignore the hyphen in 'Leinfelden-Echterdingen' and 
hyphenates like 'Leinfelden-Echter-dingen', for example.

Is there a way to enforce TeX's behavior?
TIA
Ralf Steppacher


RE: Fop Servlet Problems

2002-06-19 Thread mike . witt
If it goes white, I would also try: fo=c:\border.fodummy=.pdf.  I
recently was able to resolve a white screen problem with ie because it
didn't recognize that its response was pdf without this pdf extension.

-Original Message-
From: gary cor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 19, 2002 5:41 AM
To: [EMAIL PROTECTED]
Subject: RE: Fop Servlet Problems


Mike,

I haven't access to it right now. But I did try fo=c:\borber.fo and the web 
browser goes white with the FopServlet only but no PDF anywhere. I haven't 
access to it now but I'll try it again later, I think I probably do it with 
escaping next ie.

fo=c%3a\borber.fo

Cheers

G.


From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Fop Servlet Problems
Date: Tue, 18 Jun 2002 18:57:08 -0700

Did you try giving the fo file a path?  For example when I ran this I gave
it fo=c:\temp\simple.fo and it worked (assuming my fo file was found in
c:\temp.  Of course, an absolute path isn't so good for servlets, but you
get the idea.

Mike

-Original Message-
From: gary cor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 18, 2002 6:46 PM
To: [EMAIL PROTECTED]
Subject: Fop Servlet Problems


Dear All,

I am up and running with my first ever servlets in Tomcat4.03 (although 
they

only run in the examples folder). So, I put all five of the latest version
of the jar files as instructed in FOP servlets into the lib directory (
avalon-framework-4.1.2.jar batik-all-1.5b1.jar fop-0.20.3rc.jar
logkit-1.0.1.jar and xalan-2.3.1.jar) and complied servlets OK as well.
However, following this I've tried everything I can think possible to make 
a

servelt produce a pdf from fo and still no joy and very soar eyes now as
well!

First I ran them without an fo file but they error as follows:
http://localhost:8080/examples/servlet/FopPrintServlet?
or
http://localhost:8080/examples/servlet/FopServlet?
Results in:
FopServlet Error
No 'fo' or 'xml/xsl' request param given.

So then I assume I it is just a case of not finding an file.fo but when I
try to give in one

http://localhost:8080/examples/servlet/FopServlet?fo=border.fo

and it always causes a status 500 internal service error (maybe something 
to

do with it running only in the examples folder I have no idea!).  I also
found a mail a while ago from the group saying to put the fo files in the
C:\Apache-Tomcat\bin file but still I get the same errors.

Please can someone help?

G.

PS. I have also found a servlet in saxon for FOP has anyone tried this out
is it easier to get working!



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


Fo:basic link

2002-06-19 Thread Neeru . Bhardwaj

Is it possible to sepcify a destination page in basic-link
external-destination. I am trying to link to an external pdf file and want
to goto a specifi page.
Thanks

-Neeru



Re: Fo:basic link

2002-06-19 Thread Oleg Tkachenko
[EMAIL PROTECTED] wrote:
Is it possible to sepcify a destination page in basic-link
external-destination. I am trying to link to an external pdf file and want
to goto a specifi page.
Try this way:
fo:basic-link external-destination=http://www.foo.com/bar.pdf#page=5;
--
Oleg Tkachenko
Multiconn International Ltd, Israel


RE: Why is there a margin at the top?

2002-06-19 Thread Vollmer, Thomas - CannonSA
Do you happen to know whether it's been submitted
to Bugzilla already? If not, I'll submit it.

-Thomas

 -Original Message-
 From: J.Pietschmann [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 18, 2002 1:53 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Why is there a margin at the top?
 
 
 Vollmer, Thomas - CannonSA wrote:
  I'm using FOP 0.20.3 to create PDF from SVG and
  I'm encountering a problem with an unexpected 
  margin at the top of the PDF page.
 ...
  I'm new to XSL-FO so I might be overlooking 
  something here. Or is this a FOP bug?
 
 I'd say it's a bug.
 
 
 J.Pietschmann
 

 
If this email is not intended for you, or you are not responsible for the
delivery of this message to the addressee, please note that this message may
contain ITT Privileged/Proprietary Information.  In such a case, you may not
copy or deliver this message to anyone.  You should destroy this message and
kindly notify the sender by reply email.  Information contained in this
message that does not relate to the business of ITT is neither endorsed by
nor attributable to ITT. 
 



Re: Hyphenation

2002-06-19 Thread J.Pietschmann
Ralf Steppacher wrote:
Is FOP supposed to behave the same as (La)TeX does when evaluating the 
hyphenation patterns?
I don't think so.
Is there a way to enforce TeX's behavior?
Not prepackaged. You are invited to hack around in the files
in layout/hyphenation.
J.Pietschmann



Re: Region Border

2002-06-19 Thread J.Pietschmann
FOP Newsgroup (@Basebeans.com) wrote:
Or Alternatively create a block that fills the region-body?
Try an absolutely positioned fo:block-container. There are
some exampoles in docs/examples. I'm not sure whether borders
are implemented for block-container, if necessary, embed an
appropriate one cell table (set width on the fo:column, height
on the fo:row).
J.Pietschmann


Re: Region Border

2002-06-19 Thread Chuck Paussa
J.Pietschmann wrote:
FOP Newsgroup (@Basebeans.com) wrote:
Or Alternatively create a block that fills the region-body?

Try an absolutely positioned fo:block-container. There are
some exampoles in docs/examples. I'm not sure whether borders
are implemented for block-container, if necessary, embed an
appropriate one cell table (set width on the fo:column, height
on the fo:row).
J.Pietschmann
Borders have been  implemented for block-containers.