You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Newkid <sh...@yahoo.com> on 2008/03/20 11:26:17 UTC

FOP 0.94 bin - Severe Exceptions on Solaris Box

Support Cell,

Could you please advice what needs to be done to run the FOP 0.94 on a
solaris box? I have set the CLASSPATH; Convert the FOP.sh file for UNIX; etc
for all necessary files but when I tried to run FOP on Solaris it's showing
the below error:

*************************************************************************
-bash-3.00$ Fop -xml abc.xml -xsl abc.xsl -pdf abc.pdf

USAGE
Fop [options] [-fo|-xml] infile [-xsl file]
[-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl|-ps|-txt|-at [mime]|-print] <outfile>
 [OPTIONS]
  -d                debug mode
  -x                dump configuration settings
  -q                quiet mode
  -c cfg.xml        use additional configuration file cfg.xml
  -l lang           the language to use for user information
  -r                relaxed/less strict validation (where available)
  -dpi xxx          target resolution in dots per inch (dpi) where xxx is a
number
  -s                for area tree XML, down to block areas only
  -v                to show FOP version being used

  -o [password]     PDF file will be encrypted with option owner password
  -u [password]     PDF file will be encrypted with option user password
  -noprint          PDF file will be encrypted without printing permission
  -nocopy           PDF file will be encrypted without copy content
permission
  -noedit           PDF file will be encrypted without edit content
permission
  -noannotations    PDF file will be encrypted without edit annotation
permission
  -pdfprofile prof  PDF file will be generated with the specified profile
                    (Examples for prof: PDF/A-1b or PDF/X-3:2003)

 [INPUT]
  infile            xsl:fo input file (the same as the next)
  -fo  infile       xsl:fo input file
  -xml infile       xml input file, must be used together with -xsl
  -atin infile      area tree input file
  -xsl stylesheet   xslt stylesheet

  -param name value <value> to use for parameter <name> in xslt stylesheet
                    (repeat '-param name value' for each parameter)

 [OUTPUT]
  outfile           input will be rendered as PDF into outfile
  -pdf outfile      input will be rendered as PDF (outfile req'd)
  -pdfa1b outfile   input will be rendered as PDF/A-1b compliant PDF
                    (outfile req'd, same as "-pdf outfile -pdfprofile
PDF/A-1b")
  -awt              input will be displayed on screen
  -rtf outfile      input will be rendered as RTF (outfile req'd)
  -pcl outfile      input will be rendered as PCL (outfile req'd)
  -ps outfile       input will be rendered as PostScript (outfile req'd)
  -afp outfile      input will be rendered as AFP (outfile req'd)
  -tiff outfile     input will be rendered as TIFF (outfile req'd)
  -png outfile      input will be rendered as PNG (outfile req'd)
  -txt outfile      input will be rendered as plain text (outfile req'd)
  -at [mime] out    representation of area tree as XML (outfile req'd)
                    specify optional mime output to allow AT to be converted
                    to final format later
  -print            input file will be rendered and sent to the printer
                    see options with "-print help"
  -out mime outfile input will be rendered using the given MIME type
                    (outfile req'd) Example: "-out application/pdf
D:\out.pdf"
                    (Tip: "-out list" prints the list of supported MIME
types)
  -mif outfile      input will be rendered as MIF (FrameMaker) (outfile
req'd)
                    Experimental feature - requires additional
fop-sandbox.jar.
  -svg outfile      input will be rendered as an SVG slides file (outfile
req'd)
                    Experimental feature - requires additional
fop-sandbox.jar.

  -foout outfile    input will only be XSL transformed. The intermediate
                    XSL-FO file is saved and no rendering is performed.
                    (Only available if you use -xml and -xsl parameters)


 [Examples]
  Fop foo.fo foo.pdf
  Fop -fo foo.fo -pdf foo.pdf (does the same as the previous line)
  Fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
  Fop -xml foo.xml -xsl foo.xsl -foout foo.fo
  Fop foo.fo -mif foo.mif
  Fop foo.fo -rtf foo.rtf
  Fop foo.fo -print or Fop -print foo.fo
  Fop foo.fo -awt

Mar 20, 2008 3:28:36 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
java.lang.IllegalArgumentException: Error creating InputHandler object.
        at
org.apache.fop.cli.CommandLineOptions.createInputHandler(CommandLineOptions.java:818)
        at
org.apache.fop.cli.CommandLineOptions.parse(CommandLineOptions.java:165)
        at org.apache.fop.cli.Main.startFOP(Main.java:154)
        at org.apache.fop.cli.Main.main(Main.java:197)
**********************************************************************
I even tried ./Fop -d -xml abc.xml -xsl abc.xsl -pdf abc.pdf as suggested in
other but still NO use. Please help me out and let me know what needs to be
done more to get rid of this issue.

The same application is working fine on WINDOWS box but when I deployed on
SOLARIS, I received the above mentioned error.

Any tip would be deeply appreciated.!
Newkid


-- 
View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16175972.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - Severe Exceptions on Solaris Box

Posted by Matt Healy <mj...@cs.rit.edu>.
On Thu, 20 Mar 2008, J.Pietschmann wrote:
> Matt Healy wrote:
>> I went back and checked the script, and found that IFS is being set just
>> to the newline character, and does not include spaces.
>
> This is intentional: it avoids splitting directorie names which
> contain spaces, which is rather common now especially on Windows.

OK, I can certainly see that.

But I would respectfully suggest that if it's effectively causing the 
"fop" shell script to fail when executed within a stock 
Unix-based environment to break, it may make sense to look for 
other/additional approaches to resolving this problem.

I'll have to noodle around with this and see what I can come up with that 
preserves the sensitivity to embedded spaces in file names while 
addressing the failure to correctly build the command (at least under 
Solaris).

-mjh
--
Matthew J. Healy
Computer Science & Information Technology Departments
Golisano College of Computing and Information Sciences, RIT
mailto:mjh@cs.rit.edu
http://www.cs.rit.edu/~mjh
Voice: (585) 248-3425

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Newkid <sh...@yahoo.com>.
Hello Jeremias,

Thank you for your prompt support and suggestions. 

Thanks to all of you who has given their precious input and time for my
concern.

Warm Regards,
Newkid



Jeremias Maerki-2 wrote:
> 
> Do you mean using the break-before and break-after properties? Looking
> at the source code, I don't think this has been wired in, yet. The RTF
> library can generate page breaks but the methods are never called from
> the RTFHandler class.
> 
> On 28.03.2008 07:34:42 Newkid wrote:
> <snip/>
>> I am successfully able to create RTF file using FOP. The only issue which
>> I
>> have is insertion of page break at regular interval. How would I do it?
>> Any
>> idea?
>> 
>> Please keep in mind that the content of the page is NOT same everytime.
> 
> <snip/>
> 
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16577281.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Do you mean using the break-before and break-after properties? Looking
at the source code, I don't think this has been wired in, yet. The RTF
library can generate page breaks but the methods are never called from
the RTFHandler class.

On 28.03.2008 07:34:42 Newkid wrote:
<snip/>
> I am successfully able to create RTF file using FOP. The only issue which I
> have is insertion of page break at regular interval. How would I do it? Any
> idea?
> 
> Please keep in mind that the content of the page is NOT same everytime.

<snip/>



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Newkid <sh...@yahoo.com>.
Jeremias,

Thanks for the wonderful hint!

I am successfully able to create RTF file using FOP. The only issue which I
have is insertion of page break at regular interval. How would I do it? Any
idea?

Please keep in mind that the content of the page is NOT same everytime.

With Thanks!
Newkid


Jeremias Maerki-2 wrote:
> 
> On 27.03.2008 08:28:03 Newkid wrote:
>> 
>> 
>> Jeremias Maerki-2 wrote:
>> > 
>> > You can try to write an additional stylesheet that converts the
>> > column-width properties as necessary.
>> > 
>> > Or you can try to implement the missing functionality in
>> RTFHandler.java
>> > in FOP though that may not be the easiest thing to do.
>> > 
>> 
>> Hello Jeremias,
>> 
>> Thanks for the suggestion.
>> 
>> Will the column width in "%" works? Like..
>> 
>> <fo:table-column column-width="60%" column-number="1"/>
> 
> Probably not as the problem is pretty much the same as with
> proportional-column-width(): At the moment, the RTFHandler doesn't keep
> track at the various levels how much space there is available for the
> table so it can build a proper percentage context.
> 
>> Or I have to hard code the coulmn width like 
>> 
>> <fo:table-column column-width="250" column-number="1"/>
> 
> Please add a length unit (cm, in etc.).
> 
>> Secondly, have you heard about XFC? What is your take about it?
> 
> Sure, I know about XFC. Its RTF output support is certainly better than
> FOP's. But then, FOP's free, the source code available and everyone can
> help improve the code. Hint, hint!
> 
>> With Thanks!
>> NewKid
>> -- 
>> View this message in context:
>> http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16323311.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>> 
> 
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16346615.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 27.03.2008 08:28:03 Newkid wrote:
> 
> 
> Jeremias Maerki-2 wrote:
> > 
> > You can try to write an additional stylesheet that converts the
> > column-width properties as necessary.
> > 
> > Or you can try to implement the missing functionality in RTFHandler.java
> > in FOP though that may not be the easiest thing to do.
> > 
> 
> Hello Jeremias,
> 
> Thanks for the suggestion.
> 
> Will the column width in "%" works? Like..
> 
> <fo:table-column column-width="60%" column-number="1"/>

Probably not as the problem is pretty much the same as with
proportional-column-width(): At the moment, the RTFHandler doesn't keep
track at the various levels how much space there is available for the
table so it can build a proper percentage context.

> Or I have to hard code the coulmn width like 
> 
> <fo:table-column column-width="250" column-number="1"/>

Please add a length unit (cm, in etc.).

> Secondly, have you heard about XFC? What is your take about it?

Sure, I know about XFC. Its RTF output support is certainly better than
FOP's. But then, FOP's free, the source code available and everyone can
help improve the code. Hint, hint!

> With Thanks!
> NewKid
> -- 
> View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16323311.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Newkid <sh...@yahoo.com>.

Jeremias Maerki-2 wrote:
> 
> You can try to write an additional stylesheet that converts the
> column-width properties as necessary.
> 
> Or you can try to implement the missing functionality in RTFHandler.java
> in FOP though that may not be the easiest thing to do.
> 

Hello Jeremias,

Thanks for the suggestion.

Will the column width in "%" works? Like..

<fo:table-column column-width="60%" column-number="1"/>

Or I have to hard code the coulmn width like 

<fo:table-column column-width="250" column-number="1"/>

Secondly, have you heard about XFC? What is your take about it?

With Thanks!
NewKid
-- 
View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16323311.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Newkid <sh...@yahoo.com>.

Jeremias Maerki-2 wrote:
> 
> You can try to write an additional stylesheet that converts the
> column-width properties as necessary.
> 
> Or you can try to implement the missing functionality in RTFHandler.java
> in FOP though that may not be the easiest thing to do.
> 

Hello Jeremias,

Thanks for the suggestion.

Will the column width in "%" works? Like..

<fo:table-column column-width="60%" column-number="1"/>

Or I have to hard code the coulmn width like 

<fo:table-column column-width="250" column-number="1"/>

Secondly, have you heard about XFC? What is your take about it?

With Thanks!
NewKid
-- 
View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16323311.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
You can try to write an additional stylesheet that converts the
column-width properties as necessary.

Or you can try to implement the missing functionality in RTFHandler.java
in FOP though that may not be the easiest thing to do.

On 26.03.2008 13:32:29 Newkid wrote:
> 
> Hello Jeremias,
> 
> I can't change the stylesheet as it standard and secondly I am using the
> same to convert XML to PDF. Can we do anything else? Is there any
> alternative?
> 
> 
> 
> 
> > Yes and no. Yes, you have to use column-width="2cm" instead of
> > column-width="proportional-column-width(1)", for examples. And no, you
> > don't manually modify your .fo file, you should change your XSLT
> > stylesheet to use absolute lengths (cm, inches...).
> > 
> > I assume you're talking about the table columns being too narrow.
> > 
> > 
> 
> With Thanks!
> NewKid
> -- 
> View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16300786.html
> Sent from the FOP - Users mailing list archive at Nabble.com.



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Newkid <sh...@yahoo.com>.
Hello Jeremias,

I can't change the stylesheet as it standard and secondly I am using the
same to convert XML to PDF. Can we do anything else? Is there any
alternative?




> Yes and no. Yes, you have to use column-width="2cm" instead of
> column-width="proportional-column-width(1)", for examples. And no, you
> don't manually modify your .fo file, you should change your XSLT
> stylesheet to use absolute lengths (cm, inches...).
> 
> I assume you're talking about the table columns being too narrow.
> 
> 

With Thanks!
NewKid
-- 
View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16300786.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 26.03.2008 11:27:47 Newkid wrote:
> 
> Hello Jeremias,
> 
> Thank you for the prompt response!
> 
> You are correct on your stand about the column width.
> 
> > Without knowing how you specified them XSL-FO I'd guess that you need to
> > specify the column-widths  > using explicit lengths instead of the
> > proportional-columns-widths() function.
> 
> I have created the .fo file and passing the .fo file to fop to create an RTF
> file. Please advice what to do to get rid of this issue. Are you saying that
> I have to manually modified the .fo file and specify the column widths
> instead of proportional-columns-widths.

Yes and no. Yes, you have to use column-width="2cm" instead of
column-width="proportional-column-width(1)", for examples. And no, you
don't manually modify your .fo file, you should change your XSLT
stylesheet to use absolute lengths (cm, inches...).

> Please correct me if am wrong!
> 
> With Thanks!
> Newkid
> 
> 
> Jeremias Maerki-2 wrote:
> > 
> > I assume you're talking about the table columns being too narrow.
> > Without knowing how you specified them XSL-FO I'd guess that you need to
> > specify the column-widths using explicit lengths instead of the
> > proportional-columns-widths() function. This function is currently not
> > supported for RTF output. Please see also the notes here:
> > http://xmlgraphics.apache.org/fop/stable/output.html#rtf
> > 
> > On 26.03.2008 10:32:08 Newkid wrote:
> >> 
> >> Hello Matt,
> >> 
> >> Thank you so much for your support!
> >> 
> >> I am successfully able to convert XML into PDF files. I have cross
> >> checked
> >> several times and on each occasion I got the correct input.
> >> 
> >> Now, I have to convert the XML into RTF by creating FO file. All( FO and
> >> RTF) files are getting created without an issue using fop.sh but when I
> >> open
> >> the newly created RTF file, the content of the pages are getting
> >> compressed.
> >> I can only see the heading in that document. Please advice.
> >> 
> >> For your convenience, I have enclosed the created file with this reply.
> >> 
> >> Once again, thank you all for your valuable time and support.
> >> 
> >> With Thanks!
> >> Newkid
> >> 
> >> http://www.nabble.com/file/p16297931/abc.rtf abc.rtf 
> >> 
> > <snip/>
> > 
> > 
> > Jeremias Maerki
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16299634.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Newkid <sh...@yahoo.com>.
Hello Jeremias,

Thank you for the prompt response!

You are correct on your stand about the column width.

> Without knowing how you specified them XSL-FO I'd guess that you need to
> specify the column-widths  > using explicit lengths instead of the
> proportional-columns-widths() function.

I have created the .fo file and passing the .fo file to fop to create an RTF
file. Please advice what to do to get rid of this issue. Are you saying that
I have to manually modified the .fo file and specify the column widths
instead of proportional-columns-widths.

Please correct me if am wrong!

With Thanks!
Newkid


Jeremias Maerki-2 wrote:
> 
> I assume you're talking about the table columns being too narrow.
> Without knowing how you specified them XSL-FO I'd guess that you need to
> specify the column-widths using explicit lengths instead of the
> proportional-columns-widths() function. This function is currently not
> supported for RTF output. Please see also the notes here:
> http://xmlgraphics.apache.org/fop/stable/output.html#rtf
> 
> On 26.03.2008 10:32:08 Newkid wrote:
>> 
>> Hello Matt,
>> 
>> Thank you so much for your support!
>> 
>> I am successfully able to convert XML into PDF files. I have cross
>> checked
>> several times and on each occasion I got the correct input.
>> 
>> Now, I have to convert the XML into RTF by creating FO file. All( FO and
>> RTF) files are getting created without an issue using fop.sh but when I
>> open
>> the newly created RTF file, the content of the pages are getting
>> compressed.
>> I can only see the heading in that document. Please advice.
>> 
>> For your convenience, I have enclosed the created file with this reply.
>> 
>> Once again, thank you all for your valuable time and support.
>> 
>> With Thanks!
>> Newkid
>> 
>> http://www.nabble.com/file/p16297931/abc.rtf abc.rtf 
>> 
> <snip/>
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16299634.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I assume you're talking about the table columns being too narrow.
Without knowing how you specified them XSL-FO I'd guess that you need to
specify the column-widths using explicit lengths instead of the
proportional-columns-widths() function. This function is currently not
supported for RTF output. Please see also the notes here:
http://xmlgraphics.apache.org/fop/stable/output.html#rtf

On 26.03.2008 10:32:08 Newkid wrote:
> 
> Hello Matt,
> 
> Thank you so much for your support!
> 
> I am successfully able to convert XML into PDF files. I have cross checked
> several times and on each occasion I got the correct input.
> 
> Now, I have to convert the XML into RTF by creating FO file. All( FO and
> RTF) files are getting created without an issue using fop.sh but when I open
> the newly created RTF file, the content of the pages are getting compressed.
> I can only see the heading in that document. Please advice.
> 
> For your convenience, I have enclosed the created file with this reply.
> 
> Once again, thank you all for your valuable time and support.
> 
> With Thanks!
> Newkid
> 
> http://www.nabble.com/file/p16297931/abc.rtf abc.rtf 
> 
<snip/>


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - RTF Conversion on Solaris Box

Posted by Newkid <sh...@yahoo.com>.
Hello Matt,

Thank you so much for your support!

I am successfully able to convert XML into PDF files. I have cross checked
several times and on each occasion I got the correct input.

Now, I have to convert the XML into RTF by creating FO file. All( FO and
RTF) files are getting created without an issue using fop.sh but when I open
the newly created RTF file, the content of the pages are getting compressed.
I can only see the heading in that document. Please advice.

For your convenience, I have enclosed the created file with this reply.

Once again, thank you all for your valuable time and support.

With Thanks!
Newkid

http://www.nabble.com/file/p16297931/abc.rtf abc.rtf 


Matt Healy wrote:
> 
> On Thu, 20 Mar 2008, J.Pietschmann wrote:
>> Matt Healy wrote:
>>> I went back and checked the script, and found that IFS is being set just
>>> to the newline character, and does not include spaces.
>>
>> This is intentional: it avoids splitting directorie names which
>> contain spaces, which is rather common now especially on Windows.
> 
> How about this as an alternative, then: simply move the assignment to 
> (and export of) IFS to a point immediately *after* the evaluation of the 
> command-line arguments.  In this way, the loop will appropriately 
> differentiate between the arguments, rather than failing to break the 
> evaluation of '"$@"' on the spaces between quoted values.
> 
> In other words, rewrite:
> 
>  	export IFS="
>  	"
>  	for arg in "$@" ; do
>  	  . . . .
>  	done
> 
> as:
> 
>  	for arg in "$@" ; do
>  	  . . . .
>  	done
>  	export IFS="
>  	"
> 
> The content within the "for" loop appears to be space-friendly, since it's 
> using escaped double-quotes to build up the content of the "fop_exec_args" 
> variable from the values of "$arg", and no other potential file names are 
> being used in the loop.
> 
> I think this should maintain the space-friendly nature of all of the 
> subsquent code, while letting the "for" loop parse the data in a way that 
> is compliant with Bourne shell under Solaris (and possibly other 
> platforms) where the current code does not.
> 
> (Hopefully I haven't missed anything.... ;-)
> 
> -mjh
> --
> Matthew J. Healy
> Computer Science & Information Technology Departments
> Golisano College of Computing and Information Sciences, RIT
> mailto:mjh@cs.rit.edu
> http://www.cs.rit.edu/~mjh
> Voice: (585) 248-3425
> 
>>
>> J.Pietschmann
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16297931.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - Severe Exceptions on Solaris Box

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi,

Sorry to wake up a bit late, but I’d like to bring some precisions.

First, there’s no particular differences between the .tar.gz and the
.zip distribution files. In both, the fop shell script is in unix format
(lines ending with LF), while the fop.bat, fop.cmd and fop.js script
files are in dos format (lines ending with CRLF). No need to convert
them with dos2unix, no need to privilege one distribution file over the
other one.

The reason of providing both .tar.gz and .zip files is that Windows
users will naturally choose the .zip file because they are more used to
this extension; while Unix users will tend to choose the .tar.gz file.
But both platforms can handle both formats (I think), and while the
.tar.gz format is smaller this does no longer make much difference with
nowadays’ download rates. It’s mainly historical now.

As to the shell script problem on Solaris:

Matt Healy wrote:
> On Thu, 20 Mar 2008, J.Pietschmann wrote:
>> Matt Healy wrote:
>>> I went back and checked the script, and found that IFS is being set just
>>> to the newline character, and does not include spaces.
>>
>> This is intentional: it avoids splitting directorie names which
>> contain spaces, which is rather common now especially on Windows.
>
> How about this as an alternative, then: simply move the assignment to
> (and export of) IFS to a point immediately *after* the evaluation of the
> command-line arguments.  In this way, the loop will appropriately
> differentiate between the arguments, rather than failing to break the
> evaluation of '"$@"' on the spaces between quoted values.
>
> In other words, rewrite:
>
>     export IFS="
>     "
>     for arg in "$@" ; do
>       . . . .
>     done
>
> as:
>
>     for arg in "$@" ; do
>       . . . .
>     done
>     export IFS="
>     "

This export statement does no longer appear in the 0.95beta release. It
seems that it was not needed anyway and it has been moved further down
in the script. Can you please try with the latest version and report
back on this list?

That said, this script looks quite complicated to me. It may make sense
to streamline it a bit. For example, I’m not sure the JAVACMD and
JAVA_HOME variables are still needed on modern Unix distribution. Also,
maybe we can expect bash to be installed by default on every platform
now? Perhaps even Python. If there are any volunteers...

<snip/>

HTH,
Vincent


-- 
Vincent Hennebert                            Anyware Technologies
http://people.apache.org/~vhennebert         http://www.anyware-tech.com
Apache FOP Committer                         FOP Development/Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - Severe Exceptions on Solaris Box

Posted by Newkid <sh...@yahoo.com>.
Dear All,

On the top, thank you so much for the prompt response!

Let me allow to say what I've done so far..

I downloaded the fop-0.94-bin.tar and unzipped it in a windows machine. Then
I moved the unzipped files to Solaris box inside folder /var/fop. Under it,
when I tried to generate a test pdf by issuing the following command:

fop -xml test.xml -xsl test.xsl -pdf test.pdf

I got the first error "-bash: fop.sh: command not found". I have set the
resepective PATH and it's gone but I got  the second error like "No such
file or directory". After fixing the second issues, I got the error which
was related to FOP.sh i.e. IFS=^J is not an identifier.

After doing some R N D, I got rid of the issue by changing the line 25 of
fop.sh to:

IFS=""
export IFS

At that time, I was successfully able to execute the fop.sh but NOT with
parameter.

In other approach of resolving the issue, I have taken the source
file(fop.sh) and convert it using dos2unix command by hoping that it will do
the magic as suggested in one of the thread. But all vain..

Please advice, what I have to do to get rid of it?

Once again, thank you so much for your time and valuable comments!

With Thanks!
Newkid


Matt Healy wrote:
> 
> On Thu, 20 Mar 2008, J.Pietschmann wrote:
>> Matt Healy wrote:
>>> I went back and checked the script, and found that IFS is being set just
>>> to the newline character, and does not include spaces.
>>
>> This is intentional: it avoids splitting directorie names which
>> contain spaces, which is rather common now especially on Windows.
> 
> How about this as an alternative, then: simply move the assignment to 
> (and export of) IFS to a point immediately *after* the evaluation of the 
> command-line arguments.  In this way, the loop will appropriately 
> differentiate between the arguments, rather than failing to break the 
> evaluation of '"$@"' on the spaces between quoted values.
> 
> In other words, rewrite:
> 
>  	export IFS="
>  	"
>  	for arg in "$@" ; do
>  	  . . . .
>  	done
> 
> as:
> 
>  	for arg in "$@" ; do
>  	  . . . .
>  	done
>  	export IFS="
>  	"
> 
> The content within the "for" loop appears to be space-friendly, since it's 
> using escaped double-quotes to build up the content of the "fop_exec_args" 
> variable from the values of "$arg", and no other potential file names are 
> being used in the loop.
> 
> I think this should maintain the space-friendly nature of all of the 
> subsquent code, while letting the "for" loop parse the data in a way that 
> is compliant with Bourne shell under Solaris (and possibly other 
> platforms) where the current code does not.
> 
> (Hopefully I haven't missed anything.... ;-)
> 
> -mjh
> --
> Matthew J. Healy
> Computer Science & Information Technology Departments
> Golisano College of Computing and Information Sciences, RIT
> mailto:mjh@cs.rit.edu
> http://www.cs.rit.edu/~mjh
> Voice: (585) 248-3425
> 
>>
>> J.Pietschmann
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/FOP-0.94-bin---Severe-Exceptions-on-Solaris-Box-tp16175972p16194929.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - Severe Exceptions on Solaris Box

Posted by Matt Healy <mj...@cs.rit.edu>.
On Thu, 20 Mar 2008, J.Pietschmann wrote:
> Matt Healy wrote:
>> I went back and checked the script, and found that IFS is being set just
>> to the newline character, and does not include spaces.
>
> This is intentional: it avoids splitting directorie names which
> contain spaces, which is rather common now especially on Windows.

How about this as an alternative, then: simply move the assignment to 
(and export of) IFS to a point immediately *after* the evaluation of the 
command-line arguments.  In this way, the loop will appropriately 
differentiate between the arguments, rather than failing to break the 
evaluation of '"$@"' on the spaces between quoted values.

In other words, rewrite:

 	export IFS="
 	"
 	for arg in "$@" ; do
 	  . . . .
 	done

as:

 	for arg in "$@" ; do
 	  . . . .
 	done
 	export IFS="
 	"

The content within the "for" loop appears to be space-friendly, since it's 
using escaped double-quotes to build up the content of the "fop_exec_args" 
variable from the values of "$arg", and no other potential file names are 
being used in the loop.

I think this should maintain the space-friendly nature of all of the 
subsquent code, while letting the "for" loop parse the data in a way that 
is compliant with Bourne shell under Solaris (and possibly other 
platforms) where the current code does not.

(Hopefully I haven't missed anything.... ;-)

-mjh
--
Matthew J. Healy
Computer Science & Information Technology Departments
Golisano College of Computing and Information Sciences, RIT
mailto:mjh@cs.rit.edu
http://www.cs.rit.edu/~mjh
Voice: (585) 248-3425

>
> J.Pietschmann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - Severe Exceptions on Solaris Box

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Matt Healy wrote:
> I went back and checked the script, and found that IFS is being set just
> to the newline character, and does not include spaces.

This is intentional: it avoids splitting directorie names which
contain spaces, which is rather common now especially on Windows.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.94 bin - Severe Exceptions on Solaris Box

Posted by Matt Healy <mj...@cs.rit.edu>.
John Brown wrote:
> Newkid wrote:
>   
>> Support Cell,
>>
>> Could you please advice what needs to be done to run the FOP 0.94 on a
>> solaris box? I have set the CLASSPATH; Convert the FOP.sh file for UNIX; etc
>> for all necessary files but when I tried to run FOP on Solaris it's showing
>> the below error:
>>
>>     
>
> Maybe your conversion is incorrect?
>   
For what it's worth, I've been able to reproduce Newkid's problem under 
Solaris, using the 0.94 binary distribution from UNIX-friendly packaging 
(i.e., compressed tarballs).  I get both the "help" output, and the 
"severe" failure being reported.

Additional details:

    * Java version: Java(TM) SE Runtime Environment (build
      1.6.0_05-b13), Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)
    * OS version:  SunOS kiev 5.10 Generic_125101-10 i86pc i386 i86pc
      Solaris
    * I /did/ need to make one change to the "fop" script in order to
      run it correctly: since the version of Bourne shell on my system
      doesn't allow "export VARIABLE=VALUE" syntax, I had to break the
      definition of the IFS variable out as a separate step from its
      export.  (*Note this detail:* we'll come back to it shortly....)



What I found interesting is that if I run the "fop" script as "sh -x 
./fop /inputFile/ /outputFile/", and look at the traced execution, it 
looks fairly reasonable.  In fact, if I take the command that's actually 
be run at the final step (via the "exec" call) and run it by hand, the 
processing works correctly.

    % # Start failed run, using "fop" script
    % sh -x ./fop readme.fo readme.pdf
    ....
    + eval exec "/usr/local/jdk/bin/java"   -classpath
    "/home/ifac/mjh/pub/fop-0.94/lib/xmlgraphics-commons-1.2.jar:/home/ifac/mjh/pub/fop-0.94/lib/xml-apis-1.3.02.jar:/home/ifac/mjh/pub/fop-0.94/lib/xercesImpl-2.7.1.jar:/home/ifac/mjh/pub/fop-0.94/lib/xalan-2.7.0.jar:/home/ifac/mjh/pub/fop-0.94/lib/serializer-2.7.0.jar:/home/ifac/mjh/pub/fop-0.94/lib/commons-logging-1.0.4.jar:/home/ifac/mjh/pub/fop-0.94/lib/commons-io-1.3.1.jar:/home/ifac/mjh/pub/fop-0.94/lib/batik-all-1.6.jar:/home/ifac/mjh/pub/fop-0.94/lib/avalon-framework-4.2.0.jar:/home/ifac/mjh/pub/fop-0.94/build/fop.jar:/home/ifac/mjh/pub/fop-0.94/build/fop-sandbox.jar:/home/ifac/mjh/pub/fop-0.94/build/fop-hyph.jar:.=" 
    org.apache.fop.cli.Main  "readme.fo readme.pdf"
    + exec /usr/local/jdk/bin/java -classpath
    /home/ifac/mjh/pub/fop-0.94/lib/xmlgraphics-commons-1.2.jar:/home/ifac/mjh/pub/fop-0.94/lib/xml-apis-1.3.02.jar:/home/ifac/mjh/pub/fop-0.94/lib/xercesImpl-2.7.1.jar:/home/ifac/mjh/pub/fop-0.94/lib/xalan-2.7.0.jar:/home/ifac/mjh/pub/fop-0.94/lib/serializer-2.7.0.jar:/home/ifac/mjh/pub/fop-0.94/lib/commons-logging-1.0.4.jar:/home/ifac/mjh/pub/fop-0.94/lib/commons-io-1.3.1.jar:/home/ifac/mjh/pub/fop-0.94/lib/batik-all-1.6.jar:/home/ifac/mjh/pub/fop-0.94/lib/avalon-framework-4.2.0.jar:/home/ifac/mjh/pub/fop-0.94/build/fop.jar:/home/ifac/mjh/pub/fop-0.94/build/fop-sandbox.jar:/home/ifac/mjh/pub/fop-0.94/build/fop-hyph.jar:.=
    org.apache.fop.cli.Main readme.fo readme.pdf

    USAGE
    Fop [options] [-fo|-xml] infile [-xsl file]
    [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl|-ps|-txt|-at [mime]|-print]
    <outfile>
     [OPTIONS]
      -d                debug mode
    . . . .
     [Examples]
      Fop foo.fo foo.pdf
      Fop -fo foo.fo -pdf foo.pdf (does the same as the previous line)
      Fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
      Fop -xml foo.xml -xsl foo.xsl -foout foo.fo
      Fop foo.fo -mif foo.mif
      Fop foo.fo -rtf foo.rtf
      Fop foo.fo -print or Fop -print foo.fo
      Fop foo.fo -awt

    Mar 20, 2008 11:58:59 AM org.apache.fop.cli.Main startFOP
    SEVERE: Exception
    org.apache.fop.apps.FOPException: No output file specified
            at
    org.apache.fop.cli.CommandLineOptions.checkSettings(CommandLineOptions.java:698)
            at
    org.apache.fop.cli.CommandLineOptions.parse(CommandLineOptions.java:145)
            at org.apache.fop.cli.Main.startFOP(Main.java:154)
            at org.apache.fop.cli.Main.main(Main.java:197)

    % # Run the final Java command by hand
    % /usr/local/jdk/bin/java -classpath
    /home/ifac/mjh/pub/fop-0.94/lib/xmlgraphics-commons-1.2.jar:/home/ifac/mjh/pub/fop-0.94/lib/xml-apis-1.3.02.jar:/home/ifac/mjh/pub/fop-0.94/lib/xercesImpl-2.7.1.jar:/home/ifac/mjh/pub/fop-0.94/lib/xalan-2.7.0.jar:/home/ifac/mjh/pub/fop-0.94/lib/serializer-2.7.0.jar:/home/ifac/mjh/pub/fop-0.94/lib/commons-logging-1.0.4.jar:/home/ifac/mjh/pub/fop-0.94/lib/commons-io-1.3.1.jar:/home/ifac/mjh/pub/fop-0.94/lib/batik-all-1.6.jar:/home/ifac/mjh/pub/fop-0.94/lib/avalon-framework-4.2.0.jar:/home/ifac/mjh/pub/fop-0.94/build/fop.jar:/home/ifac/mjh/pub/fop-0.94/build/fop-sandbox.jar:/home/ifac/mjh/pub/fop-0.94/build/fop-hyph.jar:.=
    org.apache.fop.cli.Main readme.fo readme.pdf
    %


This made me suspect that the problem was someplace in the shell script 
and how it's managing things, rather than in the "actual" FOP (Java) code.


*Diagnosis:*
If you take another look at the output when the script is run via "sh 
-x", the call to "eval" looks pretty hokey, since it's got both of the 
parameters enclosed within a single pair of quotes (though separated by 
spaces). 

Changing the "fop_exec_debug" variable at the top of the shell script to 
"true", and modifying the final "if" in the script to read:

    if $fop_exec_debug ; then
        echo $fop_exec_command
        for f in $fop_exec_args ; do echo $f ; done      # Added for
    debugging Solaris problems
    fi


I found that the both of my command-line parameters ("readme.fo" and 
"readme.pdf") are being treated/printed as a single value within the 
variable's contents, rather than as two /separate/ values, which is more 
than a little off.  My immediate suspicion was that there was a problem 
with the "IFS" setting in the script.

I went back and checked the script, and found that IFS is being set just 
to the newline character, and does not include spaces.  (This is in both 
the copy of "fop" included in the distribution, and after I'd modified 
it to break the "export" out to a separate command, as described above.)


*The solution:*
If you modify the value for IFS (line 25 of the "fop" script in the 0.94 
binary distribution) to include a space, the script should work 
correctly.  (At the very least, it did for me.)

Under versions of Solaris like mine, you'll need to have something like 
the following:

    IFS="<space>
    "
    export IFS


where "<space>" is replaced with a single space character. 

Under versions of the Bourne shell that support exporting and setting a 
shell variable in a single statement, you can get away with:

    export IFS="<space>
    "


*Final comments:*

I would like to suggest that the Solaris-compatible change I've outlined 
above (i.e., breaking the assignment and export into two separate 
statements) should be included in the upcoming 0.95 release.

I would also like to suggest that the IFS value in the "fop" script 
should be modified to include a standard space character.


-mjh
-- 
Matthew J. Healy
Department of Computer Science, RIT
102 Lomb Memorial Drive, Rochester, NY 14623
mailto:mjh@cs.rit.edu
http://www.cs.rit.edu/~mjh
Voice: (585) 248-3425

RE: FOP 0.94 bin - Severe Exceptions on Solaris Box

Posted by John Brown <jo...@hotmail.com>.
Newkid wrote:
> 
> Support Cell,
> 
> Could you please advice what needs to be done to run the FOP 0.94 on a
> solaris box? I have set the CLASSPATH; Convert the FOP.sh file for UNIX; etc
> for all necessary files but when I tried to run FOP on Solaris it's showing
> the below error:
> 

Maybe your conversion is incorrect?

> *************************************************************************
> -bash-3.00$ Fop -xml abc.xml -xsl abc.xsl -pdf abc.pdf
> 
[output snipped - prints help screen as if fop were called without parameters]
> 
> Mar 20, 2008 3:28:36 PM org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> java.lang.IllegalArgumentException: Error creating InputHandler object.
>         at
> org.apache.fop.cli.CommandLineOptions.createInputHandler(CommandLineOptions.java:818)
>         at
> org.apache.fop.cli.CommandLineOptions.parse(CommandLineOptions.java:165)
>         at org.apache.fop.cli.Main.startFOP(Main.java:154)
>         at org.apache.fop.cli.Main.main(Main.java:197)
> **********************************************************************
> I even tried ./Fop -d -xml abc.xml -xsl abc.xsl -pdf abc.pdf as suggested in
> other but still NO use. Please help me out and let me know what needs to be
> done more to get rid of this issue.
> 
> The same application is working fine on WINDOWS box but when I deployed on
> SOLARIS, I received the above mentioned error.
>
> Any tip would be deeply appreciated.!
> Newkid


Apparently you used the Windows distribution and tried to convert it
to Unix. Why not download the Unix distribution instead? The filename
ends with .tar.gz.

It is possible that they are *not* identical except for the scripts, and
it is possible that your modification of the Cygwin fop.sh to Unix was
not correct.

 
_________________________________________________________________
Shed those extra pounds with MSN and The Biggest Loser!
http://biggestloser.msn.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org