Skip to content

Commit

Permalink
Hard code 1.7 version header
Browse files Browse the repository at this point in the history
  • Loading branch information
programmarchy authored and Sharcoux committed Jun 14, 2024
1 parent d4d7611 commit 215eded
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/core/writers/PDFStreamWriter.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PDFHeader from '../document/PDFHeader';
import PDFTrailer from '../document/PDFTrailer';
import PDFInvalidObject from '../objects/PDFInvalidObject';
import PDFName from '../objects/PDFName';
Expand Down Expand Up @@ -43,7 +44,7 @@ class PDFStreamWriter extends PDFWriter {
protected async computeBufferSize() {
let objectNumber = this.context.largestObjectNumber + 1;

const header = this.context.header;
const header = PDFHeader.forVersion(1, 7);

let size = header.sizeInBytes() + 2;

Expand Down
2 changes: 1 addition & 1 deletion src/core/writers/PDFWriter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class PDFWriter {
}

protected async computeBufferSize(): Promise<SerializationInfo> {
const header = this.context.header;
const header = PDFHeader.forVersion(1, 7);

let size = header.sizeInBytes() + 2;

Expand Down

0 comments on commit 215eded

Please sign in to comment.