Skip to content

Commit

Permalink
Bump version to 1.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopding committed Oct 16, 2021
1 parent 2f36ae3 commit b8a44bd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion apps/rn/src/tests/test3.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ export default async () => {
catRidingUnicornBytes,
cmykBytes,
normalPdfBase64,
existingPdfBytes,
] = await Promise.all([
fetchAsset('pdfs/with_update_sections.pdf'),
fetchAsset('images/cat_riding_unicorn_resized.jpg'),
fetchAsset('images/cmyk_colorspace.jpg'),
fetchAsset('pdfs/normal.pdf'),
fetchAsset('pdfs/with_annots.pdf'),
]);

const pdfDoc = await PDFDocument.load(inputPdfBytes, {
Expand All @@ -42,7 +44,6 @@ export default async () => {
const page0 = pdfDoc.insertPage(0, [305, 250]);
const page1 = pdfDoc.getPage(1);

const existingPdfBytes = await fetchBinaryAsset('pdfs/with_annots.pdf');
const docWithAnnots = await PDFDocument.load(existingPdfBytes);
const [page2] = await pdfDoc.copyPages(docWithAnnots, [0]);
page2.scaleContent(0.5, 0.5);
Expand Down
2 changes: 1 addition & 1 deletion apps/rn/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4885,7 +4885,7 @@ path-type@^3.0.0:
pify "^3.0.0"

pdf-lib@./../..:
version "1.16.0"
version "1.17.0"
dependencies:
"@pdf-lib/standard-fonts" "^1.0.0"
"@pdf-lib/upng" "^1.0.1"
Expand Down
7 changes: 4 additions & 3 deletions apps/web/test3.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@
catRidingUnicornBytes,
cmykBytes,
normalPdfBase64,
existingPdfBytes,
] = await Promise.all([
fetchStringAsset('pdfs/with_update_sections.pdf.base64.uri'),
fetchBinaryAsset('images/cat_riding_unicorn.jpg'),
fetchBinaryAsset('images/cmyk_colorspace.jpg'),
fetchStringAsset('pdfs/normal.pdf.base64'),
fetchBinaryAsset('pdfs/with_annots.pdf'),
]);

const pdfDoc = await PDFDocument.load(inputPdfBase64, {
Expand All @@ -82,8 +84,7 @@

const page0 = pdfDoc.insertPage(0, [305, 250]);
const page1 = pdfDoc.getPage(1);

const existingPdfBytes = await fetchBinaryAsset('pdfs/with_annots.pdf');

const docWithAnnots = await PDFDocument.load(existingPdfBytes);
const [page2] = await pdfDoc.copyPages(docWithAnnots, [0]);
page2.scaleContent(0.5, 0.5);
Expand All @@ -94,7 +95,7 @@
const [page4] = await pdfDoc.copyPages(docWithAnnots, [0]);
page4.scale(0.5, 0.5);
pdfDoc.addPage(page4);

const page5 = pdfDoc.addPage([305, 250]);

const hotPink = rgb(1, 0, 1);
Expand Down
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.16.0",
"version": "1.17.0",
"description": "Create and modify PDF files with JavaScript",
"author": "Andrew Dillon <[email protected]>",
"contributors": [
Expand Down

0 comments on commit b8a44bd

Please sign in to comment.