See also INFO/Changes_2023 for earlier version 3 release logs. 3.028 2025-12-31 * = work in progress ==== New features lib/PDF/Builder/Content/Text.pm, examples/Column.pl The 'align' attribute has been added to the
HTML tag now supported, using Courier (fixed pitch font) at 85%
of font-size. This will reduce the number of warnings in the Column*
examples.
lib/PDF/Builder/Content/Text.pm, examples/Column.pl
Add checks for valid (supported) CSS property names. Clarify that the
warning message for the invalid tag is a test and is expected and
normal, and likewise the warnings for CSS properties 'snork' and 'snuck'
are tests that are expected and normal. Ref #235.
lib/PDF/Builder/Content/Text-Column_docs.pm
Additional length units for CSS values in column(). In addition to pt and
% of current font size; em (= font size), en (= 1/2 font size), ex (= 1/2
font size), in (inches), cm, mm, and px (assume 78dpi display) are added.
Negative values are now allowed, although negative margins are NOT yet
fully supported. Future plans are for 'ex' to use the actual font
x-height, if available, and for some way to specify the screen resolution
(dpi) for px.
lib/PDF/Builder/Content/Text.pm
For Markdown (md1), if extra blank lines between list items, Text::Markdown
produces paragraphs within list items. Suppress paragraphs within lists.
lib/PDF/Builder/Content/Text-Column_docs.pm
Reduce heading (h1..h6) top margins, and bottom margins by somewhat more,
to give a more balanced appearance and consume less vertical space.
h1 (200% font size) top/bottom margins 75%/75% -> 40%/30%
h2 (150% font size) top/bottom margins 100%/100% -> 54%/40%
h3 (115% font size) top/bottom margins 130%/130% -> 68%/51%
h4 (100% font size) top/bottom margins 150%/150% -> 82%/61%
h5 (85% font size) top/bottom margins 175%/175% -> 95%/71%
h6 (75% font size) top/bottom margins 200%/200% -> 106%/80%
These are the default values. You are free to change them in CSS if you
find a different balance more pleasing to you.
lib/PDF/Builder.pm, lib/PDF/Builder/Docs.pm, Version, Makefile.PL
Prepare for 3.028 release. Minimum Perl version remains at 5.28.
+------------------------------------------------------------------------------+
| C A U T I O N -- Cross reference work is not 100% complete. It does not |
| handle multiple-pass (for forward references) yet. We hope to have that |
| feature out to GitHub soon, and definitely in the following release |
| (3.029). Meanwhile, backwards references and fully-defined target texts are|
| properly handled (in a single pass). You should set the maximum number of |
| passes to 1 to prevent problems due to multiple passes in the current code.|
+------------------------------------------------------------------------------+
* lib/PDF/Builder.pm, lib/PDF/Builder/Content/Text.pm,
lib/PDF/Builder/Docs.pm, MANIFEST, examples/Column_xrefs.pl (new),
examples/Column_md_xrefs.pl (new), examples/README,
examples/examples.output, tools/3_examples.pl, INFO/SPONSORS
Add cross references to column() to add internal (within a document) and
external links to another document, both to a specific target point (by
id) or a physical page number or a named destination.
link title existing internal PDF link
"ePDF#pgno-x-y-zoom" new ext link to another PDF
"#pgno" new int link in doc, default fit
"ePDF#pgno" new ext link to another PDF
"url" existing link to browser URL (start with p://)
"id" or "#id" new (int or ext) link to doc by id
may have optional leading # *unless* the id
is all digits (numeric)
"##nameddest" new int link to a ND
"ePDF##nameddest" new ext link to ND in another doc
"ePDF" is a path (usually relative) to a PDF document.
For native Markdown, [link text](href string). As an *alternative*, the
new extended HTML tag may be given in either HTML or Markdown:
<_ref tgtid="href" title="link title" fit="fit info">
but also works, and is produced by Markdown links.
If no convenient HTML or Markdown tag is available with an id to link
to, a reference target extended HTML tag is provided:
<_reft id="unique id" title="optional link title fallback">.
As described below, any child text for a tag may contain {#idname} to
define an "id" for its parent Markdown tag.
Work sponsored by Amtivo Group. Future plans call for extension of this
functionality to generate Tables of Contents, Lists of Figures/Tables/
Equations, etc., indexes, glossaries, bibliographies, footnotes/chapter
notes/endnotes, etc.
This is an improvement over the existing method, because it
can also handle external PDF files and Named Destinations, and can
determine the page and location of the target (rather than requiring the
author to manually enter this information into the "href" field) using
multiple passes over the text source.
"link title" may be given in the tag's child text (before ). If
missing (empty or blank), use any link title given in the target, and if
that is also missing, use any target child text (such as a heading's
text). For HTML markup, title="link title text" may be given, to override
use of the tag's child text. In either HTML or Markdown, {^title text}
may optionally be given in the tag's child text.
"fit" is PDF target page fit, consisting of the type, followed by any
parameters. E.g., 'xyz,200,400,1.5' for a window on the page at 200,400
with 150% scale; or 'fit' to fit the entire page in the viewer. In HTML
markup, fit="fitv,200" attribute may be given. In either HTML or Markdown,
{%fitv,200} in the tag's child text (link text) may be given.
The Markdown specification permits an id to be defined in a heading
(#...) entry by appending {#id-name} to the heading text. Although
Text::Markdown does not natively support this, Builder has been extended
to look for such a substring, and to pull it out into an id= attribute.
It is further extended to look for such an id definition in any tag with
child text, such as , , , etc. Note that most HTML tags
can already explicitly receive an id= attribute, so this is intended
primarily for Markdown usage.
Markdown specifies a way to get an HTML title= attribute in links:
[link text](url hover-title-text) but at this time it does not seem to
be useful for PDF purposes, and is ignored. {#id-name} (to define an ID)
has been extended with additional fields such as %fit and ^title (e.g.,
{$myid}{%myfit}{^mytitle}) so that Markdown usage has all the
capabilities of HTML usage.
lib/PDF/Builder.pm, lib/PDF/Builder/Docs.pm,
lib/PDF/Builder/Content/Text.pm,
lib/PDF/Builder/Content/Column_docs.pm (new), MANIFEST
Move POD cocerning the use of column() and related routines to one place,
for easier reference and updating it.
lib/PDF/Builder/Resource/CIDFont.pm,
lib/PDF/Builder/Resource/CIDFont/TrueType-CJKFont.pm
Make a start at updating POD to try to document many font-related
utility routines, especially for TTFs (TrueType).
lib/PDF/Builder/Content.pm, lib/PDF/Builder/Content/Text.pm,
examples/ContentText.pl
The section()/paragraphs() method is updated to permit a negative
'pvgap' value. The |pvgap| value is still used to add additional vertical
space between paragraphs, but if negative, no space is added after the
last paragraph in the section(). The ContentText example is updated.
examples/Content.pl, examples/ContentText.pl
Update to change old-style -name options to 'name'.
META.json, META.yml, devtools/PDFBuild.pl
Add "provides" section to build description.
SECURITY.md (new), MANIFEST
Although, given its nature, it is unlikely that there are any potential
security vulnerabilities in PDF::Builder, all package providers and
maintainers have been asked to provide a standardized guide for
reporting suspected security-related problems.
lib/PDF/Builder.pm, lib/PDF/Builder/Resource/CIDFont/TrueType/FontFile.pm,
lib/PDF/Builder/FontManager.pm
Per PDF::API2 PR#92, contributed by Johan Vromans, add the ability to
pass in an already-existing TTF/OTF font object (Font::TTF::Font) to
ttfont() and font(). This is useful if you already have such an object,
such as already read-in as an embedded font or built on-the-fly, rather
than having to write out a TTF font file and read it back in via ttfont().
It is also expected to prove useful for future TTC (TrueType Collection)
support. The ability to register such a font object in FontManager
(object as a "file name") has been added.
lib/PDF/Builder.pm, lib/PDF/Builder/FontManager.pm,
lib/PDF/Builder/Content/Text.pm, examples/Column-Column_lists.pl
Fix inconsistency in no longer supporting the use of a preloaded font
before the column() call being used as the current body font. You may
* option 'font_info'=>'-ext-' says that user code has ALREADY loaded a
font (either by Builder primitives or through FontManager), and to use
that (font-family named '-external-) as the body font. If there is no
preloaded font, use the FontManager default (core Times-Roman).
* default (or option 'font_info'=>'-fm-') load the FontManager
default font (core Times-Roman) as the body font.
* option 'font_info'=>'face:style:weight:color' says to load as the
current font a 'face' KNOWN TO FontManager, with optional specification
of the style and weight (default both normal) and color (unchanged).
- style: 0/normal (default) = unitalicized, 1/italic = italicized
- weight: 0/normal (default) = normal weight, 1/bold = bold weight
- color: named color or gray value 0 to 1. defaults to current color
There are several ways of overriding the column() call's specified font
(whether set by default or via 'font_info').
* in the column() call, use option
'style'=>'body { font-family: face; font-style =... }' CSS to
override anything else.
* in Markdown or HTML source, add a