[css2xslfo-support] Authenticated http download, or mis-read filename..
Brought to you by:
wdonne
From: Brad C. <bk...@mu...> - 2007-10-31 14:48:08
|
Hi, I am using CSSToFOPNew I need to convert html documents downloaded from a web server to PDF. It would be nice if I could pass userid and password, and specify basicauth when using CSSToFOPNew to download from a URL. But because that doesn't work, I currently use curl to grab the html document and feed it to CSSToFOPNew as stdin. That's been working well. But now I have an html document that includes some IMG tags, and those image downloads also require authentication. So I've had to switch to using wget in recursive mode, something like: wget -k -p --http-user=something --http-passwd=pass 'http://some.company.com/Customer/data/rating_py/load_quote?stylesheet=waybill.xsl"e_number=QCCR089421&orgid=ccr' -P /tmp/test -nH -nd -E That gets me a directory listing like: -rw-r--r-- 1 bkc bkc 15897 2007-10-31 10:39 945677310.gif -rw-r--r-- 1 bkc bkc 10024 2007-10-31 10:39 load_quote?stylesheet=waybill.xsl"e_number=QCCR089421&orgid=ccr.1.html So far so good, but now if I pass this file name to CSSToFOPNew, like css2fop /tmp/test/load_quote\?stylesheet=waybill.xsl\"e_number=QCCR089421\&orgid=ccr.1.html -pdf /tmp/y.pdf Then CSSToFOPNew actually reads from stdin, not from the file. I'm using the css2fop shell script, and it looks like $fop_exec_args isn't escaping the ? or & in the filename argument. I'm don't know enough about bash to say if that's the problem, but sh -xv shows this: + exec /usr/bin/java -classpath <classpath> be.re.css.CSSToFOPNew /tmp/test/load_quote?stylesheet=waybill.xsl"e_number=QCCR089421&orgid=ccr.1.html -pdf /tmp/y.pdf (I've replaced the real classpath with <classpath>) Is it obvious to anyone why CSSToFOPNew reads from stdin given the above command arguments? And how difficult would it be to add http authentication functionality to CSSToFOPNew? -- Brad Clements, bk...@mu... (315)268-1000 http://www.murkworks.com AOL-IM: BKClements |