Ticket #587 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

PDFs limited to 4kB on Win32

Reported by: martin@ebg13.at Assigned to: athomas
Priority: normal Component: PageToPdfPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

I use the trunk version of trac with Python 2.3.

I've managed to run PageToPdfPlugin on Windows.

All pdfs end exactly @ position 0x12a0 (4kb). The first 4kB are (in hexedit) excactly the same as generated with command line.

I assume this is an python error, but please help me with this.

Attachments

Change History

08/19/06 00:40:29 changed by athomas

  • status changed from new to closed.
  • resolution set to invalid.

I can't see how this could be a Python problem. I suspect it's more likely to be a web server configuration problem, but without more information I can't tell.

08/19/06 00:55:59 changed by coderanger

These kinds of things are usualy because of not working with the file in binary mode.

08/19/06 01:47:07 changed by athomas

Good point. Actually, I'm also open()ing the file then immediately unlinking it, relying on *NIX file ref count semantics. But perhaps this does not work correctly under Windows?

08/22/06 02:07:10 changed by athomas

I also found this (note the 4096), which could be the culprit.

08/22/06 02:07:22 changed by athomas

  • status changed from closed to reopened.
  • resolution deleted.

08/22/06 06:41:22 changed by martin@ebg13.at

I changed pagetopdf.py#27 to:

   out = open(pfilename,'rb').read()

Now it works for me.

Maybe cause was a \0 problem or something else.

09/19/06 08:03:30 changed by athomas

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [1280]) Fixes #587


Add/Change #587 (PDFs limited to 4kB on Win32)




Change Properties
Action