@formepdf/shared 0.28.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/parser.d.ts CHANGED
@@ -45,6 +45,7 @@ interface DocumentProps {
45
45
  pdfVersion?: '1.7' | '2.0';
46
46
  pdfUa?: boolean;
47
47
  pdfUa2?: boolean;
48
+ embedStandardFonts?: boolean;
48
49
  certification?: CertificationConfig;
49
50
  /** @deprecated Use certification */
50
51
  signature?: CertificationConfig;
package/dist/parser.js CHANGED
@@ -122,6 +122,8 @@ function parseMarkupDocument(markup) {
122
122
  result.pdfUa = true;
123
123
  if (props.pdfUa2)
124
124
  result.pdfUa2 = true;
125
+ if (props.embedStandardFonts)
126
+ result.embedStandardFonts = true;
125
127
  const cert = props.certification ?? props.signature;
126
128
  if (cert) {
127
129
  if (props.signature && !props.certification) {
package/dist/types.d.ts CHANGED
@@ -390,6 +390,15 @@ export interface FormeDocument {
390
390
  * for a file that is archival AND accessible.
391
391
  */
392
392
  pdfUa2?: boolean;
393
+ /**
394
+ * Embed the base-14 fonts (Helvetica, Times, Courier) as their
395
+ * metric-compatible substitutes from @formepdf/fonts-standard, with NO
396
+ * conformance claim: no PDF/UA or PDF/A identification. pdfUa, pdfa and
397
+ * pdfVersion "2.0" already embed them; this is for an ordinary document
398
+ * that should look the same in every viewer. Subset to the characters
399
+ * used; layout is unchanged. Warns if the substitutes are not registered.
400
+ */
401
+ embedStandardFonts?: boolean;
393
402
  flattenForms?: boolean;
394
403
  certification?: CertificationConfig;
395
404
  }
@@ -403,7 +412,7 @@ export interface FormeDocument {
403
412
  * out (and `passes` before it: real on one layer, absent on the layer
404
413
  * users touch).
405
414
  */
406
- export type FormeDocumentClaimProps = Pick<FormeDocument, 'tagged' | 'pdfa' | 'pdfVersion' | 'pdfUa' | 'pdfUa2'>;
415
+ export type FormeDocumentClaimProps = Pick<FormeDocument, 'tagged' | 'pdfa' | 'pdfVersion' | 'pdfUa' | 'pdfUa2' | 'embedStandardFonts'>;
407
416
  export interface FormeMetadata {
408
417
  title?: string;
409
418
  author?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formepdf/shared",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "Framework-agnostic document model and serialization core shared by Forme adapters",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",