Skip Menu |
 

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

Report information
The Basics
Id: 108987
Status: resolved
Priority: 0/
Queue: PDF-API2

People
Owner: Nobody in particular
Requestors: philperry [...] hvc.rr.com
Cc:
AdminCc:

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



Subject: problems running "examples" code
Date: Sun, 15 Nov 2015 18:39:18 -0500
To: bug-PDF-API2 [...] rt.cpan.org
From: Phil M Perry <philperry [...] hvc.rr.com>
Download (untitled) / with headers
text/plain 1.8k
I have found some apparent bugs in PDF::API2's code examples. PDF::API2 v2.025 Perl 5.20.2 Windows XP Severity: Normal 022_truefonts: runs for a few seconds and ends without producing any output file and no messages 022_truefonts_diacrits_utf8: runs for a few seconds and ends without producing any output file and no messages 023_cjkfonts: MyungJo fonts only, get several dozen "Use of uninitialized value in sprintf at 023_cjkfonts line 82." This is an apparently undefined value returned by $font->uniByCId($xo) in line 82 It is the line that formats the U+0xnnnn in the lower left of a cell, and it appears to be a block of characters on output page 57, where it's showing U+0x0000 for them (only a few dozen characters) 024_bmpfonts: get one message "file='' not existant. at .../Resource/Font/BdFont.pm line 169." This is in readBDF()'s if(! -e $file) {die "file='$file' not existant.";} where readBDF() is apparently being passed an empty or undefined string from somewhere "not existant" should be "does not exist", should anyone work on the code in this routine 025_unifonts: get one message "Malformed UTF-8 character (fatal) at 025_unifonts line 89, <DATA> line 1." It seems to be reading one of the font files in a list, and getting this error. No output is produced. This appears to be a regular expression substitution to remove CR and LF characters from the line just read in from the file. 027_winfont: runs for a few seconds and ends without producing any output file and no messages The following example files seem to have successfully run (produced PDF output which looked reasonable, and no error messages): 020_corefonts 021_synfonts 026_unifont2 030_colorspecs 031_color_hsv 032_separation I was not working in any other "examples" files, and didn't run any others.
Subject: [rt.cpan.org #108987]
Date: Tue, 26 Jan 2016 22:25:01 -0500
To: bug-PDF-API2 [...] rt.cpan.org
From: Phil M Perry <philperry [...] hvc.rr.com>
Download (untitled) / with headers
text/plain 1.8k
Some additional investigation: First, I ran the remaining examples -- The following example files seem to have successfully run (produced PDF output which looked reasonable, and no error messages): 012_pages 020_textrise 020_textunderline (updated for 98534 hspace->hscale) 040_annotation 060_transparency The following example files appear to have problems: 011_open_update: all three output files look the same, so it apparently is not updating the document before saving as new 050_pagelabels: all 26 pages are the same format (pages 0..25). From the code it appears that the displayed page numbers are supposed to reset on some pages, be formatted as Roman numerals, be formatted as letters, and get fixed prefixes (A- etc.) for various ranges Second, I went back and looked in the code for those earlier reported to be with problems, to see if there was anything hinting at what went wrong -- 022_truefonts, 022_truefonts_diacrits_utf8 both want one or more TTF fonts on the command line. However, no TTF names I tried helped matters (produced corrupted PDF files). Needs more investigation. 024_bmpfonts wants one BMP? BDF? font on the command line, but I don't think I have any for testing 027_winfont possibly the PDF::API2->enumwinfonts method is returning no fonts? The utter lack of comments in the example codes is very frustrating. I can only guess at what is wanted for input, and what is supposed to be produced. Was this ever documented anywhere? To add a comment to this thread, just email bug-PDF-API2 [at] rt.cpan.org with subject line [rt.cpan.org #108987]. Note 1 space between org and #, and the [ ] around the whole subject. Nothing else. If you don't follow this format carefully, you will end up creating a new bug report! HTML formatting within the body does not work.
Download (untitled) / with headers
text/plain 281b
The examples directory appears to have been used by a former maintainer for testing purposes. Since there wasn't any documentation to go with them, and since they're causing complaints, I've deleted them. If they're needed in the future, they can be restored from the repository.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.