Re: newbie needs help with relative address for image.

2002-02-12 Thread Scott Moore

You can configure FOP to start all relative paths at a certain directory.
That's what I do in my servlet:

org.apache.fop.configuration.Configuration.put("baseDir", "file:" + dir
 + File.separator);

- Original Message -
From: "Savino, Matt C" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 2:42 PM
Subject: RE: newbie needs help with relative address for image.


> FYI - I still can't get this to work for a relative file path. Since I
have
> NT dev boxes and Unix QA and Prod, I have to feed the explicit PDF
filepath
> to the stylesheet as a parameter. I get the filepath form a
> environment-level properties file. Still looking for that elusive XSLT
> relative filepath if anyone has found it.
>
> Here's our solution if it helps anyone:
>
> <<< XSLT >>>
> 
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> xmlns:fo="http://www.w3.org/1999/XSL/Format";>
>
>  
>
> (...)
>
>  src="{concat($pdfImagePath,'ClinTrialLogoGreenBig.gif')}" />
>
> (...)
>
> <<< Servlet Piece >>>
>   transformer.setParameter("pdfImagePath",
>
> getServletConfig().getServletContext().getAttribute("pdfImagePath"));
>
>
> -Matt
>
>
> > -Original Message-
> > From: Rob Smith [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 29, 2002 1:55 AM
> > To: [EMAIL PROTECTED]
> > Cc: 'Troy Bottger'
> > Subject: RE: newbie needs help with relative address for image.
> >
> >
> >
> > > From: Troy Bottger
> > >...
> > >  > src="{../companylogo/url}"/>
> > > It is just when I specify the relative address when I get:
> > > Error while creating area : Invalid Image URL - error on
> > relative URL : no
> > > protocol: null/abc/images/merchant_logo.gif
> >
> > Try src="file:{../companylogo/url}"
> > --
> > Rob Smith
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>



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




RE: newbie needs help with relative address for image.

2002-02-12 Thread Savino, Matt C

FYI - I still can't get this to work for a relative file path. Since I have
NT dev boxes and Unix QA and Prod, I have to feed the explicit PDF filepath
to the stylesheet as a parameter. I get the filepath form a
environment-level properties file. Still looking for that elusive XSLT
relative filepath if anyone has found it.

Here's our solution if it helps anyone:

<<< XSLT >>>

http://www.w3.org/1999/XSL/Transform"; 
xmlns:fo="http://www.w3.org/1999/XSL/Format";>

 

(...)



(...)

<<< Servlet Piece >>>
  transformer.setParameter("pdfImagePath", 
 
getServletConfig().getServletContext().getAttribute("pdfImagePath"));


-Matt


> -Original Message-
> From: Rob Smith [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 29, 2002 1:55 AM
> To: [EMAIL PROTECTED]
> Cc: 'Troy Bottger'
> Subject: RE: newbie needs help with relative address for image.
> 
> 
> 
> > From: Troy Bottger
> >...
> >  src="{../companylogo/url}"/>
> > It is just when I specify the relative address when I get:
> > Error while creating area : Invalid Image URL - error on 
> relative URL : no
> > protocol: null/abc/images/merchant_logo.gif
> 
> Try src="file:{../companylogo/url}"
> --
> Rob Smith
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 
> 


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




RE: newbie needs help with relative address for image.

2002-01-29 Thread Rob Smith


> From: Troy Bottger
>...
> 
> It is just when I specify the relative address when I get:
> Error while creating area : Invalid Image URL - error on relative URL : no
> protocol: null/abc/images/merchant_logo.gif

Try src="file:{../companylogo/url}"
--
Rob Smith


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




RE: newbie needs help with relative address for image.

2002-01-28 Thread Manuel Mall

The error message complains about a missing protocol in the address.

Have you tried: "file:/../../companylogo/url"?

Manuel

-Original Message-
From: Troy Bottger [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 29 January 2002 0:38
To: '[EMAIL PROTECTED]'
Subject: RE: newbie needs help with relative address for image.


Does this work if I don't call it from a command line?  I have uncommented
the BaseDir in the userconfig.xml and re-ran my application (servlet
application) and I am not seeing that this file is being used.

-Original Message-
From: "Buchtík, Michal" [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 28, 2002 8:51 AM
To: '[EMAIL PROTECTED]'
Subject: RE: newbie needs help with relative address for image.


Set the BaseDir in userconfig.xml

Michal

-Original Message-
From: Troy Bottger [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 28, 2002 2:27 PM
To: '[EMAIL PROTECTED]'
Subject: newbie needs help with relative address for image.


Everything in my XSL/FO is working perfectly except my images.  The address
I am supplying is a relative address (that works if I use HTML), but does
not
work if I use XSL/FO to PDF.  I have read the archives, and I am not finding
any solutions to this problem.  Can anyone tell me what I am doing wrong?



/companylogo/url gets translated into: abc\images\merchant_logo.gif

If I use a full path, ie. (c:\xyz\htdocs\abc\images\mechant_logo.gif) it is
fine.  It is just when I specify the relative address when I get:
Error while creating area : Invalid Image URL - error on relative URL : no
protocol: null/abc/images/merchant_logo.gif



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

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

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

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




Re: newbie needs help with relative address for image.

2002-01-28 Thread Thierry Gounelle

I think you have to explicitly instanciate (once) the
org.apache.fop.apps.Options class with the path to your userconfig file. If you
use it in a servlet, that may be done in the init() method.

thierry

Troy Bottger wrote:

> Does this work if I don't call it from a command line?  I have uncommented
> the BaseDir in the userconfig.xml and re-ran my application (servlet
> application) and I am not seeing that this file is being used.
>
> -Original Message-
> From: "Buchtík, Michal" [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 28, 2002 8:51 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: newbie needs help with relative address for image.
>
> Set the BaseDir in userconfig.xml
>
> Michal
>
> -Original Message-
> From: Troy Bottger [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 28, 2002 2:27 PM
> To: '[EMAIL PROTECTED]'
> Subject: newbie needs help with relative address for image.
>
> Everything in my XSL/FO is working perfectly except my images.  The address
> I am supplying is a relative address (that works if I use HTML), but does
> not
> work if I use XSL/FO to PDF.  I have read the archives, and I am not finding
> any solutions to this problem.  Can anyone tell me what I am doing wrong?
>
> 
>
> /companylogo/url gets translated into: abc\images\merchant_logo.gif
>
> If I use a full path, ie. (c:\xyz\htdocs\abc\images\mechant_logo.gif) it is
> fine.  It is just when I specify the relative address when I get:
> Error while creating area : Invalid Image URL - error on relative URL : no
> protocol: null/abc/images/merchant_logo.gif
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


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




RE: newbie needs help with relative address for image.

2002-01-28 Thread Troy Bottger

Does this work if I don't call it from a command line?  I have uncommented
the BaseDir in the userconfig.xml and re-ran my application (servlet
application) and I am not seeing that this file is being used.

-Original Message-
From: "Buchtík, Michal" [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 28, 2002 8:51 AM
To: '[EMAIL PROTECTED]'
Subject: RE: newbie needs help with relative address for image.


Set the BaseDir in userconfig.xml

Michal

-Original Message-
From: Troy Bottger [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 28, 2002 2:27 PM
To: '[EMAIL PROTECTED]'
Subject: newbie needs help with relative address for image.


Everything in my XSL/FO is working perfectly except my images.  The address
I am supplying is a relative address (that works if I use HTML), but does
not
work if I use XSL/FO to PDF.  I have read the archives, and I am not finding
any solutions to this problem.  Can anyone tell me what I am doing wrong?



/companylogo/url gets translated into: abc\images\merchant_logo.gif

If I use a full path, ie. (c:\xyz\htdocs\abc\images\mechant_logo.gif) it is
fine.  It is just when I specify the relative address when I get:
Error while creating area : Invalid Image URL - error on relative URL : no
protocol: null/abc/images/merchant_logo.gif



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

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

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




RE: newbie needs help with relative address for image.

2002-01-28 Thread "Buchtík, Michal"

Set the BaseDir in userconfig.xml

Michal

-Original Message-
From: Troy Bottger [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 28, 2002 2:27 PM
To: '[EMAIL PROTECTED]'
Subject: newbie needs help with relative address for image.


Everything in my XSL/FO is working perfectly except my images.  The address
I am supplying is a relative address (that works if I use HTML), but does
not
work if I use XSL/FO to PDF.  I have read the archives, and I am not finding
any solutions to this problem.  Can anyone tell me what I am doing wrong?



/companylogo/url gets translated into: abc\images\merchant_logo.gif

If I use a full path, ie. (c:\xyz\htdocs\abc\images\mechant_logo.gif) it is
fine.  It is just when I specify the relative address when I get:
Error while creating area : Invalid Image URL - error on relative URL : no
protocol: null/abc/images/merchant_logo.gif



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

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