See also INFO/Changes-ver_2 for changes released for PDF::API2, and
incorporated into PDF::Builder.
See also INFO/Changes_2018 for earlier version 3 release logs.
3.015 2019-05-19
The keepers of CPAN declined to re-index PDF::Builder 3.014, which had many
reported problems with its load, so I'll kick out 3.015 earlier than I
normally would. Hopefully, with a good load, "Testers" will show passed/
failed/other on the Meta page, and PDF::Builder will show up in the
reverse dependencies of other products.
Perl 5.18 now required minimum level.
lib/PDF/Builder.pm, lib/PDF/Builder/Page.pm-Docs.pm [ref CTS 2] allow
User Unit specification for PDF (globally) and page. This permits (with
suitable Readers) document sizes in excess of 200 inches.
lib/PDF/Builder.pm, lib/PDF/Builder/Page.pm-Docs.pm [ref CTS 2] clean up
and extend documentation on "box" methods. Allow -orient option on "box"
methods to name a page's media, but present in Landscape orientation.
Default Media Box of US Letter (8.5in x 11in).
lib/PDF/Builder.pm [ref RT 117184] in open(), if read-in PDF is missing an
EOL after the final %%EOF, add one so that material added after isn't
run-on in comment (most readers can handle this, but better to be clear).
lib/PDF/Builder/Basic/PDF/File.pm [ref RT 117184] an empty xref (0 0) is
now allowed to go through without tripping the fatal Malformed message. I
don't think it's legal PDF, but Acrobat Reader passes it without comment,
so I'll let it go (still may produce warning messages). Late add of
'hybrid.pdf' to RT 117184 has a number of problems reported as warnings
in PDF::Builder (Acrobat Reader is silent on them), but seems to produce
an acceptable PDF.
Also don't add an EOL after overwriting the PDF version -- there should
already be one there. Finally, there doesn't seem to be any point in
explicitly handling a "run-on" header comment as described in RT 117210,
as we merely copy the old file to the output (with version updated if
necessary). If any Readers have trouble with such and need the comment
stripped out, it might be done (1. don't change object offsets, and 2.
put the new comment AFTER any binary comment).
lib/PDF/Builder/Basic/PDF/Pages.pm [ref CTS 3] remove rebuild_tree() for
now, as it has never been properly implemented.
Add some comments to CONTRIBUTING pointing to the Software Development Kit.
3.014 2019-04-26
MANIFEST, tools/*.pl move four developmental test .pl files from root into
new tools directory. They were not intended to be installed into the
Perl lib/PDF/ production directory, but for some reason that's where they
were ending up. This change should keep them out of lib/PDF/ when
installed via CPAN and the like.
lib/PDF/Builder/Basic/PDF/File.pm [ref RT 117184] fix contributed by
Vadim Repin to allow PDF::Builder to write out a cross reference stream,
if one was read in with an existing PDF (forcing a PDF 1.5 output level).
This does not (yet) create an XRef stream from scratch.
lib/PDF/Builder.pm, lib/PDF/Builder/Docs.pm update documentation for save(),
saveas(), and stringify() to reinforce that the $pdf object is unusable
after calling these methods.
lib/PDF/Builder/Resource/CIDFont/TrueType/FontFile.pm [ref RT 128674]
rewrite CMap handling, with contributions by Alfred Reibenschuh
(original PDF::API2 author) and Bob Hallissy (TTF::Font author).
Only attempt to use the original four .cmap files, and now only if
-usecmf flag set to 1. Otherwise -cmaps flag can set a list of
Platform/Encoding pairs in priority order to look for a match in the
font's internal cmap tables, or use the default set, or force a
lookup with the find_ms() method. In all cases, either one list can
be given, and will be used for both Windows and non-Windows platforms,
or two lists can be given, separated by a semicolon, with the first
one being for a Windows platform and the second for non-Windows.
A debug flag -debug may be set to 1 to show various diagnostic
information while processing the CMap/.cmap section. Now the default
processing is to use the default list of internal cmaps, and if no
match is found, call find_ms(), and as a last resort, if there is
a .cmap file found, use that. To emulate the old CID mapping, set
-usecmf=>1 and -cmaps=>'find_ms'.
Various random documentation updates made, particularly regarding the
use of "core" fonts, and recommending using TTF/OTF instead.
Have not yet found a good data source to generate updated .cmap files
for FontFile's use -- still TBD. Could not generate a generic
"Adobe:Identity" .cmap file. The ticket is being held open for now as
a reminder to deal with .cmap updates.
lib/PDF/Builder/Resource/CIDFont/CJKFont.pm notes added as to why
FontFile changes not made here (.data and .cmap files are required,
no searching of internal cmaps).
lib/PDF/Builder/Basic/PDF/File.pm-Objind.pm-Pages.pm [ref RT 121911]
fixes contributed by Vadim Repin to deal with the failure of adding new
pages to an existing document. This apparently had something to do with
circular references, improper 'realise' of objects, and other things.
There were three other issues raised in this ticket: rebuild_tree
didn't work (already dealt with in PDF::Builder), a useless line of
code (already removed from PDF::API2 and PDF::Builder), and LZWDecode/
FlateDecode optimizations (maybe look at again later).
lib/PDF/Builder.pm, lib/PDF/Builder/Docs.pm add documentation (POD)
explaining how the interaction between text objects and graphics objects
may result in (apparently wrong) unexpected order of output (rendering
order).
lib/PDF/Builder/Content.pm-Docs.pm, examples/Content.pl further
explanation (mostly POD) on text and graphics object interactions, and
especially the effect on clipping, particularly of text glyphs.
examples/022_truefonts add a flag --full (or -f) to force 65536 characters
to be output, rather than whatever the count of CIDs is reported in the
font. This may be useful for seeing all the defined glyphs if there are
gaps in the CID sequence.
Makefile.PL, README, lib/PDF/Builder/Docs.pm
Move "optional" libraries (modules), currently Graphics::TIFF and
Image::PNG::Libpng, to new "recommends" section in Makefile.PL. Your
installer MAY attempt to automatically install these as prerequisites.
If it does, and fails, no need to panic: they aren't vital to the
operation of PDF::Builder, and should NOT cause an overall installation
failure! You are free to remove these optional libraries from your Perl
installation if you do not plan to use them. More information is in
PDF::Builder::Docs. PDF::Builder is now expected to show up in CPAN's
listing of "Reverse dependencies" for these libraries.
lib/PDF/Builder/Resource/Font/SynFont.pm, lib/PDF/Builder/Docs.pm,
lib/PDF/Builder.pm, DEPRECATED, examples/021_synfonts, examples/README,
examples/example.output
Deprecate -slant option, replacing by -condense, for the option to
condense or expand character widths in a synthetic font. Expand and
clarify documentation. 021_synfonts add a page of text showing all the
options in use together, and command-line type. There is still much to be
done to make synthetic fonts completely usable, and I am exploring some
alternatives.
Fonts are limited to single byte encoding (you may wish to select an
alternate plane as a font and run that through synfont()). A major
problem I have not been able to solve is the expansion of Latin alphabet
ligatures to multiletter capital strings (e.g., ffi to F+F+I) for
small-caps usage, as well as small-caps for things like "long s" which
are not in the base plane, because the ASCII letters do not appear to be
available in other planes.
lib/PDF/Builder/Basic/PDF/File.pm
[ref RT 106020 and RT 117210] add some tolerance for out-of-spec PDF
files. Initially this is permitting a comment between the PDF version
number in the header and the EOL, and extra whitespace in the cross
reference listing and some other wigglies (e.g., starting object 1, not
0, 0 entries per subsection, lots of warnings). These files don't
strictly meet the PDF formatting spec, but many readers seem to tolerate
them (fix them up), so PDF::Builder should, too. Note that PDF::Builder
already is happy to read a Mac-style PDF using only CR for an EOL (one
byte, not the required two).
There is one more that I haven't added yet: there are reports of
sightings "in the wild" (e.g., RT 106020) of a PDF version header
followed by a comment followed by the first object (n 0 obj) before
encountering the first $cr. If I can come up with or obtain a "working"
PDF like this, I will look into adding tolerance code for it.
For future consideration: save header comments (in-line and after header)
for output at overall header. Should coordinate with being able to
specify a header comment (in .pl code) and possibly comments within
objects. Other out-of-spec conditions that most readers tolerate will be
added over time.
CONTRIBUTING, MANIFEST
Add file (at CPAN's request) suggesting how best to contribute to
the project.
examples/025_unifonts, 3_examples.pl, INFO/old/examples.bat
The data used by 025_unifonts (attached PDF-J document) is encoded in
SJIS. This is invalid UTF-8 and caused the script to blow up. The fix is
to inform Perl that the DATA being read is SJIS, so it can be encoded on
the fly to UTF-8.
INFO/Changes_2018, Changes, MANIFEST, lib/PDF/Builder.pm, README
2019 copyright, archive 2018 changes.
(see INFO/Changes_2018 for earlier changes)
(see INFO/Changes-ver_2 for changes to PDF::API2 up through 2.033)