Trying to create a pdf using xsl-fo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to create a pdf using xsl-fo

Madhi Krishnan
Hey all..i'm trying to to make pdf view when user hits a particular
url..using xsl-fo..
but it ends up with an error

The Following Errors Occurred:

Unable to transform FO file: org.apache.fop.apps.FOPException:
org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 6; The
processing instruction target matching "[xX][mM][lL]" is not allowed.
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException;
lineNumber: 6; columnNumber: 6; The processing instruction target matching
"[xX][mM][lL]" is not allowed.

i have created a fo.ftl file..
Reply | Threaded
Open this post in threaded view
|

Re: Trying to create a pdf using xsl-fo

Michael Brohl-3
Hi Madhi,

you should provide the contents of your *.fo.ftl, else it will be
difficult to help.

Thanks,

Michael


Am 14.08.18 um 17:05 schrieb Madhi Krishnan:

> Hey all..i'm trying to to make pdf view when user hits a particular
> url..using xsl-fo..
> but it ends up with an error
>
> The Following Errors Occurred:
>
> Unable to transform FO file: org.apache.fop.apps.FOPException:
> org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 6; The
> processing instruction target matching "[xX][mM][lL]" is not allowed.
> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException;
> lineNumber: 6; columnNumber: 6; The processing instruction target matching
> "[xX][mM][lL]" is not allowed.
>
> i have created a fo.ftl file..
>


smime.p7s (5K) Download Attachment
grv
Reply | Threaded
Open this post in threaded view
|

Re: Trying to create a pdf using xsl-fo

grv
In reply to this post by Madhi Krishnan
It could be due to various reasons ... I am drilling down such reasons ...
although as Michael mentioned seeing your code will help to pin-point the
root cause.

1. Did you create the file using copy-paste? Chances are that some invalid
characters were introduced.
2. Make sure the XML declaration is at the very top without any preceding
spaces. The XML prolog must be the first thing in the XML. No blank
characters or lines should be there at the start of the file.

I am hoping you can spot the issue in your ftl due to the above obvious
reasons. If it is still not apparent, then please provide the source code.


Thanks,
Girish Vasmatkar
HotWax Systems


On Tue, Aug 14, 2018 at 8:35 PM Madhi Krishnan <
[hidden email]> wrote:

> Hey all..i'm trying to to make pdf view when user hits a particular
> url..using xsl-fo..
> but it ends up with an error
>
> The Following Errors Occurred:
>
> Unable to transform FO file: org.apache.fop.apps.FOPException:
> org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 6; The
> processing instruction target matching "[xX][mM][lL]" is not allowed.
> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException;
> lineNumber: 6; columnNumber: 6; The processing instruction target matching
> "[xX][mM][lL]" is not allowed.
>
> i have created a fo.ftl file..
>
Reply | Threaded
Open this post in threaded view
|

Re: Trying to create a pdf using xsl-fo

Madhi Krishnan
Thank you guys for your reply...i appreciate that...
i,m just printing a hello world..
and here is my code

<?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 master-name="hello"
page-height="11in"  page-width="8.5in" margin-top="1in"
margin-bottom="1in" margin-left="1in" margin-right="1in">
      <fo:region-body margin-top="1in" margin-bottom=".5in"/>
    </fo:simple-page-master>
  </fo:layout-master-set>

  <fo:page-sequence master-reference="hello">
    <fo:flow flow-name="xsl-region-body">
      <fo:block font-size="18pt" text-align="center" font-weight="bold">
        Hello World!
      </fo:block>
    </fo:flow>
  </fo:page-sequence>

</fo:root>

On Tue, Aug 14, 2018 at 9:40 PM, Girish Vasmatkar <
[hidden email]> wrote:

> It could be due to various reasons ... I am drilling down such reasons ...
> although as Michael mentioned seeing your code will help to pin-point the
> root cause.
>
> 1. Did you create the file using copy-paste? Chances are that some invalid
> characters were introduced.
> 2. Make sure the XML declaration is at the very top without any preceding
> spaces. The XML prolog must be the first thing in the XML. No blank
> characters or lines should be there at the start of the file.
>
> I am hoping you can spot the issue in your ftl due to the above obvious
> reasons. If it is still not apparent, then please provide the source code.
>
>
> Thanks,
> Girish Vasmatkar
> HotWax Systems
>
>
> On Tue, Aug 14, 2018 at 8:35 PM Madhi Krishnan <
> [hidden email]> wrote:
>
> > Hey all..i'm trying to to make pdf view when user hits a particular
> > url..using xsl-fo..
> > but it ends up with an error
> >
> > The Following Errors Occurred:
> >
> > Unable to transform FO file: org.apache.fop.apps.FOPException:
> > org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 6; The
> > processing instruction target matching "[xX][mM][lL]" is not allowed.
> > javax.xml.transform.TransformerException: org.xml.sax.SAXParseException;
> > lineNumber: 6; columnNumber: 6; The processing instruction target
> matching
> > "[xX][mM][lL]" is not allowed.
> >
> > i have created a fo.ftl file..
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Trying to create a pdf using xsl-fo

Madhi Krishnan
Thank you so much guys...now its working...
the problem was due to space on starting...



On Wed, Aug 15, 2018 at 1:01 AM, Madhi Krishnan <
[hidden email]> wrote:

> Thank you guys for your reply...i appreciate that...
> i,m just printing a hello world..
> and here is my code
>
> <?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 master-name="hello"
> page-height="11in"  page-width="8.5in" margin-top="1in"
> margin-bottom="1in" margin-left="1in" margin-right="1in">
>       <fo:region-body margin-top="1in" margin-bottom=".5in"/>
>     </fo:simple-page-master>
>   </fo:layout-master-set>
>
>   <fo:page-sequence master-reference="hello">
>     <fo:flow flow-name="xsl-region-body">
>       <fo:block font-size="18pt" text-align="center" font-weight="bold">
>         Hello World!
>       </fo:block>
>     </fo:flow>
>   </fo:page-sequence>
>
> </fo:root>
>
> On Tue, Aug 14, 2018 at 9:40 PM, Girish Vasmatkar <girish.vasmatkar@
> hotwaxsystems.com> wrote:
>
>> It could be due to various reasons ... I am drilling down such reasons ...
>> although as Michael mentioned seeing your code will help to pin-point the
>> root cause.
>>
>> 1. Did you create the file using copy-paste? Chances are that some invalid
>> characters were introduced.
>> 2. Make sure the XML declaration is at the very top without any preceding
>> spaces. The XML prolog must be the first thing in the XML. No blank
>> characters or lines should be there at the start of the file.
>>
>> I am hoping you can spot the issue in your ftl due to the above obvious
>> reasons. If it is still not apparent, then please provide the source code.
>>
>>
>> Thanks,
>> Girish Vasmatkar
>> HotWax Systems
>>
>>
>> On Tue, Aug 14, 2018 at 8:35 PM Madhi Krishnan <
>> [hidden email]> wrote:
>>
>> > Hey all..i'm trying to to make pdf view when user hits a particular
>> > url..using xsl-fo..
>> > but it ends up with an error
>> >
>> > The Following Errors Occurred:
>> >
>> > Unable to transform FO file: org.apache.fop.apps.FOPException:
>> > org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 6; The
>> > processing instruction target matching "[xX][mM][lL]" is not allowed.
>> > javax.xml.transform.TransformerException:
>> org.xml.sax.SAXParseException;
>> > lineNumber: 6; columnNumber: 6; The processing instruction target
>> matching
>> > "[xX][mM][lL]" is not allowed.
>> >
>> > i have created a fo.ftl file..
>> >
>>
>
>