Skip to content

Commit

Permalink
Run the rml2pdf script in the rml file folder.
Browse files Browse the repository at this point in the history
This allows you to use relative image path based 
on the folder which the rml file is located.
  • Loading branch information
projekt01 committed Aug 18, 2007
1 parent 60b98a7 commit ad74843
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/z3c/rml/rml2pdfscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ def goSubProcess(xmlInputName, outputFileName, testing=False):
program.append('testing=1')
program = " ".join(program)

# run the subprocess in the rml input file folder, this will make it easy
# to include images. If this doesn't fit, feel free to add a additional
# home argument, and let this be the default, ri
os.chdir(os.path.dirname(xmlInputName))

# start processing in a sub process, raise exception or return None
try:
p = subprocess.Popen(program, env=env, stdin=subprocess.PIPE,
Expand Down

0 comments on commit ad74843

Please sign in to comment.