Skip Menu |

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

Report information
The Basics
Id: 118945
Status: resolved
Priority: 0/
Queue: PDF-Create

People
Owner: MANWAR [...] cpan.org
Requestors: andy [...] andybev.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.39
Fixed in: 1.40



Subject: Word spacing changes after calling block_text
Date: Thu, 24 Nov 2016 18:02:09 +0000
To: bug-PDF-Create [...] rt.cpan.org
From: Andrew Beverley <andy [...] andybev.com>
When calling block_text, it adjusts the word spacing of the paragraph if it's over multiple lines. The problem is that the word spacing is then set for future string prints, using several other string functions (e.g. stringl, stringc, stringr and printnl). These functions do not include a Tw parameters, so they use the one set by the previous block_text The overall effect is that several lines will be printed with default word spacing, then another word spacing will be used for the block, and then subsequent lines will use that new word spacing. This is particularly a problem if the block text is sometimes a single line and sometimes multiple lines, as the subsequent string lines then change in width. I'm not sure what the best fix is, but how about stringl etc have a new parameter for the word spacing, which is set to 0 (the default) if not specified?
Hi Andrew, Thanks for raising the issue. Can you please do me favour and send a small script that re-creates the issue? Best Regards, Mohammad S Anwar
Subject: Re: [rt.cpan.org #118945] Word spacing changes after calling block_text
Date: Thu, 24 Nov 2016 18:33:06 +0000
To: bug-PDF-Create [...] rt.cpan.org
From: Andrew Beverley <andy [...] andybev.com>
Thanks for the quick reply: Show quoted text
> Can you please do me favour and send a small script that re-creates > the issue?
No problem, please find attached. You will see that the last line has very wide spacing, even though it is printed with a standard stringl() as the first ones. Andy

Message body is not shown because sender requested not to inline it.

Hi Andy, Thanks for the sample script. It really helps debugging easy. I have now got a patch ready. I should be pushing it asap. Best Regards, Mohammad S Anwar
Subject: Re: [rt.cpan.org #118945] Word spacing changes after calling block_text
Date: Mon, 19 Dec 2016 20:03:40 +0000
To: bug-PDF-Create [...] rt.cpan.org
From: Andrew Beverley <andy [...] andybev.com>
Show quoted text
> I have now got a patch ready. I should be pushing it asap.
Brilliant, thanks.
Patched.
Resolved.