Search Posts

Category: jspdf

convert the ‘svg’ to ‘jpg’ or ‘png’ //angularjs [duplicate]

This question already has an answer here: Convert SVG to image (JPEG, PNG, etc.) in the browser 5 answers I’m working with angularjs, in the response I receive an img but as’svg’ and I used a ‘jspdf’ library to download the img but is not supporting the ‘svg’ it just accept ‘png’, ‘jepg’ or ‘jpg’. so I need your help to find a way to convert the ‘svg’ to ‘jpg’ or ‘png’ all suggestion would […]

How to convert pdf file into base64 encoded string in ionic 1?

The mobile application is developed with ionic 1 which uses angularJs. The existing application generates pdf files for selected images but what is needed is to add images to existing pdf file. Images are converted to base64 string and generated pdf with JSPDF. Select images from local storage $scope.addImages = function (options) { var options = { quality: 10, destinationType: Camera.DestinationType.FILE_URI, sourceType: Camera.PictureSourceType.PHOTOLIBRARY, allowEdit: true, encodingType: Camera.EncodingType.JPEG, targetWidth: 1024, targetHeight: 768, popoverOptions: CameraPopoverOptions }; $cordovaCamera.getPicture(options).then(function(imageData) […]

Empty rows when creating pdf using jsPDF and jsPDF autotable

I am creating a pdf file using jsPDF and jsPDF autotable but the created pdf file is empty. There are no errors, I have checked the rows if empty but they are not. I do not know why its empty when it is 43-pages long the pdf file generated here is my code: $scope.export = function(){ var columns = [“Name”, “Cellphone”, “Work Phone”]; var rows = []; for (var i = 0; i < $; […]

trying to modify the js function so that it gives the same output as it was when called the other js function

I am exporting the content on the webpage to the PDF file, for this i have used jsPDF API and i could able to get it work but now i want to use html2PDF as it resolves few issues which were faced when using jsPDF API. I have written the function $scope.exportUsingJSPDF which is called when the button Export Using JSPDF is clicked. Similarly i want to implement the function $scope.exportUsingHTML2PDF which uses html2PDF API […]

canvas plugin not installed – exception

I want to export the content into PDF, for this i’m using html2PDF. When user click on export button, i want to export the content into PDF and download the PDF. I have large content in the div which i am getting dynamically. I am getting exception when clicked on export button. Exception below: jsPDF canvas plugin not installed. Please find the demo plunker: Below is the code demo: var app = angular.module(“app”, []); […]

showing SCRIPT5:Access is denied exception, when trying to download a PDF onclick on a button in IE11

I am trying to export the content to the PDF and download the PDF when user click on a button. Please find the demo here : When user click on export button in the above show demo , content is exported to the PDF and a PDF is downloaded. I see two issues. First issue is when user click on export button, the download of PDF is not working when tested in IE11 but […]

unable to hide the div’s for each iteration and want to hide the border being displayed

When user click on export button, the data is exported to PDF. I’m trying to hide one of the div content while exporting to PDF. Below is the code i have used to hide the div content. $(“#dontExport1”).hide(); When the .hide() is used data is hidden on PDF and webpage too, so i have used $(“#dontExport1”).show() after generating and saving the PDF to display the hidden content again on webpage. Issue is with my code, […]

special characters are not being exported to PDF

I am using jspdf to export the data to PDF. When the data is exported to the PDF, special characters are not displayed in the PDF. Please find the demo plunker : In the above demo plunker, when user click on export button, the content is exported to the PDF and PDF is downloaded but issue is i noticed special characters are not being exported to the PDF. The bullets and the numbers mentioned […]

Show each item in different pages with jsPDF export

I have a list of object, while getting each element of the object, I want to export each to individual pages inside the PDF. I am getting the data by iterating the list object(eg. $scope.employees). Currently when a user clicks on export button, the data is exported to the PDF. My requirement is each object while iterating should be stored in the individual pages of the PDF. Like for example the object with pageHeader “This […]

using jsPDF i want to export content from within js code instead of loading the entire div

I am working on java and angularjs application. I want to work with jsPDF to export data into PDF. I can able to succesfully use jsPDF to export the data when user click on the button. Please find the demo : In the above demo plunker, when user click on PDF button, i’m calling demoFromHTML() in which the content of the entire div with id=”exportthis” is exported. Please advice how to export the data […]

Next Page »