Fwd: Help

2006-12-05 Thread Imran Khan

-- Forwarded message --
From: Imran Khan <[EMAIL PROTECTED]>
Date: Dec 5, 2006 2:15 PM
Subject: Help
To: [EMAIL PROTECTED]

Hi,

I am using FOP jar for transforming a XML file to a PDF file. In the
Application i am using an XSL file for the transformation purpose.
The xsl file is used as a resouce within the application.
The application is bulit and run sucessfully.  Note: XSL file is under the
same package as class which converts xml to pdf and the class is using the
xsl file internally using getClass.getResource(XSLT_FILE_NAME).getPath().



Now i make the jar of the above application and import the jar to a new
application and call the class for transforming a xml at a given location to
the pdf . But this time it could not find the xsl file within the jar.
What could be the possible solution to the above problem. It throws
FileNotFoundException  for xslt.

Thanks
Imran Khan


Re: Help

2006-12-05 Thread Imran Khan

Hi Eddie,

Thanks for your reply. But it did not work
I am getting the following exception:
org.apache.fop.apps.FOPException:
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException: java.io.FileNotFoundException:
E:\JodhpurVidushi\RulesDict\testxml\file:\E:\JodhpurVidushi\RulesDict\xml_pdf_covertor\bin\convertor.jar!\com\xmltopdf\convertor\honeywell.xsl
(The filename, directory name, or volume label syntax is incorrect)

the jar file is at
\E:\JodhpurVidushi\RulesDict\xml_pdf_covertor\bin\convertor.jar
the application in which i imported jar fle is
E:\JodhpurVidushi\RulesDict\testxml\

the xsl file is under \com\xmltopdf\convertor\honeywell.xsl in jar.




On 12/5/06, Eddie Mc Greal <[EMAIL PROTECTED]> wrote:


 Hi Imran,

I had a similar problem and it turned out to be spaces in the path name
where the war file was deployed.
That may be the issue – in any case you can rename your jar file to zip –
and then browse it to make sure the file is included.

Eddie




On 05/12/2006 10:19, "Imran Khan" <[EMAIL PROTECTED]> wrote:



-- Forwarded message --
From: *Imran Khan* <[EMAIL PROTECTED]>
Date: Dec 5, 2006 2:15 PM
Subject: Help
To: [EMAIL PROTECTED]

Hi,

I am using FOP jar for transforming a XML file to a PDF file. In the
Application i am using an XSL file for the transformation purpose.
The xsl file is used as a resouce within the application.
The application is bulit and run sucessfully.  Note: XSL file is under the
same package as class which converts xml to pdf and the class is using the
xsl file internally using getClass.getResource(XSLT_FILE_NAME).getPath().



Now i make the jar of the above application and import the jar to a new
application and call the class for transforming a xml at a given location to
the pdf . But this time it could not find the xsl file within the jar.
What could be the possible solution to the above problem. It throws
FileNotFoundException  for xslt.

Thanks
Imran Khan




Best regards
Eddie Mc Greal
Imilia – Interactive Mobile Applications GmbH.
Garystrasse 94,
14195 Berlin
Germany

Phone: int+ 49 (0)30 84591573
Mobile: int + 49 (0) 170 5547619
[EMAIL PROTECTED]




Re: Help

2006-12-05 Thread Imran Khan

Eddie,

Here is the a portion of the class which is embedded in jar code where i
found the File

...
String xsltLocation =getClass().getResource("").getFile()+"
honeywell.xsl";
xsltLocation=xsltLocation.replaceAll("%20"," ");
if( xsltLocation==null || xsltLocation.trim().equals("") )
{
   throw new Exception( "XSLT file not found" );

 }
 if( (xmlLocation != null)  ) {
File file = new File( xsltLocation );

XSLTInputHandler input =
new XSLTInputHandler( new File(xmlLocation), new
File(xsltLocation) );

   renderXML( input, pdfLocation );
   }
...
.
it it throwing error at new new XSLTInputHandler( new File(xmlLocation), new
File(xsltLocation) );

In a new application i import jar and simply call the function containing
above code. I don't do any concatenaton in the path except shown above.

regards
Imran

On 12/5/06, Eddie Mc Greal <[EMAIL PROTECTED]> wrote:


 Imran,

The path to the file is definitely incorrect. You've got a concatenation
of paths that is not a valid URL. It seems to think the path
file:\E:\JodhpurVidushi\RulesDict\xml_pdf_covertor\bin\convertor.jar!\com\xmltopdf\convertor\honeywell.xsl
is relative to E:\JodhpurVidushi\RulesDict\testxml
Can you post the code where you specify the xsl URL – maybe someone else
can shed some light on this.

Eddie



On 05/12/2006 10:46, "Imran Khan" <[EMAIL PROTECTED]> wrote:

Hi Eddie,

Thanks for your reply. But it did not work
I am getting the following exception:
org.apache.fop.apps.FOPException:
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException : java.io.FileNotFoundException:
E:\JodhpurVidushi\RulesDict\testxml\file:\E:\JodhpurVidushi\RulesDict\xml_pdf_covertor\bin\convertor.jar!\com\xmltopdf\convertor\honeywell.xsl
(The filename, directory name, or volume label syntax is incorrect)

the jar file is at
 \E:\JodhpurVidushi\RulesDict\xml_pdf_covertor\bin\convertor.jar
the application in which i imported jar fle is
E:\JodhpurVidushi\RulesDict\testxml\

the xsl file is under \com\xmltopdf\convertor\honeywell.xsl in jar.




On 12/5/06, *Eddie Mc Greal* <[EMAIL PROTECTED]> wrote:

Hi Imran,

I had a similar problem and it turned out to be spaces in the path name
where the war file was deployed.
That may be the issue – in any case you can rename your jar file to zip –
and then browse it to make sure the file is included.

Eddie





On 05/12/2006 10:19, "Imran Khan" <[EMAIL PROTECTED]> wrote:



-- Forwarded message --
From: *Imran Khan* <[EMAIL PROTECTED]>
Date: Dec 5, 2006 2:15 PM
Subject: Help
To: [EMAIL PROTECTED]

Hi,

I am using FOP jar for transforming a XML file to a PDF file. In the
Application i am using an XSL file for the transformation purpose.
The xsl file is used as a resouce within the application.
The application is bulit and run sucessfully.  Note: XSL file is under the
same package as class which converts xml to pdf and the class is using the
xsl file internally using getClass.getResource(XSLT_FILE_NAME).getPath().



Now i make the jar of the above application and import the jar to a new
application and call the class for transforming a xml at a given location to
the pdf . But this time it could not find the xsl file within the jar.
What could be the possible solution to the above problem. It throws
FileNotFoundException  for xslt.

Thanks
Imran Khan




Best regards
Eddie Mc Greal
Imilia – Interactive Mobile Applications GmbH.
Garystrasse 94,
14195 Berlin
Germany

Phone: int+ 49 (0)30 84591573
Mobile: int + 49 (0) 170 5547619
[EMAIL PROTECTED]





Best regards
Eddie Mc Greal
Imilia – Interactive Mobile Applications GmbH.
Garystrasse 94,
14195 Berlin
Germany

Phone: int+ 49 (0)30 84591573
Mobile: int + 49 (0) 170 5547619
[EMAIL PROTECTED]




Problem with FOP-0.20.5 -watermark position

2006-12-11 Thread Imran Khan

Hi All,

I am using FOP-0.20.5 for xml to pdf conversion.
I am facing problem while creating a watermark. For creating a watermark i
am using background property of a block .
Now problem is that i want the image as the background place centrally. But
when i use background-position="center" it does not work
.I also have tested with background-position-horizontal,
background-position-vertical but everything goes in vain.


Plz help me to make the image  or any work as a background , or watermark

Thanks
Imran


Re: Problem with FOP-0.20.5 -watermark position

2006-12-11 Thread Imran Khan

Thanks J.Pietschmann


On 12/12/06, J.Pietschmann <[EMAIL PROTECTED]> wrote:


Imran Khan wrote:
> I am using FOP-0.20.5 for xml to pdf conversion.
> I am facing problem while creating a watermark. For creating a watermark
i
> am using background property of a block .
> Now problem is that i want the image as the background place centrally.
But
> when i use background-position="center" it does not work
> .I also have tested with background-position-horizontal,
> background-position-vertical but everything goes in vain.

FOP 0.20.5 doesn't support positioning background images well
(the image is scaled to fit the whole area, which should look
like a centered position in most cases).

Also, 0.20.5 is no longer maintained. Please try a more recent
release.

J.Pietschmann



FOP 0.90.0 problem

2006-12-11 Thread Imran Khan

Hi

I have one problem related to FOP 0.90.0.

I am getting an excepton :org.apache.fop.fo.ValidationException:
Error(Unknown location): For fo:simple-page-master, only one fo:region-body
may be declared.

while the same xsl runs fine on FOP 0.20.5
the xsl has layout as



 

   
   
   
   
   

 
 

   
 

 
   
 

   


could you tell me where is the problem .?

Thanks & Regards
Imran Khan


Re: Problem with FOP-0.20.5 -watermark position

2006-12-11 Thread Imran Khan

Hi,

Is it possible to place an image centrally in page as a watermark using FOP
0.92 beta version?

At present i am using FOP 0.20.5 which does not allow the same.

Thanks,
Imran

On 12/12/06, Imran Khan <[EMAIL PROTECTED]> wrote:


Thanks J.Pietschmann


On 12/12/06, J.Pietschmann <[EMAIL PROTECTED]> wrote:
>
> Imran Khan wrote:
> > I am using FOP-0.20.5 for xml to pdf conversion.
> > I am facing problem while creating a watermark. For creating a
> watermark i
> > am using background property of a block .
> > Now problem is that i want the image as the background place
> centrally. But
> > when i use background-position="center" it does not work
> > .I also have tested with background-position-horizontal,
> > background-position-vertical but everything goes in vain.
>
> FOP 0.20.5 doesn't support positioning background images well
> (the image is scaled to fit the whole area, which should look
> like a centered position in most cases).
>
> Also, 0.20.5 is no longer maintained. Please try a more recent
> release.
>
> J.Pietschmann
>




ASP

2006-12-12 Thread Imran Khan

Hi All,
is it possile to transform an XML to a PDF in ASP /ASP.net?

--
Thanks & Regards,
Imran Khan
Software Engineer
Daffodil Software Ltd.
Gurgaon, India

Mobile: 09811221852