Skip Menu |

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

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

People
Owner: cnighs [...] cpan.org
Requestors: konrad [...] payplus.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.35
Fixed in: 0.36_04



Subject: qQ imbalance in Reuse.pm
Lars -- Thanks for PDF::Reuse it's a very nice piece of work ! I have been testing the .pdf output and when comverting .pdf files created by PDF::Reuse to .ps files via ghostscript, I received the following warnings: [konrad@kjhlt4 ME.941C]$ pdf2ps /home/konrad/prj/mag-media/ME/ME.941C/forms/ME941C/merged/ME941C1-46-2010-Q1.pdf **** Warning: File has imbalanced q/Q operators (too many q's) **** Warning: File has imbalanced q/Q operators (too many q's) **** Warning: File has imbalanced q/Q operators (too many q's) **** Warning: File has imbalanced q/Q operators (too many q's) **** Warning: File has imbalanced q/Q operators (too many q's) **** Warning: File has imbalanced q/Q operators (too many q's) **** Warning: File has imbalanced q/Q operators (too many q's) **** Warning: File has imbalanced q/Q operators (too many q's) **** This file had errors that were repaired or ignored. **** Please notify the author of the software that produced this **** file that it does not conform to Adobe's published PDF **** specification. I located the offending line of code and attached a .patch file for Reuse.pm to balance the qQ pair. I have installed PDF::Reuse version 0.35 and I am running on perl 5.5.8 on Linux i386 and on Windows( ActiveState Perl ). Thanks again ! PDF::Reuse is indespensible !! -- kjh
Subject: Reuse.pm.patch
--- Reuse~01.pm 2008-07-03 08:06:12.000000000 -0500 +++ Reuse.pm 2010-07-14 07:31:56.000000000 -0500 @@ -945,7 +945,7 @@ { $objNr++; $objekt[$objNr] = $pos; - $stream = "\nq\n1 0 0 1 $devX $devY cm\n/Xwq Do\nq\n"; + $stream = "\nq\n1 0 0 1 $devX $devY cm\n/Xwq Do\nQ\n"; # kjh fixed qQ imbal $langd = length($stream); $confuseObj = $objNr; $stream = "$objNr 0 obj<</Length $langd>>stream\n" . "$stream";
This patch has been applied to branch bugs/59359 in my github repo. Please test and verify that the problem is fixed. You may grab a zip'd copy of the module here: https://github.com/cnighswonger/PDF-Reuse/archive/bugs/59359.zip Please report back here if the problem is fixed, and I will include this fix in the next stable release.