Hello,
I know it it possible to use "-" to send the input file via stdin to prince.
This is done with following python code :
p = Popen(["prince "-","out.pdf], stdin=PIPE)
p.stdin.write(code.encode('utf-8')) # code is a string with HTML data
..
But i would like to stream my CSS-data also via stdin.
I've comme up with following python code :
p = Popen(["prince","-s","-","-","out.pdf"], stdin=PIPE)
p.stdin.write(stylesheet) # stylesheet is a string with CSS data
p.stdin.write(code.encode('utf-8')) # code is a string with HTML data
When i run this i get following error :
prince: loading style sheet: -
prince: debug: error loading resource: can't open input file: No such file or directory
prince: -: warning: can't open input file: No such file or directory
Must i conclude that the '-' argument only counts for a prince input file.
And cannot be used with a -s option.
Or i am doing something wrong ?
I know it it possible to use "-" to send the input file via stdin to prince.
This is done with following python code :
p = Popen(["prince "-","out.pdf], stdin=PIPE)
p.stdin.write(code.encode('utf-8')) # code is a string with HTML data
..
But i would like to stream my CSS-data also via stdin.
I've comme up with following python code :
p = Popen(["prince","-s","-","-","out.pdf"], stdin=PIPE)
p.stdin.write(stylesheet) # stylesheet is a string with CSS data
p.stdin.write(code.encode('utf-8')) # code is a string with HTML data
When i run this i get following error :
prince: loading style sheet: -
prince: debug: error loading resource: can't open input file: No such file or directory
prince: -: warning: can't open input file: No such file or directory
Must i conclude that the '-' argument only counts for a prince input file.
And cannot be used with a -s option.
Or i am doing something wrong ?