Skip Menu |

This queue is for tickets about the PDF-Reuse CPAN distribution.

Report information
The Basics
Id: 4105
Status: resolved
Priority: 0/
Queue: PDF-Reuse

People
Owner: Nobody in particular
Requestors: chrisp [...] bmcgaw.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Error when executing examples in PDF-Reuse
[root@localhost examples]# perl ex2_pl Wide character in syswrite at /usr/local/lib/perl5/site_perl/5.8.0/PDF/Reuse.pm line 268. I am running RedHAT 8.0 and perl 5.8. Thanks, Chris Pizzo
Hello Chris, Thank you for your error report. The error occurs when the program tries to write the very first lines of the PDF-document. The snippet of code looks like this: binmode UTFIL; $utrad = '%PDF-1.4' . "\n" . '%âãÏÓ' . "\n"; $pos = syswrite UTFIL, $utrad; It is the sentence with syswrite that fails. It looks like your system doesn't like to print the characters '%âãÏÓ'. They are put here in the beginning of the file to give a signal to e.g. file transfer programs that the document may contain binary data. You can find these characters in practically every PDF-document. It is almost a standard. Or your system refuses to write to the disc ? (the error message doesn't say anything about that). What directory or file does it try to write to ? I have not got Red Hat Linux, so I can't say why it doesn't work. Please send me the program ex2_pl (if you have changed it in some way) or something more so I can try to find a solution. I am sure these lines of code has run thousands of times in different environments without failing. It is very surprising. Best Regards Lars Lundberg elkelund@worldonline.se [guest - Tue Oct 14 15:44:51 2003]: Show quoted text
> [root@localhost examples]# perl ex2_pl > Wide character in syswrite at > /usr/local/lib/perl5/site_perl/5.8.0/PDF/Reuse.pm line 268. > > I am running RedHAT 8.0 and perl 5.8. > > Thanks, > Chris Pizzo
Hello Chris, You were perfectly correct. Now I have uploaded a new version (0.16) of PDF::Reuse, where I have put backslashes before the first special characters you put in the header of the PDF-files. I hope this will solve the problem, but I am a little worried about all other sentences with syswrite. In many of them there might be binary data. I haven't got Red Hat Linux, so I haven't been able to test and see how it works. Best Regards Lars Lundberg