The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Changes for version 3.026 - 2023-12-07

  • lib/PDF/Builder/Content/Text.pm, examples/Column.pl Add HTML "reversed" (boolean) to <ol> tag to count down instead of up (needs "start" value to make any sense).
    • I wanted to fix a few more minor problems with column(), including the color of the first text in a <li> overriding the marker color, a bunch of redundant font and color change commands and some other inefficiencies, and some other stuff. Unfortunately, that looks like a considerable rewrite of column(), and I ran out of runway, so I'll have to put it off to the next release.
  • lib/PDF/Builder/Content.pm Add some POD notes about the use of charspace for tracking adjustments, and the interaction with wordspace adjustments for a more balanced appearance of justified text.
  • devtools/ A collection of various utilities I use to build PDF::Builder (the CPAN package), as well as do the PHP conversion of HTML code for the web page display of documentation (see catskilltech.com). Note that buildDoc.pl (to build all the HTML files from POD) is already shipped with the package. Further note that tools/1_pc.pl (Perl Critic) will complain a LOT about the code in devtools/ ... maybe some day I'll get around to cleaning it up.
  • (many .pm files), META.yml, Makefile.PL, README.md, docs/buildDoc.pl, t/00-all-usable.t, tools/optional_update.pl, version Cleanup of POD so that unordered/bulleted lists, ordered/numbered lists, definition/description lists, and indented paragraphs are properly handled upon conversion to HTML. Change optional POD-to-HTML generation from the old pod2html to Pod::Simple::XHTML.
  • lib/PDF/Builder/Content.pm The linedash() method was not properly handling a restore of a saved dash pattern, resulting in PDF "dash pattern" values that could be unusable by a Reader.
  • lib/PDF/Builder.pm, lib/PDF/Builder/FontManager.pm, lib/PDF/Builder/Content/Text.pm, t/03-xrefstm-index.t Continuing Issue #197, clean up handling of newly-created PDF object in from_string() method (used by open() method). Also knock-on effects on some t-tests.
  • lib/PDF/Basic/PDF/Pages.pm Issue #203 a new page was being inserted in the wrong place. Thanks to Vadim Repin for finding a "one off" index error that's apparently been there for at least a decade, and the fix.
  • lib/PDF/Builder.pm, lib/PDF/Builder/Basic/PDF/File.pm Improve upon the Integrity Check, acknowledging that missing objects might be hidden in an object stream. The open() function was also sometimes seeing a class reference rather than a pure class, which has been fixed. See issue #196 and especially #197.
  • lib/PDF/Builder.pm, lib/PDF/Builder/Content.pm, examples/060_transparency, INFO/KNOWN_INCOMP, tools/1_pc.pl Remove ability to generate save() ("q") and restore() ("Q") while in a text object. If attempted in text, it is now a no-op with a one-time (per run) warning message reminding users to update their code NOT to attempt save and restore in text mode. This was prompted by PDF::TableX t-tests using text save and restore, which isn't permitted by the PDF definition. Updated one PDF::Builder example that (unnecessarily) did a save/restore in text mode. Thanks to Vadim Repin for troubleshooting this and determining the problem and fix. While in here, make the warning message that a request for 'Times' core font is changed to 'Times-Roman' a one-time (per run) output, rather than every time.
  • lib/PDF/Builder/Page.pm, INFO/DEPRECATED, t/deprecations-page.t Obsolete and deprecated methods get_mediabox(), get_cropbox(), get_bleedbox(), get_trimbox(), and get_artbox() have been removed. Please use the regular methods (in $pdf or $page) with no arguments, to retrieve the current box values.
  • lib/PDF/Builder/Resource/XObject/Image.pm, INFO/DEPRECATED Deprecate Image object methods width() and height() ability to SET the width and height of an image. This setting apparently has never worked properly, but in case someone is actually using it for some purpose, it has not been immediately removed. It is planned to be removed after October, 2025, unless someone shows that they are using it.
  • (most .pm files) Reformat POD to make navigation easier, including the listing of all user- accessible methods in a POD's Table of Contents at the top.
  • lib/PDF/Builder/Content.pm, lib/PDF/Resource/XObject/Form/Hybrid.pm, lib/PDF/Builder/Lite.pm, INFO/DEPRECATED, examples/021_psfonts, t/content-deprecated.t, t/deprecations.t Remove long-deprecated method and global variable "lead". Use "leading" instead, which is the correct typographical term. Although the "Lite" subpackage isn't really maintained, "textlead()" has been replaced by "textleading()".
  • lib/PDF/Builder/Basic/PDF/Array.pm, /lib/PDF/Builder/Basic/PDF/Objind.pm, INFO/DEPRECATED, t/deprecations.t Remove long-deprecated method "elementsof()" in favor of "elements()". Remove long-deprecated method "removeobj()" in favor of "remove_element()".
  • README.md, Makefile.PL, META.yml, META.json, lib/PDF/Builder.pm, examples/Column.pl Minimum Perl version changed from 5.24 to 5.26. Update list of expected end-of-service against various Perl versions.
  • lib/PDF/Builder/Content.pm Clarify description of "bogen()" method's "larger" and "reverse" options.
  • lib/PDF/Builder/Content.pm, lib/PDF/Builder/Content/Text.pm Implement 'align' option for text() left/center/right, l/c/r.
  • README.md, examples/020_textunderline Add pointer to README to online documentation, and clarify underline example (that first text is NOT underlined).
  • lib/PDF/Builder.pm Clarify documentation on page_labels() versus pageLabel(), add code to check differences in starting page index and form of options, in response to PDF::API2 Issue #61.
  • lib/PDF/Builder/Content/Text.pm A number of minor fixes: explicitly make paragraph <p> a block level, any pending margin-bottom at the end of a column (if ran out of input) should be accounted for in the returned $start_y.
  • INFO/ACKNOWLEDGE.md (new), README.md, MANIFEST Add acknowledgements and thanks.
  • lib/PDF/Builder/Basic/PDF/Filter/LZWDecode.pm Revert an earlier change that broke some filtering.
  • README.md Update to point to new PDF::Builder Home Page structure (on catskilltech.com).
  • t/info.t Add test of modified() method.
  • lib/PDF/Builder.pm Incorrect check on date format (missing last '). Reported by Johan Vromans against PDF::API2 #62. The _is_date() method has been updated to reflect a number of date/time formats found "in the wild", although the PDF documentation is a bit inconsistent over time, as well as ambiguous, so this may allow through some invalid formats.
  • lib/PDF/Builder.pm, examples/050_pagelabels Fix an incompatibility with PDF::API2 recent changes (page_labels method). Now starts page index (for page_labels) at 1 instead of 0, and warns if 0 page index (page number) is given for page_labels (per API2 ticket #61). The old pageLabel method, kept for compatibility, is unaffected. The example script has been updated to show both styles.
  • lib/PDF/Builder/Content/Text.pm Make paragraph() method compatible with PDF::API2's, i.e., $continue parameter is optional. It should make no difference in calls to paragraph whether there is a fourth parameter (continue) before the options. This incompatibility showed up in PDF::TableX t-tests.
  • lib/PDF/Builder/Docs.pm Full writeup of what's supported for markup input (Markdown, HTML).
  • tools/3_examples.pl, examples/020_corefonts, examples/021_synfonts, examples/023_cjkfonts Add -s flag to run a small subset of the lengthy test list for three of the examples, plus overall when running all examples.
  • lib/PDF/Builder/Page.pm, lib/PDF/Builder/Resource/CIDFont.pm Clean up some typos preventing synfont t-test from running.
  • lib/PDF/Builder.pm, lib/PDF/Builder/Resource/CIDFont.pm It has come to our attention (#193) that PDF Readers (Adobe Reader and a number of Third Party readers) do not properly handle the "Tw" operator with TrueType fonts. Other font types work as expected. This operator, set by the $text->wordspace(n) method, is ignored for TTF and OTF fonts ($pdf->ttfont()) because Tw works only for inputs in the stream where words are separated by ASCII spaces (x20). TrueType fonts, on the other hand, uses an input list of glyph IDs (4 digit hex numbers). Thus, there are never any ASCII spaces to detect and adjust their widths.
    • We have updated the TTF/OTF handling code to honor the Tw operator value and emulate its actions, even though a native PDF Reader does not. In order to match the effects of the Tw operator on other font types, only ASCII spaces (x20) in the original text strings are affected, and not other flavors of spaces. Finally, TextHS() and advancewidthHS() still do not handle charspace or wordspace settings (perhaps in the future).
  • lib/PDF/Builder/Content/Text.pm When linking to a page via Markdown or HTML (URL #p-x-y), the default zoom was 1 (100%) when given just the x and y coordinates on a page. This has been changed to leave the zoom factor unchanged by default (unless, of course, you choose to specify a zoom amount). Also, the thickness (height) of the horizontal rule defaulted to 1pt, which was a bit heavy in appearance. It has been changed to default to 0.5pt.
  • lib/PDF/Builder.pm GD image call was not working in some circumstances, due to image_gd() being called incorrectly. Reported and fixed by Hakon Hagland against PDF::API2 (#60).
  • lib/PDF/Builder/Resource/Font/Postscript.pm, lib/PDF/Builder/Docs.pm, examples/021_psfonts, t/font-type1.t Update Type 1 font (PS font) handling to allow T1 fonts (.t1 filetype, variant of .afm/.pfm). Also some new font paths to search on. Per request #194 from Red Hat packager (@ppisar).
  • IMPORTANT NOTICE ===== lib/PDF/Builder.pm, lib/PDF/Builder/Docs.pm, lib/PDF/Builder/Resource/Font/Postscript.pm Adobe has announced an end to support for Type 1 (Postscript/T1) fonts in its products. The announcement wordings are a bit vague, sometimes referring to "all products" and other times just to "authoring software". Presumably, Adobe PDF Readers (as well as Readers supplied by other parties) will continue to display PDFs with Type 1 fonts for quite some time, although this is by no means absolutely certain. Note that this does NOT mean that PDF::Builder or other Third Party authoring tools may not continue to support Type 1 fonts. This termination by Adobe of support of a now old and obsolete font format does not affect the use of PDF::Builder for authoring PDFs, nor is it binding on other non-Adobe readers and authoring tools. However, using Adobe products for editing of PDFs with Type 1 fonts, and possibly of displaying them, may soon no longer be possible. At any rate, users may want to consider starting to move away from Type 1 font usage (psfont), and switch to TTF/OTF (ttfont) or even core fonts (corefont), as it is unknown how long Type 1 Reader support will continue.

Modules

Facilitates the creation and modification of PDF files
Add annotations to a PDF
Various utilities and support routines
Corresponds to a PDF array. Inherits from PDF::Builder::Basic::PDF::Objind
A special form of PDF::Builder::Basic::PDF::String which holds the strings true or false
PDF Dictionaries and Streams. Inherits from PDF::Builder::Basic::PDF::Objind
Holds the trailers and cross-reference tables for a PDF file
Abstract superclass for PDF stream filters
compress and uncompress stream filters for ASCII-85
compress and uncompress stream filters for ASCII-Hex
compress and uncompress stream filters for Flate
compress and uncompress stream filters for Lempel-Ziv-Welch
compress and uncompress stream filters for Run-Length
Literal PDF Object. Inherits from PDF::Builder::Basic::PDF::Objind
Inherits from PDF::Builder::Basic::PDF::String and stores PDF names (things beginning with /)
PDF Null type object. This is a subclass of PDF::Builder::Basic::PDF::Objind and cannot be subclassed.
Numbers in PDF. Inherits from PDF::Builder::Basic::PDF::String
PDF indirect object reference. Also acts as an abstract superclass for all elements in a PDF file.
Represents a PDF page, inherits from PDF::Builder::Basic::PDF::Pages
a PDF pages hierarchical element. Inherits from PDF::Builder::Basic::PDF::Dict
PDF String type objects and superclass for simple objects that are basically stringlike (Number, Name, etc.)
Utility functions for PDF library
Methods for adding graphics and text to a PDF
Simple hyphenation capability
additional specialized text-related formatting methods. Inherits from PDF::Builder::Content
additional documentation for Builder module
Managing the font library for PDF::Builder
Lightweight PDF creation methods
matrix operations library
Add named destinations (views) to a PDF
Manage PDF outlines (a.k.a. bookmarks)
further Outline handling. Inherits from PDF::Builder::Outline
Methods to interact with individual pages
Base class for PDF resources. Inherit from PDF::Builder::Basic::PDF::Dict
Base class for font resources
Base class for CID fonts
Base class for CJK fonts
additional code support for TT font files. Inherits from PDF::Builder::Basic::PDF::Dict
Base class for PDF color spaces
colorspace handling for Device CMYK. Inherits from PDF::Builder::Resource::ColorSpace
base colorspace support for indexed color models. Inherits from PDF::Builder::Resource::ColorSpace
colorspace support for Device RGB. Inherits from PDF::Builder::Resource::ColorSpace::Indexed
colorspace support for "Web Safe" Device RGB colors. Inherits from PDF::Builder::Resource::ColorSpace::Indexed
Support for color space separations
translate color names into RGB settings
Graphics state dictionary support
some common support routines for font files. Inherits from PDF::Builder::Resource::BaseFont
Module for using bitmapped Fonts.
Module for using the 14 standard PDF built-in Fonts (plus 15 Windows Fonts).
font-specific information for Bank Gothic font (not standard PDF core)
font-specific information for regular Courier font
font-specific information for bold weight Courier font
font-specific information for bold weight + slanted Courier font
font-specific information for slanted Courier font
font-specific information for regular Georgia font (not standard PDF core)
font-specific information for bold weight Georgia font (not standard PDF core)
font-specific information for bold weight + italic Georgia font (not standard PDF core)
font-specific information for italic Georgia font (not standard PDF core)
font-specific information for regular Helvetica font. Metrics and glyph list from Arial typeface.
font-specific information for bold weight Helvetica font. Metrics and glyph list from Arial typeface.
font-specific information for bold weight + slanted Helvetica font. Metrics and glyph list from Arial font.
font-specific information for slanted Helvetica font. Metrics and glyph list from Arial font.
font-specific information for the Symbol font
font-specific information for bold weight Times font
font-specific information for bold weight + italic Times font
font-specific information for italic Times font
font-specific information for regular (roman) Times font
font-specific information for regular Trebuchet font (not standard PDF core)
font-specific information for bold-weight Trebuchet font (not standard PDF core)
font-specific information for bold weight + italic Trebuchet font (not standard PDF core)
font-specific information for italic Trebuchet font (not standard PDF core)
font-specific information for regular Verdana font (not standard PDF core)
font-specific information for bold weight Verdana font (not standard PDF core)
font-specific information for bold weight + italic Verdana font (not standard PDF core)
font-specific information for italic Verdana font (not standard PDF core)
font-specific information for WebDings symbol font (not standard PDF core)
font-specific information for WingDings symbol font (not standard PDF core)
font-specific information for Zapf Dingbats symbol font
support routines for using PostScript fonts. Inherits from PDF::Builder::Resource::Font
Module for creating temporary synthetic Fonts.
preparsed uniglyph.txt file information
list of standard paper sizes and their dimensions
support stub for patterns. Inherits from PDF::Builder::Resource
support stub for shading patterns. Inherits from PDF::Builder::Resource
Unicode Font Support
Base class for external objects
Base class for external form objects
Base class for one-dimensional barcodes
specific information for CodaBar bar codes. Inherits from PDF::Builder::Resource::XObject::Form::BarCode
Code 128 and EAN-128 barcode support
specific information for 3-of-9 bar codes. Inherits from PDF::Builder::Resource::XObject::Form::BarCode
specific information for EAN-13 bar codes. Inherits from PDF::Builder::Resource::XObject::Form::BarCode
specific information for interleaved 2-of-5 bar codes. Inherits from PDF::Builder::Resource::XObject::Form::BarCode
support routines for Forms. Inherits from PDF::Builder::Content, PDF::Builder::Content::Text, and PDF::Builder::Resource::XObject::Form
Base class for external raster image objects
support routines for Graphics Development image library. Inherits from PDF::Builder::Resource::XObject::Image
support routines for GIF image library. Inherits from PDF::Builder::Resource::XObject::Image
support routines for JPEG image library. Inherits from PDF::Builder::Resource::XObject::Image
support routines for PNG image library (using pure Perl code). Inherits from PDF::Builder::Resource::XObject::Image
support routines for PNG image library (using Image::PNG::Libpng). Inherits from PDF::Builder::Resource::XObject::Image
support routines for PNM (Portable aNy Map) image library. Inherits from PDF::Builder::Resource::XObject::Image
support routines for TIFF image library
support routines for TIFF image library (Graphics::TIFF enabled)
TIFF image support (Graphics::TIFF enabled)
support routines for finding line breakpoints with Unicode text
utility package for often-used methods across the package.
How the PDF should be displayed or printed