mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
XFA - Fix layout issues
- PR #13554 is buggy, so this patch aims to fix bugs. - check if a component fits into its parent in taking into account the parent layout. - introduce method isSplittable for template nodes to know if a component can be splitted in case of overflow.
This commit is contained in:
parent
326226df45
commit
df08b1548b
7 changed files with 337 additions and 232 deletions
1
test/pdfs/xfa_candidate_petitions.pdf.link
Normal file
1
test/pdfs/xfa_candidate_petitions.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
https://web.archive.org/web/20210509141453/https://www.sos.state.oh.us/globalassets/elections/directives/2020/dir2020-15_independentcandidatepetitions2020signedextended.pdf
|
|
@ -946,6 +946,14 @@
|
|||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_candidate_petitions",
|
||||
"file": "pdfs/xfa_candidate_petitions.pdf",
|
||||
"md5": "0db96a00667f8f58f94cf81022e69341",
|
||||
"link": true,
|
||||
"rounds": 1,
|
||||
"enableXfa": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "xfa_annual_expense_report",
|
||||
"file": "pdfs/xfa_annual_expense_report.pdf",
|
||||
"md5": "06866e7a6bbc0346789208ef5f6e885c",
|
||||
|
|
|
@ -60,6 +60,9 @@ describe("XFAFactory", function () {
|
|||
</subform>
|
||||
<subform name="second">
|
||||
<breakBefore targetType="pageArea" startNew="1"/>
|
||||
<subform>
|
||||
<draw w="1pt" h="1pt"><value><text>foo</text></value></draw>
|
||||
</subform>
|
||||
</subform>
|
||||
</subform>
|
||||
</template>
|
||||
|
@ -133,7 +136,7 @@ describe("XFAFactory", function () {
|
|||
<subform name="root" mergeMode="matchTemplate">
|
||||
<pageSet>
|
||||
<pageArea>
|
||||
<contentArea x="123pt" w="456pt" h="789pt"/>
|
||||
<contentArea x="0pt" w="456pt" h="789pt"/>
|
||||
<medium stock="default" short="456pt" long="789pt"/>
|
||||
<field y="1pt" w="11pt" h="22pt" x="2pt">
|
||||
<ui>
|
||||
|
@ -146,6 +149,7 @@ describe("XFAFactory", function () {
|
|||
</pageArea>
|
||||
</pageSet>
|
||||
<subform name="first">
|
||||
<draw w="1pt" h="1pt"><value><text>foo</text></value></draw>
|
||||
</subform>
|
||||
</subform>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue