cpan PDF-Builder 3.020

latest releases: 3.026, 3.025, 3.024...
3 years ago

lib/PDF/Builder/Content-Outline-NamedDestination.pm, INFO/DEPRECATED
Rename previously deprecated names "spline" (to "qbspline") and "pdfile"
(to "pdf_file").

examples/042_links
Add some examples showing non-default positioning (fit) on
target PDF's page.

lib/PDF/Builder/Basic/PDF/File.pm
Extend cross-reference stream handling (read-in PDFs) to cover field
widths of 5, 6, or 7 bytes (40-, 48-, or 56-bit integers). Special case
of 8 byte (64-bit integer) where top 32 bits are all 0, is treated as
32-bit integer to avoid requiring a 64-bit Perl build just for unpacking
this field.

lib/PDF/Builder.pm, lib/PDF/Builder/Docs.pm
Per [RT 130722, RT 133131, et al.] get any /Version override (in /Catalog)
and update the read-in PDF version (beyond 1.4, even if the PDF header
still claims 1.4). This minimizes extraneous warnings about having to
bump up the PDF version from what is claimed in the header.

Cross-check parent/kids links, report orphaned objects, report objects
referenced but not defined, report missing Info and Root objects, etc.
The input PDF file or string is not changed, but at least it can give
you an idea of why an error occurs, or the resulting PDF does not work
correctly.

lib/PDF/Builder/Basic/PDF/File.pm, INFO/RoadMap
Per [RT 133131, Vadim Repin's fix], change Quad int unpack code from Q
to Q> to indicate "Big-Endian" byte order (MSB at left) for incoming data
field in a cross-reference stream. Apparently, with just Q, Perl will
assume the doubleword int is native format (for instance, Little-Endian
on an Intel chip).
Note: This is a PDF 1.5+ feature (cross-reference streams) and has

    no business being in a PDF 1.4 file (the original bug report).

Also add warning if imported file declared to be PDF 1.4 (or lower), as
cross-reference streams are a PDF 1.5 feature. Earlier fix had added
cross-reference stream support, but it really doesn't belong in PDF 1.4.

lib/PDF/Builder/Outline.pm, lib/PDF/Builder/Basic/PDF/Objind.pm
Per [RT 131657, Vadim Repin's fix] add weaken statements to eliminate
"Deep Recursion" error messages.

lib/PDF/Builder/Matrix.pm
Per latest changes to PDF::API2, some code cleanup in Matrix.pm (no
functional change except for adding some diagnostic carps).

lib/PDF/Builder.pm
Per [PR 139, by ppisar], replace some hard-coded checks for
Graphics::TIFF and Image::PNG::Libpng with calls to LA_GT() and LA_IPL().

docs/buildDoc.pl, lib/PDF/Builder/Basic/PDF.pm, MANIFEST
Add NAVIGATION LINKS section to go Up to parent(s), sideways to
Siblings, and Down to children. This enables you to get from any place
in the docs to any place else without (usually) having to go all the way
back up to index.html. PDF.pm added just for a place to put links (no
code).

lib/PDF/Builder.pm, INFO/RoadMap minor updates

lib/PDF/Builder.pm, README, INFO/LICENSE
Make license-related text more consistent, and attempt to clarify the
relationship between the LGPL 2.1 master license and the various other
licenses that some files are under, as well as the ability to
redistribute under a higher version of LGPL. ref [CTS 35]

Makefile.PL, t/author-critic.t, tools/1_pc.pl
Update to fix some perlcritic warnings, enable author-critic (not useful,
as tools/1_pc.pl does a better job of it). Suggested by 'carygravel',
but [PR 135] rejected, as 1_pc is a superset of author-critic function.
Can't change .perlcriticrc SEVERITY from 5 to 4, as the GitHub Actions
CI testing appears to be using it, leading to a lot of errors.

lib/PDF/Builder/Resource/XObject/Image/TIFF/File_GT.pm, t/tiff.t,
lib/PDF/Builder/Resource/XObject/Image/TIFF_GT.pm, Makefile.PL,
lib/PDF/Builder.pm, lib/PDF/Builder/Resource/XObject/Image/TIFF.pm,
Fix problem with reading colormap from TIFF [GH 133], by 'carygravel'.
Note that this requires upgrade of Graphics::TIFF from 6 to 7.

t/tiff.t upgrade so tests 10 and 11 are no longer always skipped. This
works only on a Linux system (definitely not on Windows), and makes use
of ImageMagick and Linux utilities 'convert' and 'tiffcp'. Graphics::TIFF
is needed for test 10, and test 9 (alpha layer) is still skipped. Thanks
to GitHub user 'carygravel' for the upgrade.

INFO/DEPRECATED add a couple long-deprecated items ("PDFStr" and
"PDFUtf") that were missing from this file.

INFO/RoadMap, lib/PDF/Builder/Docs.pm add discussion on why images
(especially JPEG) are sometimes rotated and/or flipped, and what can be
done about it.

t/fonts-synfont.t, t/fonts-ttf.t fix a couple paths to DejaVu fonts on
certain Linux boxes. From 'gregoa' at Debian Perl Group.

lib/PDF/Builder/Resource/XObject/Image/PNM.pm
Bi-level (1 bit per pixel) PNM/PBM image was not being handled
correctly if the row length (width) was not a multiple of 8. Not enough
data was copied over to the PDF. Continuation of [RT 132844].
Almost complete rewrite of PNM.pm to properly support all combinations
of comments in the header, and support "plain" (ASCII) image files
(P1..P3) and 16 bit samples for grayscale and RGB. Not yet supporting
multiple images per file, as I don't have any firm definition!

lib/PDF/Builder/Resource/XObject/Image/PNG_IPL.pm
Make use of the new 'split_alpha' call in new release 0.47 of
Image::PNG::Libpng (this version specified as minimum, for optional
library installation). This brings the speed for RGB and Gray scale
with Alpha channels up to reasonable levels, as the 'vec' call is no
longer called (4 or 8 times per pixel). Note that in contrast to
PDF::API2, both 8 and 16bps samples are supported, and Gray scale is
supported, at high speed; not just 8bps RGBA.

lib/PDF/Builder/Docs.pm, Makefile.PL, README, t/00-all-usable.t
PDF::Builder will (again) attempt to install or upgrade OPTIONAL
libraries (see README). Includes a warning in Makefile.PL not to be
unduly alarmed if an optional install should fail. The user is given
a choice of selecting none/all/specific optional libraries when
running Makefile.PL (default "all").

README add instructions for installing on pre-5.020 Perls, which may be
adaptable to other OS's and Perls. Note that there's no guarantee that
PDF::Builder will actually RUN on older Perls! (But you're welcome to
try.)

lib/PDF/Builder/Docs-Content.pm, lib/PDF/Builder/Content/Text.pm
Fix spelling errors/typos, per report by 'carygravel'.

lib/PDF/Builder/Resource/PaperSizes.pm
Fix a couple missized entries (B7 and jr-Legal), added a bunch more
sizes (mostly archaic American and British sizes): dbill, statement
(= student), half-letter (= student), old-paper, b-plus
(B+/Super-B/A3+/super-A3), arch-a, arch-b, arch-c, arch-d, arch-e,
arch-e1, pott, post, large-post, crown, large-crown, demy, small-demy,
medium, royal, small-royal, super-royal, imperial, a7, a8, a9, a10.

Note that some "standard" sizes, such as broadsheet and foolscap, seem
to have a different size specification depending on where you look. You
should check that the size used matches your actual paper supply, and to
either update PaperSizes.pm to match, or specify the MediaBox in points
instead of by name. This is probably a good idea with any unusual,
large, archaic, or special-order paper... you want to check what its
actual size is before going through a lot of expensive failed printing!

examples/HarfBuzz.pl, examples/resources/HarfBuzz_example.pdf
In the updated 3.019 example, note that the entire AdobeMingStd-Light.otf
font (ttfont call) appears to be embedded, rather than just the subset.
This resulted in 3.019 being about 8MB larger than 3.018's version! It may
be related to bug [RT 130041]. Use caution when embedding CJK fonts, even
when not using the cjkfont call, as at least some apparently don't subset.
I replaced the font with AdobeGothicStd-Light.otf, which appears to embed
just a subset of the font, greatly reducing the size of the PDF file.

Don't miss a new PDF-Builder release

NewReleases is sending notifications on new releases.