This worked for me in Angular 2:
var img = new Image()
img.src="https://stackoverflow.com/questions/19065562/assets/sample.png"
pdf.addImage(img, 'png', 10, 78, 12, 15)
jsPDF version 1.5.3
assets directory is in src directory of the Angular project root
More Related Contents:
- How can I modify with css an image appended with javascript?
- how to resize responsive image up and down
- How do I make two images fade in/out repeatedly? [closed]
- Check if an image is loaded (no errors) with jQuery
- Changing the image source using jQuery
- Asynchronously load images with jQuery
- How to resize images proportionally / keeping the aspect ratio?
- How to properly use jsPDF library
- How do you cache an image in Javascript
- How to load all the images from one of my folder into my web page, using Jquery/Javascript
- In Bootstrap open Enlarge image in modal
- Disable dragging an image from an HTML page
- Load image with jQuery and append it to the DOM
- Export HTML page to PDF on user click using JavaScript
- How do I abort image load requests without using window.stop()
- JavaScript: Know when an image is fully loaded
- Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
- Get image width and height from the Base64 code in JavaScript
- How to get the image size (height & width) using JavaScript
- Sort by image resolution in gallery
- jQuery resize to aspect ratio
- how to use html2canvas and jspdf to export to pdf in a proper and simple way
- jQuery, JavaScript, HTML: how to load images after everything else is loaded?
- jQuery fade to new image
- Center an Image vertically and horizontally using CSS
- canvas- Cropping images in different shapes
- Dynamically replace img src attribute with jQuery
- How do I get natural dimensions of an image using JavaScript or jQuery?
- Remove selected file(s) before upload with Javascript
- Crop image white space automatically using jQuery