Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert an Absolute Path to a Relative Path?

807589Jul 22 2008 — edited Jul 28 2008
If someone knows of a quick static method that I could call that does this.... I would be gratefull.

Heres the problem:
I'm using an XHTML Renderer to generate a PDF document, right now all is well, CSS shows up great - and everything is pretty.

However say I would like to use an tag such as: <img src="D:\Web\Images\background.jpg" />, the renderer doesnt work it through. I did some looking around, and apparently this renderer only takes relative paths.

So, I AM able to retrieve a default base path, but how am I to use this to convert my absolute path into a relative path?

Thanks in advance!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2008
Added on Jul 22 2008
7 comments
445 views