Modify

Opened 8 years ago

Closed 8 years ago

#587 closed defect (fixed)

PDFs limited to 4kB on Win32

Reported by: martin@… Owned by: 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 (0)

Change History (7)

comment:1 Changed 8 years ago by athomas

  • Resolution set to invalid
  • Status changed from new to closed

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.

comment:2 Changed 8 years ago by coderanger

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

comment:3 Changed 8 years ago 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?

comment:4 Changed 8 years ago by athomas

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

comment:5 Changed 8 years ago by athomas

  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:6 Changed 8 years ago by martin@…

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.

comment:7 Changed 8 years ago by athomas

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [1280]) Fixes #587

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.