Jonas Jenwald
909ff8e29f
Replace instanceof Object
with typeof
checks
...
Using `instanceof Object` is generally problematic, since it's not guaranteed to always do the right thing for all Objects.
(I stumbled upon this while working on another patch, when I noticed that the `outlineView` was broken with workers disabled.)
2021-07-03 11:30:46 +02:00
Calixte Denizet
f16828be49
XFA - An image can be a stream in the pdf (bug 1718521)
...
- hrefs can be found in catalog > Names > XFAImages
2021-07-02 20:34:10 +02:00
Calixte Denizet
f7d3b22480
XFA - Improve text layout
...
- support paragraph margins, line height, letter spacing, ...
- compute missing dimensions from fields based almost on the dimensions of caption contents.
2021-07-02 17:53:32 +02:00
calixteman
d80651e572
Merge pull request #13598 from calixteman/dhl
...
XFA - Remove empty pages
2021-06-30 20:43:07 +02:00
calixteman
a8a5c5f10b
Merge pull request #13648 from calixteman/xfa_bg
...
XFA - Don't fill when the fill element is not visible (bug 1718735)
2021-06-30 18:12:13 +02:00
Calixte Denizet
08e08d5852
XFA - Don't fill when the fill element is not visible (bug 1718735)
2021-06-30 17:14:08 +02:00
Calixte Denizet
ff440d13e7
XFA - Remove empty pages
...
- it aims to fix #13583 ;
- fix the switch to breakBefore target;
- force the layout of an unsplittable element on an empty page;
- don't fail when there is horizontal overflow (except in lr-tb);
- handle correctly overflow in the same content area (bug 1717805, bug 1717668);
- fix a typo in radial gradient first argument.
2021-06-30 16:32:27 +02:00
Tim van der Meij
6307349e31
Merge pull request #13640 from Snuffleupagus/issue-6759
...
Add non-PRODUCTION/TESTING overflow `assert`s to various string helper-functions (issue 6759)
2021-06-29 21:22:34 +02:00
calixteman
d88d9a2574
Merge pull request #13616 from marco-c/1773_reftests
...
Add PDFs from #1773 to the reftests
2021-06-29 17:28:10 +02:00
Marco Castelluccio
db15205e2c
Add PDFs from #1773 to the reftests
2021-06-29 16:35:06 +02:00
calixteman
f35e4cc9ab
Merge pull request #13645 from calixteman/bug1718241
...
XFA - Choice list has no selected value by default (bug 1718241)
2021-06-28 23:46:59 +02:00
calixteman
04dc902933
Merge pull request #13644 from calixteman/xfa_missing_fonts
...
XFA - Support non-embedded fonts without a Widths entry
2021-06-28 23:46:09 +02:00
Calixte Denizet
70bb672dcd
XFA - Support non-embedded fonts without a Widths entry
...
- some pdf use some fonts which are not embedded or they don't have any width array or don't have any css info (e.g. for standard fonts or Arial).
- so add widths arrays for Liberation fonts in order to compute the ones for other fonts in using scale factors array.
2021-06-28 23:05:08 +02:00
Calixte Denizet
1de133a7c9
XFA - Choice list has no selected value by default
2021-06-28 22:10:26 +02:00
calixteman
3f02a46570
Merge pull request #13641 from calixteman/image_dim
...
XFA - Implement aspect property on image element
2021-06-28 21:55:25 +02:00
Calixte Denizet
71d17b0cc4
XFA - Implement aspect property on image element
...
- it aims to fix issue #13634 ;
- move some img-related functions in test/drivers.js in order to have images in xfa reftests.
2021-06-28 20:43:39 +02:00
calixteman
ff3a5382ee
Merge pull request #13635 from calixteman/1718037
...
XFA - Fix width of a container with lr-tb layout (bug 1718037)
2021-06-28 17:51:46 +02:00
Calixte Denizet
b261446981
XFA - Fix width of a container with lr-tb layout (bug 1718037)
2021-06-28 17:47:04 +02:00
calixteman
03dff1c5f5
Merge pull request #13639 from calixteman/old_break
...
XFA - Replace deprecated break element (bug 1718053)
2021-06-28 17:44:03 +02:00
calixteman
191db4145e
Merge pull request #13642 from calixteman/quotes
...
XFA - Remove quotes of font name in xhtml
2021-06-28 13:25:47 +02:00
Calixte Denizet
677332aa7b
XFA - Remove quotes of font name in xhtml
2021-06-27 18:05:12 +02:00
Jonas Jenwald
273d8cb746
Add non-PRODUCTION/TESTING overflow assert
s to various string helper-functions (issue 6759)
2021-06-27 16:06:30 +02:00
Calixte Denizet
257de0e8c5
XFA - Replace deprecated break element (bug 1718053)
...
- the break element has been deprecated in XFA 2.4 but some old documents can use it, so replace it with one (or more) of its possible substitutions:
- breakBefore;
- breakAfter;
- overflow.
2021-06-27 15:03:00 +02:00
Tim van der Meij
d644b66c72
Merge pull request #13638 from Snuffleupagus/api-tweak-docs
...
A couple of smaller JSDocs tweaks in `src/display/api.js`
2021-06-27 12:47:57 +02:00
Tim van der Meij
4a8466cdac
Merge pull request #13637 from Snuffleupagus/update-packages
...
Update packages and translations
2021-06-27 12:42:54 +02:00
Jonas Jenwald
d02146b13b
Add a OnProgressParameters
typedef to reduce (some) duplication in src/display/api.js
2021-06-27 11:55:53 +02:00
Jonas Jenwald
ea4b162328
Use the RefProxy
typedef in more JSDoc comments in src/display/api.js
2021-06-27 11:34:59 +02:00
Jonas Jenwald
0326c05db0
Update l10n files
2021-06-27 10:31:06 +02:00
Jonas Jenwald
b146c597b0
Fix (some) vulnerabilities reported by npm audit
...
This was done automatically, using the `npm audit fix` command.
2021-06-27 10:29:39 +02:00
Jonas Jenwald
e79ed27f2f
Update the es-module-shims
package to the latest version
2021-06-27 10:27:02 +02:00
Jonas Jenwald
f03d5b3ee7
Update npm packages
2021-06-27 10:25:40 +02:00
Tim van der Meij
d7f8a0e9b9
Merge pull request #13628 from Snuffleupagus/issue-13626
...
Check that TrueType (3, 0) cmap tables, for symbolic fonts, are sorted correctly (issue 13626)
2021-06-26 14:17:11 +02:00
Tim van der Meij
82660296d6
Merge pull request #13600 from Snuffleupagus/scrollMatchIntoView-selectedLeft
...
Take the position of the `selected` element into account when scrolling matches (issue 13596)
2021-06-26 14:04:20 +02:00
calixteman
9de0916fd4
Merge pull request #13627 from calixteman/save
...
XFA - Save filled data in the pdf when downloading the file (Bug 1716288)
2021-06-25 20:12:09 +02:00
Calixte Denizet
429ffdcd2f
XFA - Save filled data in the pdf when downloading the file (Bug 1716288)
...
- when binding (after parsing) we get a map between some template nodes and some data nodes;
- so set user data in input handlers in using data node uids in the annotation storage;
- to save the form, just put the value we have in the storage in the correct data nodes, serialize the xml as a string and then write the string at the end of the pdf using src/core/writer.js;
- fix few bugs around data bindings:
- the "Off" issue in Bug 1716980.
2021-06-25 18:57:01 +02:00
Jonas Jenwald
50edd5da63
Suppress OTS warnings about the caretOffset
in the hhea-table
...
- https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6hhea.html
- https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6head.html
2021-06-25 17:02:02 +02:00
Jonas Jenwald
185be678ec
Check that TrueType (3, 0) cmap tables, for symbolic fonts, are sorted correctly (issue 13626)
...
According to a comment in `readCmapTable`, we're assuming that the cmap tables (when more than one exist) are sorted in ascending order. If that's not the case, keep checking the following cmap tables in order to fix the referenced issue.
2021-06-25 16:56:00 +02:00
Brendan Dahl
dc7faa213e
Merge pull request #13624 from calixteman/center
...
XFA - Take into account text position in caption
2021-06-24 09:07:39 -07:00
Calixte Denizet
57b6746bab
XFA - Take into account text position in caption
2021-06-24 10:25:41 +02:00
Brendan Dahl
d7fdb72a3f
Merge pull request #13619 from calixteman/bg
...
XFA - Add back empty subforms (which can have a background)
2021-06-23 16:21:28 -07:00
Brendan Dahl
ad28622595
Merge pull request #13622 from calixteman/no_stretch_lrtb
...
XFA - No container stretching with lr-tb layout
2021-06-23 15:06:21 -07:00
Brendan Dahl
f4f00a9bc6
Merge pull request #13618 from calixteman/bind_root
...
XFA - Always bind root subform on root data
2021-06-23 13:14:12 -07:00
Calixte Denizet
1d0e83e1bd
XFA - No container stretching with lr-tb layout
2021-06-23 22:03:07 +02:00
Tim van der Meij
f74562b19c
Merge pull request #13613 from Snuffleupagus/xfa-printing-tweaks
...
[api-minor] Slightly tweak/improve various code related to XFA-printing
2021-06-23 21:56:29 +02:00
Tim van der Meij
ad4b2ce021
Merge pull request #13612 from Snuffleupagus/issue-13610
...
Support corrupt documents with *empty* `Name`-entries (issue 13610)
2021-06-23 21:49:02 +02:00
Tim van der Meij
c115be27b6
Merge pull request #13617 from Snuffleupagus/reset-externalLinkEnabled
...
Reset the `IPDFLinkService.externalLinkEnabled` property on document closing
2021-06-23 21:42:27 +02:00
Calixte Denizet
b836616667
XFA - Always bind root subform on root data
...
- it partially fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1717805 (on the data side at least but there is still a layout issue).
2021-06-23 20:46:41 +02:00
Calixte Denizet
f168998d93
XFA - Add back empty subforms (which can have a background)
2021-06-23 19:42:36 +02:00
calixteman
2bae399422
Merge pull request #13614 from calixteman/line_height
...
XFA - Get line height from the font
2021-06-23 14:57:27 +02:00
Jonas Jenwald
d959cb824d
Reset the IPDFLinkService.externalLinkEnabled
property on document closing
...
Given that this property is only used with password protected documents, and is consequently document-specific rather than viewer-specific, ensure that `IPDFLinkService.externalLinkEnabled` is actually being reset by `PDFViewerApplication.close`.
To make things less confusing/inconsistent, remove the *undocumented* `externalLinkEnabled` property from the `PDFLinkService` constructor and force it to always be manually set when needed.
2021-06-23 14:12:33 +02:00