Changes for version 3.024 - 2022-09-12
- lib/PDF/Builder/Resource/CIDFont/TrueType/FontFile.pm "loca" table in TTF is optional, so to fix PDFAPI2#47, return from subsetByCId() method early if no such table. According to PDFAPI2#37, it may be necessary to instruct ttfont() to NOT subset the font. Also, it appears that 'glyf' table may be missing in some fonts, so add check. Doesn't blow up any more, but problem #47 persists even with this fix.
- t/info.t (new), t/version.t (new), MANIFEST, tools/2_t-tests.pl New t-tests per PDF::API2.
- All "options" whose name begins with a dash (hyphen) "-" may now be given without a dash. E.g., "-translate => [30,25]" may now be given as "translate => [30,25]", or "'translate' => [30,25]". This is in keeping with the new practices on PDF::API2. The old (dashed) names are still valid, although they may be deprecated in the future.
- lib/PDF/Builder/Content.pm advancewidth() adds alias text_width(), per PDF::API2 changes.
- lib/PDF/Builder/Content.pm Fix problems in position() and textpos() methods reported by J Vromans, where the returned X coordinate was incorrect after being set twice.
- lib/PDF/Builder.pm New interfaces added for metadata query and set.
- INFO/RoadMap Add thoughts on an Environments package
- lib/PDF/Builder.pm, INFO/KNOWN_INCOMPAT Various changes to keep compatibility with latest PDF::API2, although not all old methods are deprecated. Some methods are added, some are renamed (alternate names added), and some may have minor changes or extended functionality. See KNOWN_INCOMPAT for a description of these minor differences.
- lib/PDF/Builder.pm, lib/PDF/Builder/ViewerPreferences.pm (new), MANIFEST Per PDF::API2 change, split up function of $pdf->preferences into several easier-to-use methods: page_mode(), page_layout(), viewer_preferences(), open_action().
- lib/PDF/Builder/NamedDestination-Annotation.pm, t/named-destinations.t (new), MANIFEST, tools/2_t-tests.pl, examples/042_links Minor cleanup plus locations may now be given without leading dashes. 'link' is now alias for 'goto', 'file' is now alias for 'launch', 'url' is now alias for 'uri', and 'pdf_file' and 'pdfile' are now aliases for 'pdf' method names.
- lib/PDF/Builder/Dict.pm Fix doubled $class (per PDF::API2 fix).
- INFO/old/.travis.yml.HOLD Remove per PDF::API2 removal of .travis.yml
- lib/PDF/Builder/Content.pm For linejoin()/line_join() and linecap()/line_cap(), allow alpha strings ("miter" or "m", etc.) in addition to numeric values (0, etc.). For PDF::API2 compatibility, many alternate method names exist now, such as line_join() in addition to linejoin().
- lib/PDF/Builder/Resource/XObject/Form/BarCode.pm Some minor fixes to improve spacing between bars and labels when both -lmzn and -fnsz are set and the font size is larger than -lmzn. Per PDF::API2 change. The barcode() convenience function has not been implemented.
- lib/PDF/Builder.pm, t/gif.t, t/jpg.t, t/png.t Add convenience image() method to simplify use of image_jpeg(), image_tiff(), image_pnm(), image_png(), image_gif(), and image_gd(). This is for PDF::API2 compatibility, and the original methods are unchanged.
- lib/PDF/Builder.pm, t/font-ttf.t, font-type1.t Add convenience font() method to combine corefont(), ttfont(), psfont(), and bdfont(). This is for PDF::API2 compatibility, and the original methods are unchanged. Font search path changes: add font_path() and set_font_path() for base search paths for fonts. Rename addFontDirs() to add_to_font_path() (keeping the old name around). Note that, unlike corefont(), font() requires the exact name of a standard core font. Kerning defaults to "on" when using font(), unlike other font methods.
- lib/PDF/Builder/Page.pm, lib/PDF/Builder.pm Deprecate unneeded update() method. Per PDF::API2 changes.
- lib/PDF/Builder.pm Rename method end() to close(). close should be used for new work.
- lib/PDF/Builder.pm, t/deprecations.t, t/pdf.t, t/rt67767.t Rename method open_scalar() to from_string(). from_string() should be used for new work. This is for compatibility with PDF::API2 changes renaming open_scalar() to from_string(). Although open_scalar() should still be supported for some time, it is possible that it may be deprecated and removed in the future.
- lib/PDF/Builder.pm Permit the save(filename) method to be used as an alias for saveas(filename). This is for compatibility with PDF::API2 changes combining save() and saveas(). Note that this is NOT good interface design, to use 'save' for both purposes.
- lib/PDF/Builder.pm, lib/PDF/Builder/Lite.pm, t/annotate.t, t/barcode.t, t/bbox.t, t/circular-references.t, t/content.t, t/cs-webcolor.t, t/deprecations.t, t/extgstate.t, t/gd.t, t/gif.t, t/jpg.t, t/outlines.t, t/pdf.t, t/png.t, t/pnm.t, t/rt120450.t, t/rt67767.t, t/69503.t, t/text.t, t/tiff.t, t/viewer-preferences.t, examples/011_open_update, t/resources/test-rgba.png (new), MANIFEST pdf->stringify() renamed to pdf->to_string() (original still available). Also catch up on some new t-tests from API2.
- lib/PDF/Builder/Basic/PDF/File-Objind.pm Per RT131657 PDF::API2 fix, Suppress recursion warnings while releasing (destroying) PDF indirect objects, which can be highly-interconnected (reported by Leon Winter).
- lib/PDF/Builder.pm Revise RT41971 fix per PDF::API2 change for outlines (no functional change)
- lib/PDF/Resource/Font/SynFont.pm Code cleanup per PDF::API2. This includes a number of renamed options (old ones are still supported) and changed behavior for 'bold' if coming through alternate name synthetic_font(). Read the documentation for synfont/synthetic_font to ensure that you won't be tripped up by any changes, or differences between the two.
- lib/PDF/Builder.pm per PDF::API2 fix, messages if fail to open input PDF
- CONTRIBUTING minor update
- docs/buildDoc.pl update to better handle non-PDF::Builder doc builds
- Makefile.PL, META.json, META.yml, README.md Perl 5.24 is the earliest supported version.
- README.md add manual build section
- t/tiff.t add exclude_version() function to exclude GhostScript or ImageMagick from all or selected uses, if your installed version falls with a range of excluded version numbers. This is to fix a problem where certain GhostScript versions were built with a bad library. Currently, the bad builds are believed to be limited to GhostScript 9.56.0 and 9.56.1. If you have this version, two of the tests in tiff.t (13 and 16, lzw+horizontal predictor, not converted to flate) will be skipped with "GhostScript not found".
- META.json, META.yml, MANIFEST add "provides" entry to make package sites happier.
- INFO/RoadMap add comments on PCF-format bitmapped fonts, and possible MathJax-based eqn support.
- INFO/LICENSE, MANIFEST License moved up to top level, to make package sites happier.
- examples/HarfBuzz.pl, examples/resources/HarfBuzz_example.pdf Add 'fj' and 'ij' ligatures, although Times doesn't appear to include them.
- examples/020_textrise add baselines and additional examples
- lib/PDF/Builder/Docs.pm, examples/HarfBuzz.pl Adobe Acrobat DC has changed its installed fonts location, so several non-Latin entries had to be updated.
- lib/PDF/Builder/Resource/CIDFont.pm Per PDF::API2 code style changes and uninitialized variable fix.
- INFO/Changes_2021, MANIFEST, README.md, lib/PDF/Builder.pm, INFO/LICENSE 2022 copyright.
- lib/PDF/Builder/Annotation.pm, t/annotate.t, examples/040_annotation, examples/041_annot_fileattach, examples/042_links Annotations revert to "no border" [#176] to match up with PDF::API2 behavior.
- lib/PDF/Builder.pm per #171, allow blank or prefix-only page label (on Reader's thumb slider) with -style => 'nocounter'.
- lib/PDF/Builder/Basic/PDF/File.pm Per RT 136648, PDF::API2 fix when writing xref streams. Note that while there is no longer an error message (fixed some time ago in PDF::Builder), there is still some new material (an XRef stream) added at the end of the PDF, at each save (for both PDF::API2 and PDF::Builder). Something still needs to be done about this, some time later.
- lib/PDF/Builder/Resource/XObject/Image/GD-GIF-JPEG-PNG-PNM-TIFF.pm Add -name option to name the image object if desired. In sync with PDF::API2, add -compress option for PNM.
- lib/PDF/Builder/Resource/XObject/Image/GIF-PNM.pm minor changes to sync with PDF::API2 changes.
- examples/HarfBuzz.pl, examples/resources/HarfBuzz_example.pdf show a better Chinese (CJK) example in vertical mode, which demonstrates rotation of punctuation such as ( ). Continuation of #144.
- INFO/RoadMap comments on page labeling (slider thumb) enhancements per #171, including possibly integrating with header() and footer() calls that place a page number on the paper, and any outline/bookmarks, so that they all give a consistent page label (number).
- optional_update.pl, MANIFEST, README.md optional_update moved to tools/, otherwise it was being placed in the PDF/ directory by the installer. Note that you should be in your PDF::Builder root (parent of tools/) and run tools/optional_update.pl.
- (see INFO/Changes_2021 for earlier changes) (see INFO/Changes-ver_2 for changes to PDF::API2 up through 2.034)
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
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
TrueType font support
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
Adobe Color Table support
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 int 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
TIFF image support
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
Examples
- INFO/old/examples.bat
- examples/011_open_update
- examples/012_pages
- examples/020_corefonts
- examples/020_textrise
- examples/020_textunderline
- examples/021_psfonts
- examples/021_synfonts
- examples/022_truefonts
- examples/022_truefonts_diacrits_utf8
- examples/023_cjkfonts
- examples/024_bdffonts
- examples/025_unifonts
- examples/026_unifont2
- examples/030_colorspecs
- examples/031_color_hsv
- examples/032_separation
- examples/040_annotation
- examples/041_annot_fileattach
- examples/042_links
- examples/050_pagelabels
- examples/055_outlines
- examples/060_transparency
- examples/BarCode.pl
- examples/Boxes.pl
- examples/Bspline.pl
- examples/Content.pl
- examples/ContentText.pl
- examples/HarfBuzz.pl
- examples/README
- examples/RMtutorial.pl
- examples/Rotated.pl
- examples/ShowFont.pl
- examples/Windows/027_winfont
- examples/examples.output
- examples/resources/HarfBuzz_example.pdf
- examples/resources/aptfrontview.jpg
- examples/resources/pod2htmd.temp
- examples/resources/sample.txt
- examples/resources/sample_55.pdf