Modify

Opened 11 years ago

Closed 11 years ago

#587 closed defect (fixed)

PDFs limited to 4kB on Win32

Reported by: martin@… Owned by: Alec Thomas
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 11 years ago by Alec Thomas

Resolution: invalid
Status: newclosed

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 11 years ago by Noah Kantrowitz

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

comment:3 Changed 11 years ago by Alec Thomas

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 11 years ago by Alec Thomas

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

comment:5 Changed 11 years ago by Alec Thomas

Resolution: invalid
Status: closedreopened

comment:6 Changed 11 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 11 years ago by Alec Thomas

Resolution: fixed
Status: reopenedclosed

(In [1280]) Fixes #587

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Alec Thomas.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.