Skip Menu |

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

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

People
Owner: cnighs [...] cpan.org
Requestors: jarom [...] jaromsmith.net
Cc:
AdminCc:

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



Subject: tiny bug (and fix) in PDF::Reuse 0.35
Date: Thu, 10 Apr 2014 17:37:10 -0600
To: bug-PDF-Reuse [...] rt.cpan.org
From: Jarom Smith <jarom [...] jaromsmith.net>
Hello: I've found and fixed what I believe is a bug in PDF::Reuse version 0.35. The use case is: text printed with a rotation (in my case, rotation = 90, but I don't know whether or not the problem exists for other rotations) has too much word spacing. I don't know how or where this extra word-spacing is being set (I didn't try to figure it out), but the fix for it was straightforward: I just added "0 Tw " to set the word spacing to zero for rotated text. Something like this jarom@serverpronto:/usr/local/lib/perl5/site_perl/5.18.1/PDF >diff -u -ibw Reuse.pm /usr/local/share/perl/5.10.1/PDF/Reuse.pm --- Reuse.pm 2014-04-10 17:32:04.000000000 -0600 +++ /usr/local/share/perl/5.10.1/PDF/Reuse.pm 2014-04-10 16:47:48.000000000 -0600 @@ -510,6 +510,7 @@ # . "/Gs0 gs\n" # reset graphic mode . "$Cos $Sin $negSin $Cos $xPos $yPos cm\n" # rotation/translation in the CM . "\nBT /$Font $fontSize Tf " + . "0 Tw " . "$x_align_offset 0 Td $encText Tj ET\n" # text @ 0,0 . "Q\n"; # close the stack frame } Hope that helps, and I hope this makes it into a future release of PDF::Reuse (if any), because if not my (locally-modified) copy will break when updated. Thanks! jarom smith tech go-to guy
This bug has been fixed in my github repo. Please download and verify that this fixes the problem you reported. Also, followup here with confirmation or further issues. After this fix has been verified, I will include it in the next stable release. A zip'd copy of the fixed code may be had here: https://github.com/cnighswonger/PDF-Reuse/archive/bugs/94624.zip
Subject: Re: [rt.cpan.org #94624] tiny bug (and fix) in PDF::Reuse 0.35
Date: Sat, 13 Dec 2014 20:09:32 -0700
To: bug-PDF-Reuse [...] rt.cpan.org
From: Jarom Smith <jarom [...] jaromsmith.net>
Hi Chris, thanks for taking a look at this. You know, it's the darnedest thing. I'm looking at the code that's currently installed on my machine(s) before applying your patch and a) my one-line change is not there, BUT b) the behavior is correct (i.e., there is no extra word-spacing between the letters) I added some debugging to verify that the rotation is still 90 (it is) and I also tried added back in my one-line fix to see if it changed the behavior (it didn't). So -- I don't know what to say. I suspect something may have changed elsewhere (maybe in some other library?) that "fixed" this problem. I haven't tried applying your patch but if your patch was just the one-liner I gave you, it appears to no longer be necessary. Sorry for the wild-goose chase! jarom smith simplificent.com Simply Magnificent Software Development On Mon, Dec 8, 2014 at 1:55 PM, Chris Nighswonger via RT < bug-PDF-Reuse@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=94624 > > > This bug has been fixed in my github repo. Please download and verify that > this fixes the problem you reported. Also, followup here with confirmation > or further issues. After this fix has been verified, I will include it in > the next stable release. A zip'd copy of the fixed code may be had here: > > https://github.com/cnighswonger/PDF-Reuse/archive/bugs/94624.zip >
Hi Jarom, On Sat Dec 13 22:09:46 2014, jarom@jaromsmith.net wrote: Show quoted text
> Hi Chris, thanks for taking a look at this. > > You know, it's the darnedest thing. I'm looking at the code that's > currently installed on my machine(s) before applying your patch and > > a) my one-line change is not there, BUT > b) the behavior is correct (i.e., there is no extra word-spacing between > the letters) > > > I added some debugging to verify that the rotation is still 90 (it is) and > I also tried added back in my one-line fix to see if it changed the > behavior (it didn't).
No problem! I like (I think) problems that fix themselves. :-) If you discover the issue crops up again, please feel free to open a new bug report for it. Thanks for taking interest in PDF::Reuse!