mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
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.
This commit is contained in:
parent
f35e4cc9ab
commit
ff440d13e7
12 changed files with 329 additions and 113 deletions
1
test/pdfs/xfa_bug1717668_1.pdf.link
Normal file
1
test/pdfs/xfa_bug1717668_1.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://bugzilla.mozilla.org/attachment.cgi?id=9228387
|
1
test/pdfs/xfa_bug1717668_2.pdf.link
Normal file
1
test/pdfs/xfa_bug1717668_2.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://bugzilla.mozilla.org/attachment.cgi?id=9228727
|
1
test/pdfs/xfa_bug1717668_3.pdf.link
Normal file
1
test/pdfs/xfa_bug1717668_3.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://bugzilla.mozilla.org/attachment.cgi?id=9228728
|
1
test/pdfs/xfa_bug1717805.pdf.link
Normal file
1
test/pdfs/xfa_bug1717805.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://bugzilla.mozilla.org/attachment.cgi?id=9228507
|
1
test/pdfs/xfa_dhl_shipment.pdf.link
Normal file
1
test/pdfs/xfa_dhl_shipment.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://web.archive.org/web/20210621073147/https://www.dhl.com/content/dam/downloads/g0/express/emailship_page/globalpage/dhl_emailship_pdfclient_my_en.pdf
|
1
test/pdfs/xfa_issue13611.pdf.link
Normal file
1
test/pdfs/xfa_issue13611.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://github.com/mozilla/pdf.js/files/6695365/2229E.pdf
|
|
@ -946,6 +946,38 @@
|
|||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_bug1717805",
|
||||
"file": "pdfs/xfa_bug1717805.pdf",
|
||||
"md5": "c68ccebd0d92b8fd70c465660458507f",
|
||||
"link": true,
|
||||
"rounds": 1,
|
||||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_bug17176688_1",
|
||||
"file": "pdfs/xfa_bug1717668_1.pdf",
|
||||
"md5": "564ecff67be690b43c2a144ae5967034",
|
||||
"link": true,
|
||||
"rounds": 1,
|
||||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_bug17176688_2",
|
||||
"file": "pdfs/xfa_bug1717668_2.pdf",
|
||||
"md5": "08aa8bf9fec5aa7b8ff13d9ba72ca8ac",
|
||||
"link": true,
|
||||
"rounds": 1,
|
||||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_bug17176688_3",
|
||||
"file": "pdfs/xfa_bug1717668_3.pdf",
|
||||
"md5": "4ff2531dbefebabc3f128d4ae20552a4",
|
||||
"link": true,
|
||||
"rounds": 1,
|
||||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_bug1718037",
|
||||
"file": "pdfs/xfa_bug1718037.pdf",
|
||||
"md5": "a0b53d50e9faed9d57950a5159d5da12",
|
||||
|
@ -970,6 +1002,14 @@
|
|||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_dhl_shipment",
|
||||
"file": "pdfs/xfa_dhl_shipment.pdf",
|
||||
"md5": "503ece429d69e7d626d6932a475fbe63",
|
||||
"link": true,
|
||||
"rounds": 1,
|
||||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_bug1716047",
|
||||
"file": "pdfs/xfa_bug1716047.pdf",
|
||||
"md5": "2f524163bd8397f43d195090978c3b56",
|
||||
|
@ -1050,6 +1090,14 @@
|
|||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_issue13611",
|
||||
"file": "pdfs/xfa_issue13611.pdf",
|
||||
"md5": "e713fb46a6b4637660010f1850559ff6",
|
||||
"link": true,
|
||||
"rounds": 1,
|
||||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_issue13634",
|
||||
"file": "pdfs/xfa_issue13634.pdf",
|
||||
"md5": "459a04045470811cbab6671772929d3d",
|
||||
|
|
|
@ -56,14 +56,18 @@ describe("XFAFactory", function () {
|
|||
</draw>
|
||||
</pageArea>
|
||||
</pageSet>
|
||||
<subform name="first">
|
||||
</subform>
|
||||
<subform name="second">
|
||||
<breakBefore targetType="pageArea" startNew="1"/>
|
||||
<subform>
|
||||
<draw w="1pt" h="1pt"><value><text>foo</text></value></draw>
|
||||
</subform>
|
||||
</subform>
|
||||
<subform name="third">
|
||||
<breakBefore targetType="pageArea" startNew="1"/>
|
||||
<subform>
|
||||
<draw w="1pt" h="1pt"><value><text>bar</text></value></draw>
|
||||
</subform>
|
||||
</subform>
|
||||
</subform>
|
||||
</template>
|
||||
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
|
||||
|
@ -92,7 +96,6 @@ describe("XFAFactory", function () {
|
|||
width: "456px",
|
||||
left: "123px",
|
||||
top: "0px",
|
||||
position: "absolute",
|
||||
});
|
||||
|
||||
const wrapper = page1.children[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue