Using relative URIs/URLs is usually a good idea but you need to make sure the base URI/URL is set accordingly. This is done either through the configuration file ("base" setting) or through the setBaseURL() methods on FopFactory and FOUserAgent.
If you do userAgent.setBaseURL("file:///C:/Temp/") and use "file:g00000001.png", the effective URL is: file:///C:/Temp/g00000001.png If you don't set the base URL, then the base URL is usually the current directory of the application. If you're running FOP from the command-line interface it's the directory where the source file is found. On 16.04.2008 13:46:29 bonekrusher wrote: > > Hi, > > This might be a dumb question but I am trying to get an understanding of > best practices. > > I have an XSLT that creates my PDF. My <fo:external-graphic> @src path is > always going to be a relative path. e.g. src="file:g00000001.png". When > running XML - PDF I get "image not found". > > When I use XML-FO-PDF, I know my paths need to be relative to the FO file. > > This is my question. If doing XML-PDF where is my relative path? > > Thanks, > -- > View this message in context: > http://www.nabble.com/XML-to-PDF-%28embedded%29-images-paths-tp16721014p16721014.html > Sent from the FOP - Users mailing list archive at Nabble.com. > > Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]