How to reproduce:
Go to the demo page and do this (http://raw.githack.com/MrRio/jsPDF/master/):
// Don't forget, that there are CORS-Restrictions. So if you want to run it without a Server in your Browser you need to transform the image to a dataURL
// Use http://dataurl.net/#dataurlmaker
var doc = new jsPDF({
orientation: 'p',
unit: 'px',
format: [16, 9.5]
})
doc.setFontSize(40);
doc.text("Octonyan loves jsPDF", 35, 25);
doc.addImage('examples/images/Octonyan.jpg', 'JPEG', 15, 40, 180, 180);
When you set a custom page size, it bugs out and does not work correctly and the page is very very tiny. Even if you bump up the values significantly so you can see the page, no text is rendered and the page is blank.
That makes a page of size 16x9.5 pixels, which is tiny so that's to be expected. It does look like it's not taking the unit into account correctly so I tried the above using the master source and the sizing seems to be working correctly, try cloning the repo and running npm run build then npm start to get a local copy of the live demo to try it with. Bear in mind that the size in your example should be tiny.
Regarding the image not showing there seems to be a problem it grabbing the image since the change to rawgit, take a look at this to see what you can input instead to get the image to show. The comment on the example code // Don't forget, that there are CORS-Restrictions. So if you want to run it without a Server in your Browser you need to transform the image to a dataURL mentions that there's an issue with the image and it causes the pdf not to render
Try it in inches as well - same result:

I downgraded to 1.3.5 and it is working fine, but it I wanted to report it since I can no longer update this dependency to the latest version.
Yes it doesn't seem to work but if you try with the most recent code it looks like it works, would you be able to try it there?
Found the other issue: #2152 and the pull request: #2200
So this should be fixed for the next release
Thanks for pointing that out.
This is a pretty major issue though and it has been four months since it
was discovered and fixed.
I'll have to stick with the old version for now.
I appreciate your time and assistance with this.
On Wed, May 8, 2019, 9:21 AM Conor Smyth notifications@github.com wrote:
Found the other issue: #2152 https://github.com/MrRio/jsPDF/issues/2152
and the pull request: #2200 https://github.com/MrRio/jsPDF/pull/2200So this should be fixed for the next release
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MrRio/jsPDF/issues/2452#issuecomment-490483045, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AC2ZYX6MO73TDNOO3AOIIW3PULHV3ANCNFSM4HLDOL5A
.
It was working with version 1.4.1,
but now not even working in that version. nor 1.3.5.
the only thing i have updagraded is the angular version, to the latest, and this stops working
Damn, tried to use this package - and not even the first line worked without problems :P So I agree it's a major issue.
Any idea when the fixed version will be released?
I'd suggest building your own copy of jspdf to use in the meantime, it's a simple build!
I think the solution is really to just release the new build with these already fixed bugs. If there is anything I can do to help the process let me know.
Exactly
Exactly
With Exactly you mean you will release a new version or we should build our own copy? Thank you!
It is fixed and new build should be released
Hi @Uzlopak . Is there any update on the build for this fix?
Most helpful comment
It is fixed and new build should be released