Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue trying to overlay on a new page #205

Open
arthur-conde opened this issue Jan 25, 2021 · 0 comments
Open

Issue trying to overlay on a new page #205

arthur-conde opened this issue Jan 25, 2021 · 0 comments
Labels

Comments

@arthur-conde
Copy link

Hello,

import HummusRecipe from 'hummus-recipe';

const pdfToEdit = SOMEPATH;
const pdfToOverlay = ANOTHERPATH;

const recipe = new HummusRecipe(pdfToEdit, 'output.pdf');
recipe.createPage(612,792).overlay(pdfToOverlay, 0, 0, { fitWidth: true, fitHeight: true }).endPDF();

I'm getting this exception:

An error occurred trying to generate a signed PDF. TypeError: this.page.startContext is not a function
    at Recipe.resumeContext (/home/arthur/sources/doxcycle-online/node_modules/hummus-recipe/lib/page.js:200:38)
    at Recipe.overlay (/home/arthur/sources/doxcycle-online/node_modules/hummus-recipe/lib/overlay.js:43:10)

I tried to fix it in my fork but I don't know if it's the way to go about it. Works though.

easyTree added a commit to easyTree/hummusRecipe that referenced this issue Aug 19, 2022
…TypeError: this.page.startContext is not a function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants