Forum How do I...?

Add Background image for page in Java

Zoba
Hi,

i'm trying to add a .svg as an background image to a pdf. The relative img path is added in the css body (the css is inside the html file). This works if i use the prince cli or prince gui but not if i run a java program that tries to convert the html file to pdf via the .exe.

Switching from .svg to .png didn't work either. How do i add the background, so i works in my java program?
mikeday
The relative path will be resolved against the document base URL. If you are converting the document from a stream then it has no base URL. You can specify a base URL for the document using the SetBaseURL() method. Check the Prince output log for warning messages about missing images.
Zoba
Setting the BaseURL fixed the problem. Thanks!