-
Notifications
You must be signed in to change notification settings - Fork 7
/
Changes
236 lines (200 loc) · 12.7 KB
/
Changes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
See also INFO/Changes_2023 for earlier version 3 release logs.
3.027 2024-07-13 UNRELEASED
* = work in progress
==== New features
lib/PDF/Builder.pm, lib/PDF/Builder/Resource/XObject/Image/SVG.pm (new),
lib/PDF/Builder/Content.pm, Makefile.PL, README.md, INFO/ACKNOWLEDGE.md,
tools/optional_update.pl, t/svg.t (new), t/00-all-usable.t, META.yml,
tools/2_t-tests.pl, devtools/PDFbuild.pl, MANIFEST, version,
examples/SVG.pl (new), examples/resources/SVG/ATS_flow-GIFfilein-
GPscatter5-MJdisplayNoTag-QRcode.svg (new), examples/README,
examples/examples.output, tools/3_examples.pl
Add code to support via SVGPDF (package by Johan Vromans) SVG images with
image_svg() method. In the near future, plans are to add MathJax markup,
GNUplot interfaces, and enhanced barcode support; all of which make use
of SVG.
lib/PDF/Builder/Content/Text.pm, lib/PDF/Builder/Docs.pm,
lib/PDF/Builder/Content.pm, MANIFEST, README.md, tools/3_examples.pl,
examples/Column.pl, examples/Column_lists.pl (new), devtools/PDFbuild.pl
Rearchitect list (ul and ol) generation to improve appearance and permit
upgrades to capabilities. Add <_marker> tag to permit overrides of
properties of individual <ol> and <ul> markers (e.g., bullet color) at
any or all <li>. This non-standard HTML tag can be used explicitly to
modify marker properties, and is automatically inserted into the code if
not manually given. The new (non-standard) CSS properties and defaults
and examples are
_marker-text (define text to use as marker, rather than default)
'' (no change) for ol, ul; "=>" instead of a bullet
_marker-color (change color from default)
'' (no change) for ol, ul; "blue' instead of normal text black
_marker-font (change marker font-family)
'' (no change) for ol, ZapfDingbats for ul; "sans-serif" for
different ol marker font
_marker-style (change marker font-style, e.g., italic)
'' (no change) for ol, ul; "italic" to italicize a marker
_marker-size (change marker font-size)
'' (no change) for ol, 50% for ul; "80%" for slightly reduced size
_marker-weight (change marker font-weight)
'bold' for ol, ul; "normal" if don't want bold markers
The defaults are the normal font-family, color, etc. inherited from
the <ol> or <ul> tag, updated by the usual suspects (style, CSS, etc.),
and finally overridden by _marker-* properties (inherited and set in the
usual manner). If you nest lists, you may need to cancel _marker-*
properties by setting them to ''. Note that if you set something like the
"color" property in the <ol> or <ul> tag, it will *also* apply to each
<li> list item! Instead, set "_marker-color" to affect only markers.
Split out list examples from Column.pl examples, into Column_lists.pl.
lib/PDF/Builder/Content/Text.pm, examples/Column.pl
* CSS text-align property for left, center, and right added. Also implement
<_move> tag: "x" attribute absolute positioning within column and/or
"dx" attribute relative positioning. If $x is undefined, assume is at 0.
lib/PDF/Builder/Basic/PDF/File.pm
Per PDF::API2 commit 308e70f, die (crash) with message instead of
freezing up if a malformed PDF trailer's Prev keys result in a loop
or if multiple trailers use the same object ID and generation number.
lib/PDF/Builder.pm, lib/PDF/Builder/Basic/PDF/File.pm,
lib/PDF/Builder/Content/Text.pm, lib/PDF/Builder/Content.pm, version,
Makefile.PL, tools/optional_update.pl, docs/buildDoc.pl,
t/00-all-usable.t, t/tiff.t, t/version.t, tools/2_t-tests.pl
Fix "require" of external libraries so oddly formatted VERSION numbers
don't derail PDF::Builder loading. Builder was blowing up when
Image::PNG::Libpng went to version 0.57_01 (development version)
for a while. Use version->parse("string")->numify() to create a uniform
numeric version value for comparison (against a mininum). Also add
SVGPDF version. Because of the conflict between the package 'version'
and the function 'version()', change the function name to pdf_version().
Note that minimum levels must be proper integer or real numbers, and
cannot have any underscores, dashes, or multiple decimal points! To do
so would require quotes around the value so it is treated as a string.
examples/020_corefonts
Clean up code to permit any of three command lines: (nothing) -- default
list of all core fonts, (-s) -- 3 sample core fonts, (list of names) --
specified names (e.g., you need a quick list of what's in Zapf Dingbats
and Wingdings).
lib/PDF/Builder/Content/Text.pm
Minor change to font size upon entry: first it is defaulted to 12pt. The
next step of overriding that setting with the text object's fontsize has
been removed, as this often produced unexpected results. Finally, the
third step is to use the 'font_size' optional value, if given.
lib/PDF/Builder/Content/Text.pm, examples/Column.pl
Fold all HTML tags to lower case (to support <P> etc.), detect
unsupported or invalid tags and give error message (just once for each,
per column() call). Treat unknown tags as <span> tag. In Column.pl,
A few tags are now upper case (are accepted), and some bogus tags (expect
an error message) and bogus CSS entries (ignored) in one sample.
lib/PDF/Builder/docs/buildDoc.pl
Add run suggestions and examples for other structures of packages.
lib/PDF/Builder.pm, docs/buildDoc.pl, lib/PDF/Builder/Docs.pm,
lib/PDF/Builder/Resource/UniFont.pm,
lib/PDF/Builder/Resource/CIDFont/CJKFont-TrueType.pm,
lib/PDF/Builder/Resoure/Font/BdFont-CoreFont-Postscript-SynFont.pm,
Rearrange some of the documentation and update some "Options" lists to
make looking up font options more straightforward and complete.
lib/PDF/Builder/Content.pm
Move end/endpath description (POD) to a more appropriate section.
lib/PDF/Builder/Basic/PDF/File.pm
If open() for update, check that existing PDF is read/write. Also report
any error opening a PDF, and die, instead of just returning.
lib/PDF/Builder/Docs-Outlines-Outline.pm
Clarify and extend the documentation for creating and maintaining
outlines (bookmarks), including how to create multilevel (nested)
bookmarks. Remove '$prev' entry from Outline's constructor, as it
appears to have never functioned as intended. Instead, use the methods
insert_before() and insert_after() to place a bookmark within an
existing list. If you *are* successfully using '$prev', please describe
how you are using it so I can document it and restore it to the code!
Note that original Outline problem (#207) remains to be fixed!
lib/PDF/Builder.pm, lib/PDF/Builder/Resource/XObject/Image/PNG_IPL.pm,
lib/PDF/Builder/Resource/XObject/Image/TIFF_GT.pm,
lib/PDF/Builder/Resource/XObject/Image/TIFF/File_GT.pm
Update Image::PNG::Libpng handling so that SVGPDF library will be able
to handle inlined PNG images by passing an IO::String "filehandle" from
File::LoadLines, etc. Also, TIFF (with Graphics::TIFF usage) will now
accept filehandles (at least, "GLOB" type) as input, and write out a
temporary file to use. Certain operating systems seem to have trouble
erasing the temporary file, so temps may build up over time! This area of
filehandle inputs is still being actively investigated. It appears that
all image formats except GD (GIF, JPEG, TIFF, TIFF with Graphics::TIFF,
PNM, PNG, and PNG with Image::PNG::Libpng) can now be given either a
filepath and name, or a Perl filehandle.
lib/PDF/Builder/Content.pm
Correct placement of content of "object" and in POD elaborate on necessary
corrections that may be needed.
lib/PDF/Builder.pm
Recommend workaround for problems with Adobe Acrobat Reader when
displaying decimal (only) page labels (need to specify "start").
(most .pm files) update POD for more consistent appearance, including links
for major entries and methods.
docs/buildDoc.pl put NAVIGATION links at the top of the Table of Contents,
since usually now many more entries are in the TOC. The links themselves
are still at the bottom of the page.
devtools/PDFbuild.pl updates found to be needed in 3.026 build.
devtools/html2php.pl updates found to be needed.
MANIFEST add INFO/Changes_2023.
==== Bug fixes
lib/PDF/Builder.pm
Some PDF Readers ignore a request for decimal page numbers (and output
a page label of "Page m of n") if an explicit Start value isn't given.
Default Start value to 1.
lib/PDF/Builder/Basic/PDF/File.pm
Add newline after 'm n obj' to bring more in conformance with PDF/A
requirements (ISO 19005-1:2005, Clause: 6.1.8) per #52 and PDF::API2 #82.
Already had newline before 'endobj'.
lib/PDF/Builder.pm, lib/PDF/Builder/Docs.pm
Update recommendations that not only should T1 (PS) font and CJK font
users strongly consider changing over to TTF/OTF fonts, but add that
"core" fonts (while they will always be supported), are rather limited in
their capabilities (especially single-byte encoding only, no UTF-8,
limited selection of glyphs, no font embedding) and users should consider
changing over to TTF/OTF fonts to get more capabilities.
lib/PDF/Builder.pm, lib/PDF/Builder/Content.pm,
lib/PDF/Builder/Content/Text.pm, lib/PDF/Builder/CIDFont.pm
Fix failed paragraph justification due to word-spacing not being passed
to text output routine when TTF/OTF fonts are used, per #193.
lib/PDF/Builder/Basic/PDF/File.pm, devtools/html2php-PDFbuild-PDFversion.pl
Minor cleanup to get clean perlcritic run.
lib/PDF/Builder/Content.pm, lib/PDF/Builder/Resource/BaseFont.pm,
lib/PDF/Builder/Content/Text.pm
Per ticket #215 (Johan Vromans), corrected underlining (and also strike-
through and [future] overline) thickness and positioning to use the
correct Units Per Em (usually 1000, but many recent TTF and OTF fonts
use 2048 or even higher values).
lib/PDF/Builder/Content/Text.pm
Avoid top margins if at very beginning of column, and not just for
<p> paragraphs.
lib/PDF/Builder.pm, lib/PDF/Builder/Page.pm
Fix #210 (reported in API2 #75) default_page_size() was failing.
lib/PDF/Builder/Resource/Font/CoreFont.pm
Expand on descriptions of standard and Windows core fonts.
lib/PDF/Builder/Content/Text.pm, README.md, examples/Column.pl
There is a bug in HTML::TreeBuilder prerequisite HTML::Tagset
(https://rt.cpan.org/Public/Bug/Display.html?id=151970) where <ins>
and <del> tags cause unwanted paragraph breaks. The best solution, until
the TreeBuilder prereq HTML::Tagset is fixed (and HTML::TreeBuilder
updated to require the new version), is to edit HTML::Tagset and make a
one line fix. These instructions are repeated and expanded upon in README.
In \Strawberry\perl\vendor\lib\HTML\Tagset.pm (location of Tagset.pm
will vary on other Perls and OS's):
1. Find %isPhraseMarkup = map {; $_ => 1 } qw(
2. Below that find b i u s tt small big
3. Add a new line below that: ins del
This adds <ins> and <del> to the list of inline tags.
===NOTE=== the recent 3.22 release of HTML::Tagset has this fixed. The
easiest course of action is to check the version of HTML::Tagset, and if
it is earlier than 3.22, update it. If you cannot update the package with
a package manager such as 'cpan' or 'cpanm', you will need to manually
make the above fix. At some point in the future, presumably
HTML::TreeBuilder will receive an upgrade to prereq HTML::Tagset 3.22
(minimum) and the update will be taken care of automatically.
README.md, contrib/*, examples/*, tools/*, devtools/PDFbuild.pl,
devtools/PDFversion.pl, docs/buildDoc.pl
Bite the bullet and change "my $LAST_UPDATE" to "our $LAST_UPDATE", and
remove the build-time edit of all these files. .pm file instances were
already changed earlier during POD structure updates.
examples/RMtutorial.pl
Correct font 'Times' to 'Times-Roman' to avoid warning messages.
(see INFO/Changes_2023 for earlier changes)
Note that INFO/Changes-ver_2 (for changes released for PDF::API2, and
incorporated into PDF::Builder) is NOT being updated any longer. You may
assume that any change logged for API2 has also been incorporated into
Builder, with any exceptions or differences noted here.