I'm sorry for my silence in this discussion, I wish if my silence made your work for pdftocairo.
On Fri, 20 Aug 2010 09:42:43 +0200 Stefan Thomas <[email protected]> wrote: >>> "pdftocairo -ps http://m.je/test.pdf" will try to create http://m.je/test.ps >> I agree that 99% of such commands are accidentally executed >> by the mistakes and fail simply, because the http servers are >> not configured as WebDAV servers. However, if the full pathname >> should be reflected to the output, it is reasonable for curl >> library users to try to write the output on the remote servers. > >curl is only used for input. pdftocairo outputs using fopen which >doesn't support WebDAV. Or any URLs for that matter. So what it does is >it looks for a subdirectory in the current folder called "http:" and >then fails. Thanks, I had overlooked that curl is used by poppler library, and no poppler-utils depend on curl directly. In addition, the curl dependency is optional (even if curl is available, it is required for developers to specify configuration switch explicitly). Now I understand that the asymmetry between input and output is not avoidable. >Failure is not good default behavior. Indeed. But I think failure is acceptable as far as it's easy to understand why (aslike "rm foo" returns an error when foo is a directory). >>> 2. Adrian's way: Create outRoot from input filename. [...] >> I vote to this way. > >Ok, I tend to agree. But I am looking for input on how to make it >robust? Perhaps looking for "://" and falling back to "cairoout" in that >case would work. The dot-suffix cutoff does work reasonably well for >local files. I agree with Adrian's post "do aslike wget". Or, I don't mind if pdftocairo does not accept an URL as the input. Regards, mpsuzuki _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
