Comments (13)
Can you provide the code how you have imported it?
from jspdf-invoice-template.
First I use the following command to install the package on a Angular project: npm i jspdf-invoice-template.
And this is how I imported it :
import jsPDFInvoiceTemplate, { OutputType, jsPDF } from "jspdf-invoice-template";
var pdfObject = jsPDFInvoiceTemplate.default(props); //returns number of pages created
from jspdf-invoice-template.
And 'props' is the object parameter as in the the example i have posted?
The exception you are receiving it's a bit strange.
Can you show a image of the basic implementation with the props parameter? And the error message?
from jspdf-invoice-template.
from jspdf-invoice-template.
Understand. I have to do some tests for Angular v13 in order to find a fix. Thank you for reporting it!
from jspdf-invoice-template.
Exactly, I'm using Angular V13. Thank you for your reply.
from jspdf-invoice-template.
You just need to call it that way,
jsPDFInvoiceTemplate(props);
You also may need to add
jsPDFInvoiceTemplate(props as any);
from jspdf-invoice-template.
Hi @edisonneza, Thanks for your reply, by using this code jsPDFInvoiceTemplate(props as any);
,there is no more error in my InvoiceComponent.ts, but now I'm getting this error in InvoiceComponent.html by launching the App:
Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'webpackChunkjsPDFInvoiceTemplate')
from jspdf-invoice-template.
Hi @Wollos2019 , i just updated the package to support Angular v13. I have done a fix by separating the project into two different packages, one for web browsers and another one for nodejs.
Please take a look at the readme for more. The version to install for Angular v13 is 1.4.2.
Try it and let me know if anything.
Thank you!
from jspdf-invoice-template.
Hi @edisonneza, I installed the package with npm i jspdf-invoice-template-nodejs, but I get this error:
ERROR Error: Uncaught (in promise): ReferenceError: global is not defined
ReferenceError: global is not defined
Maybe I did something wrong or doesn't know how to implement correctly. I also tried to specified the version like this npm i [email protected], but it doesn't work. Thanks a lot for your Attention and your Help.
from jspdf-invoice-template.
You are using nodejs package. Please install the "jspdf-invoice-template" if you are using in frontend web projects.
from jspdf-invoice-template.
@Wollos2019 I'm closing the issue since the problem seems to be fixed.
Open another one if you have other issues!
from jspdf-invoice-template.
from jspdf-invoice-template.
Related Issues (20)
- Japanese language HOT 15
- Add a stamp HOT 2
- 1.4.0 invoice header is expecting string[] but demo site given as object[] HOT 2
- using blob , prepend an image and upload to firebase storage doesn't work, but saving locally works HOT 2
- Semi missing license HOT 1
- Generate 2 PDF Everytime HOT 2
- Using Data URLS for the Logo HOT 5
- Set row height/padding HOT 3
- For Loop Dynamic Rendering, Saves Only 10 Times HOT 2
- Invalid Hook Call HOT 2
- Possibility to add a new table or more HOT 1
- Possibility to add a table background color , header color or text color ? HOT 2
- Uncaught TypeError: t is undefined HOT 5
- Question HOT 1
- Trouble writing Arabic HOT 2
- Directly saving as PDF - Node HOT 1
- Adding Columns to Footer
- Sveltkit Client side error window not defined. HOT 2
- ADD FEATURE Direct printing on same page on Sveltkit projects or others Reactjs/Next/Remix/VanillaJs
- I am not able to add the currency symbol to the price and the total. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jspdf-invoice-template.