-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Angular Example Text #2983
base: master
Are you sure you want to change the base?
Angular Example Text #2983
Conversation
examples/angular/README.md
Outdated
|
||
### 1. Install jsPDF | ||
|
||
`npm i jspdf @types/jspdf` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@types/jspdf is no longer required. jsPDF comes with its own typings file.
examples/angular/README.md
Outdated
### 2. Import jsPDF in the component file | ||
|
||
```ts | ||
import { jsPDF} from "jspdf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space after jsPDF ;)
examples/angular/README.md
Outdated
`npm i` | ||
|
||
### 2. Run | ||
`ng serve` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably better to run npm start
doc.text(this.text,10,10) | ||
|
||
//Convert Document to a Blob | ||
var blobPDF = new Blob([ doc.output() ], { type : 'application/pdf'}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do doc.output('blob')
instead.
Thanks for this PR :) |
Hey @HackbrettXXX glad to contribute to this project, I've made the requested changes. Also, I'll be adding an HTML as well as |
Alright, thanks :) |
@HackbrettXXX I've implemented the html to pdf example, have a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really awesome! Could you either add the canvg example oder remove the "Canvg" button?
@@ -0,0 +1,15 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't think we should check in the .vscode files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure will change that
@HackbrettXXX I'll try to add a Canvg example by next week |
Alright, thanks ;) |
Hey @HackbrettXXX , I am trying the canvg example, and using the method `
` However, I'm getting an error when I pass |
I think you should pass the |
Any progress? |
PR addressed towards #2930
Change -
Added an Angular Example in
/Examples/Angular