Skip to content

Commit

Permalink
Bump version to 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopding committed Dec 23, 2019
1 parent d5aab62 commit 645a530
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pdf-lib",
"version": "1.2.0",
"version": "1.3.0",
"description": "Create and modify PDF files with JavaScript",
"author": "Andrew Dillon <[email protected]>",
"contributors": [
Expand Down
40 changes: 10 additions & 30 deletions src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,11 @@ export { default as PDFStreamWriter } from 'src/core/writers/PDFStreamWriter';
export { default as PDFHeader } from 'src/core/document/PDFHeader';
export { default as PDFTrailer } from 'src/core/document/PDFTrailer';
export { default as PDFTrailerDict } from 'src/core/document/PDFTrailerDict';
export {
default as PDFCrossRefSection,
} from 'src/core/document/PDFCrossRefSection';
export { default as PDFCrossRefSection } from 'src/core/document/PDFCrossRefSection';

export {
default as StandardFontEmbedder,
} from 'src/core/embedders/StandardFontEmbedder';
export {
default as CustomFontEmbedder,
} from 'src/core/embedders/CustomFontEmbedder';
export {
default as CustomFontSubsetEmbedder,
} from 'src/core/embedders/CustomFontSubsetEmbedder';
export { default as StandardFontEmbedder } from 'src/core/embedders/StandardFontEmbedder';
export { default as CustomFontEmbedder } from 'src/core/embedders/CustomFontEmbedder';
export { default as CustomFontSubsetEmbedder } from 'src/core/embedders/CustomFontSubsetEmbedder';
export { default as JpegEmbedder } from 'src/core/embedders/JpegEmbedder';
export { default as PngEmbedder } from 'src/core/embedders/PngEmbedder';

Expand All @@ -40,29 +32,17 @@ export { default as PDFStream } from 'src/core/objects/PDFStream';
export { default as PDFRawStream } from 'src/core/objects/PDFRawStream';

export { default as PDFCatalog } from 'src/core/structures/PDFCatalog';
export {
default as PDFContentStream,
} from 'src/core/structures/PDFContentStream';
export {
default as PDFCrossRefStream,
} from 'src/core/structures/PDFCrossRefStream';
export {
default as PDFObjectStream,
} from 'src/core/structures/PDFObjectStream';
export { default as PDFContentStream } from 'src/core/structures/PDFContentStream';
export { default as PDFCrossRefStream } from 'src/core/structures/PDFCrossRefStream';
export { default as PDFObjectStream } from 'src/core/structures/PDFObjectStream';
export { default as PDFPageTree } from 'src/core/structures/PDFPageTree';
export { default as PDFPageLeaf } from 'src/core/structures/PDFPageLeaf';
export { default as PDFFlateStream } from 'src/core/structures/PDFFlateStream';

export { default as PDFOperator } from 'src/core/operators/PDFOperator';
export {
default as PDFOperatorNames,
} from 'src/core/operators/PDFOperatorNames';
export { default as PDFOperatorNames } from 'src/core/operators/PDFOperatorNames';

export { default as PDFObjectParser } from 'src/core/parser/PDFObjectParser';
export {
default as PDFObjectStreamParser,
} from 'src/core/parser/PDFObjectStreamParser';
export { default as PDFObjectStreamParser } from 'src/core/parser/PDFObjectStreamParser';
export { default as PDFParser } from 'src/core/parser/PDFParser';
export {
default as PDFXRefStreamParser,
} from 'src/core/parser/PDFXRefStreamParser';
export { default as PDFXRefStreamParser } from 'src/core/parser/PDFXRefStreamParser';
6 changes: 5 additions & 1 deletion src/core/parser/PDFParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ class PDFParser extends PDFObjectParser {
private alreadyParsed = false;
private parsedObjects = 0;

constructor(pdfBytes: Uint8Array, objectsPerTick: number = Infinity, throwOnInvalidObject = false) {
constructor(
pdfBytes: Uint8Array,
objectsPerTick: number = Infinity,
throwOnInvalidObject = false,
) {
super(ByteStream.of(pdfBytes), PDFContext.create());
this.objectsPerTick = objectsPerTick;
this.throwOnInvalidObject = throwOnInvalidObject;
Expand Down
6 changes: 5 additions & 1 deletion tests/core/parser/PDFParser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ describe(`PDFParser`, () => {
%PDF-1.7
22 0 obj <</Type/Outlines/First ## 0 R/Last ** 0 R/Count 2>> endobj
`;
const parser = PDFParser.forBytesWithOptions(typedArrayFor(input), 100, true);
const parser = PDFParser.forBytesWithOptions(
typedArrayFor(input),
100,
true,
);
await expect(parser.parseDocument()).rejects.toBeInstanceOf(Error);
});

Expand Down

0 comments on commit 645a530

Please sign in to comment.