I've 2 questions my project is in ANGULAR 5.
Am looking for a way to generate HTML to PDF. Generated pdf shouldn’t be an image. It should be like the Actual PDF user can copy text etc.
Note: please don't suggest jsPdf
.
Another approach is am looking for a way to send the whole HTML with inserted values to an Endpoint. The Html I am trying to send is Only content editable divs.
How can I do this?
Help and suggestion would be appreciated. THanks
Angular 12/11 Convert HTML into PDF Tutorial with Example. 1 Step 1 – Create New Angular App. 2 Step 2 – Install Package. 3 Step 3 – Add Code on View File. 4 Step 4 – Add Code On Component ts File. 5 Step 5 – Start Angular App. More items
Now to use this files in angular component or service add below import statement on top of component/service PDFMake follows a declarative approach. It basically means, you’ll never have to calculate positions manually or use commands like
So, open your terminal and execute the following command: npm install --save pdfmake npm install html-to-pdfmake npm install jspdf --save In this step, create a table and display data on it to convert it to pdf file. So, visit src/app/app.component.html and update the following code into it:
Generate PDF files in client-side JavaScript. Open the app.component.html file and add the code in it. Open the app.component.ts file and add the code in it. When you hire Angular developers in India, you get a lot of advantages. Hire our Angular developers to create a competitive e-commerce app for you.
You have also this:
https://github.com/moshensky/html-to-pdf-converter
But in my opinion the best way is to send just the data you want to format to a backend service and format it in the backend.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With