1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-28 23:28:16 +02:00

XFA - Convert some template properties into CSS ones (#13082)

- implement few positioning properties: position, width, height, anchor;
  - implement font element;
  - implement fill element (used by font) and its children (linear, radial, ...);
  - font property is inherited from ancestor container (see https://www.pdfa.org/wp-content/uploads/2020/07/XFA-3_3.pdf#page=43) so let CSS handles that stuff;
  - in order to reduce the number of properties to set, only set non default properties and put the default in CSS;
  - set a background to some containers to be able to see them (will be removed in a future commit).
This commit is contained in:
calixteman 2021-03-25 13:02:39 +01:00 committed by GitHub
parent 9d0ce6e79f
commit 63471bcbbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 549 additions and 93 deletions

View file

@ -59,6 +59,7 @@ const $setSetAttributes = Symbol();
const $setValue = Symbol();
const $text = Symbol();
const $toHTML = Symbol();
const $toStyle = Symbol();
const $uid = Symbol("uid");
const _applyPrototype = Symbol();
@ -259,6 +260,10 @@ class XFAObject {
return dumped;
}
[$toStyle]() {
return null;
}
[$toHTML]() {
return null;
}
@ -839,6 +844,7 @@ export {
$setValue,
$text,
$toHTML,
$toStyle,
$uid,
ContentObject,
IntegerObject,