[Zope] [possibly OT] html2pdf on zope
AM
list_subscriber@neurobs.com
Fri, 21 Mar 2003 10:18:45 -0800
The problem is that it works from the command line, the very same
command that is called in the popen in the script on the how-to.
Just that if I try to access it via a browser on windows thats what I get.
Try the following URL:
http://nbs.neuro-bs.com/index_html/html2pdf
TIA
AM
Bob Corriher wrote:
> When I use it on Linux (RedHat 8.2), I use the method in the how-to
> with no changes and haven't had any problems. I only saw the "file
> does not start with %PDF" problem on Windows. The popen2 call was
> returning a file in text mode instead of binary mode.
>
> Popen2 is documented here:
> http://www.python.org/doc/current/lib/module-popen2.html
>
> Looking at the documentation, it says that the default mode is 't'
> (text) , so perhaps the mode parameter is required for Linux also,
> although it works for me without it.
>
> Bob Corriher
> P-Wave Inc
>
>
> AM wrote:
>
>> But how do I get it to work on Linux then??
>> TIA
>> AM
>>
>> Bob Corriher wrote:
>>
>>>
>>> Hi Bo,
>>>
>>> My bad. I didn't mean that HTMLDoc wouldn't work on Linux, just that
>>> the 'b' parameter to popen2 probably isn't the problem, as it is the
>>> default in the Linux python library.
>>>
>>> I've had good success with HTMLDoc for most projects. I do use
>>> ReportLab for database type reports, but not where I already have
>>> HTML code generated as HTMLDoc does a much better job of that. It
>>> does not support CSS however, so I sometimes have to generate
>>> alternate HTML using the <FONT> tag and other "standard" HTML
>>> constructs.
>>>
>>> You're right about parsing with Reportlab. I originally started
>>> using HTMLDoc when some of our users began embedding HTML in content
>>> and it became more and more difficult to handle the tags in Reportlab.
>>>
>>> I'm not sure if Unicode will cause you a problem in HTMLDoc as I've
>>> not had to use it.
>>>
>>> Reportlab and HTMLDoc are the only PDF generation tools I've used
>>> and I don't know of any others.
>>>
>>> Bob Corriher
>>> P-Wave Inc.
>>>
>>>
>>> Bo M. Maryniuck wrote:
>>>
>>>> On Wednesday 19 March 2003 18:47, Bob Corriher wrote:
>>>>
>>>>
>>>>> If you're on Linux or Unix, this probably isn't the answer.
>>>>>
>>>>
>>>>
>>>> Have you good solution to use Unicode with it? I would not like to
>>>> start coding a parser with ReportLab. But if no solution, I will... :/
>>>>
>>>>
>>>>
>>>
>>
>
>
>
>
--
==================================================================
Aseem Mohanty
Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706
(R) 510 7696011 (M) 510 3014871 (O) 510 5279231
==================================================================
"I saw `cout' being shifted "Hello world" times to the left and
stopped right there!!" -- Steve Gonedes
==================================================================