Skip to content

Commit 1f63950

Browse files
committed
Bump version to 1.13.0
1 parent 0d35886 commit 1f63950

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed

apps/rn/yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4885,7 +4885,7 @@ path-type@^3.0.0:
48854885
pify "^3.0.0"
48864886

48874887
pdf-lib@./../..:
4888-
version "1.12.0"
4888+
version "1.13.0"
48894889
dependencies:
48904890
"@pdf-lib/standard-fonts" "^1.0.0"
48914891
"@pdf-lib/upng" "^1.0.1"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pdf-lib",
3-
"version": "1.12.0",
3+
"version": "1.13.0",
44
"description": "Create and modify PDF files with JavaScript",
55
"author": "Andrew Dillon <[email protected]>",
66
"contributors": [

src/api/PDFDocument.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,11 @@ export default class PDFDocument {
821821
assertOrUndefined(options.modificationDate, 'options.modificationDate', [
822822
Date,
823823
]);
824-
assertIsOneOfOrUndefined(options.afRelationship, 'options.afRelationship', AFRelationship);
824+
assertIsOneOfOrUndefined(
825+
options.afRelationship,
826+
'options.afRelationship',
827+
AFRelationship,
828+
);
825829

826830
const bytes = toUint8Array(attachment);
827831
const embedder = FileEmbedder.for(bytes, name, options);

src/api/PDFEmbeddedFile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default class PDFEmbeddedFile implements Embeddable {
7272

7373
/**
7474
* The AF-Tag is needed to achieve PDF-A3 compliance for embedded files
75-
*
75+
*
7676
* The following document outlines the uses cases of the associated files (AF) tag.
7777
* See:
7878
* https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf
@@ -82,7 +82,7 @@ export default class PDFEmbeddedFile implements Embeddable {
8282
this.doc.catalog.set(PDFName.of('AF'), this.doc.context.obj([]));
8383
}
8484
const AF = this.doc.catalog.lookup(PDFName.of('AF'), PDFArray);
85-
AF.push(ref)
85+
AF.push(ref);
8686

8787
this.alreadyEmbedded = true;
8888
}

src/core/embedders/FileEmbedder.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PDFHexString from 'src/core/objects/PDFHexString';
33
import PDFContext from 'src/core/PDFContext';
44
import PDFRef from 'src/core/objects/PDFRef';
55

6-
/**
6+
/**
77
* From the PDF-A3 specification, section **3.1. Requirements - General**.
88
* See:
99
* * https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf
@@ -16,7 +16,7 @@ export enum AFRelationship {
1616
EncryptedPayload = 'EncryptedPayload',
1717
FormData = 'EncryptedPayload',
1818
Schema = 'Schema',
19-
Unspecified = 'Unspecified'
19+
Unspecified = 'Unspecified',
2020
}
2121

2222
export interface EmbeddedFileOptions {
@@ -56,10 +56,9 @@ class FileEmbedder {
5656
description,
5757
creationDate,
5858
modificationDate,
59-
afRelationship
59+
afRelationship,
6060
} = this.options;
6161

62-
6362
const embeddedFileStream = context.flateStream(this.fileData, {
6463
Type: 'EmbeddedFile',
6564
Subtype: mimeType ?? undefined,
@@ -81,7 +80,7 @@ class FileEmbedder {
8180
UF: PDFHexString.fromText(this.fileName),
8281
EF: { F: embeddedFileStreamRef },
8382
Desc: description ? PDFHexString.fromText(description) : undefined,
84-
AFRelationship: afRelationship ?? undefined
83+
AFRelationship: afRelationship ?? undefined,
8584
});
8685

8786
if (ref) {

src/core/objects/PDFArray.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ class PDFArray extends PDFObject {
6060
lookupMaybe(index: number, type: typeof PDFNull): typeof PDFNull | undefined;
6161
lookupMaybe(index: number, type: typeof PDFNumber): PDFNumber | undefined;
6262
lookupMaybe(index: number, type: typeof PDFStream): PDFStream | undefined;
63-
lookupMaybe(index: number, type: typeof PDFRawStream): PDFRawStream | undefined;
63+
lookupMaybe(
64+
index: number,
65+
type: typeof PDFRawStream,
66+
): PDFRawStream | undefined;
6467
lookupMaybe(index: number, type: typeof PDFRef): PDFRef | undefined;
6568
lookupMaybe(index: number, type: typeof PDFString): PDFString | undefined;
6669
lookupMaybe(

0 commit comments

Comments
 (0)