Closed mdeweerd closed 2 years ago
I have been able to replicate this with the latest (official) release of PDF::Table, for both PDF::API2 and PDF::Builder. It doesn't happen with my current working copy of PDF::Table (code in-progress), so hopefully it can be fixed soon.
I see you are using corefont
with utf-8
encoding. You should be aware that only ttfont
can properly handle multibyte encodings; corefont, psfont, etc. must stick to single byte encodings. This applies to both PDF::API2 and PDF::Builder.
Thanks for the feedback regarding corefont - I haven't run into representation issues yet.
Happy to see that the testcase allowed you to reproduce the problem and confirm that it's apparently already fixed in your working copy ;-).
Hi @PhilterPaper - thanks for your work on this. I'm also seeing the same issue and I wondered whether you could share the fix you have, so that I can see whether it fixes my specific problem?
Unfortunately, it's an extensive rewrite of Table.pm (for the column width issue), so there isn't some little set of changes you could drop in to patch it. I was going to get extensive changes to PDF::Builder out of the way first, but if people are getting blocked by PDF::Table problems, I will have to consider finishing the column width fixes (and one or two other minor bugs) and pushing out PDF::Table first.
Thanks for the quick reply - much appreciated. Would some sponsorship help you to clear issues?
This appears to be fixed in the upcoming 1.003 release (out within a few days). Closing.
Brilliant, thanks @PhilterPaper - confirmed working. Thanks very much for fixing this long-standing problem of mine.
No problem! Although it did give me a scare to see a fresh entry in this bug report... I feared that maybe the fix had regressed during the build process. Much relieved to see it was only a "Thank You" (and You're Welcome!).
I got the following error, this is the test case (also shown further below): tc.zip. It looks like the table width is not computed correctly internally (the autoexpand value is lower than the width required to make it work).
The source code says "This should never happen"
PDF::Table
will indicate:This is the test case code in clear (same as attached zip):