question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Draft] Release Notes for jsPDF 1.4.2

See original GitHub issue

The important stuff:

  • there are now 4 javascript files distributed, the classic two: jspdf.debug.js and jspdf.min.js. New are jspdf.node.debug.js and jspdf.node.js. The node version has no included node modules. Despite this, jspdf.debug.js has as before not included html2canvas.
  • TTFFonts should now be better supported
  • putStream is now refactored. Because some people use putStream in internal functions-set for their plugins, despite it is not an API, please be careful
  • API.internal.pageSize.width and .height are again working.
  • we have now a new html-method, depending on html2canvas and our context2d-module
  • fromHTML and addHTML are not supported anymore. See below
  • Documentation is now up to date (as far as possible)
  • compression now works

We will not support any longer fromHTML and addHTML.

Explaination: This means, we wont add any changes to this two plugins. You are free to submit PullRequests, but we will not invest more time in these two plugins. We have now a new .html method, based on html2canvas and our canvas2d plugin - based on the html2pdf-Plugin by @eKoopmans . This plugin will be mantained in the future. . This should lead to more reliable results for your projects. And it will give us the time to focus on the core functionality of pdf-generation because we will not use our energy for writing/supporting/extending 2 html plugins. If you still want to use addHTML or fromHTML as they are still in jspdf. But if some changes break those plugins, you can still use jsPDF 1.4.1, which has a stable version for both plugins.

ChangeLog:

  • 3ce138f minor changes in acroform.js to work properly with polyfills
  • 33a3089 Fix AcroForm Print Bug
  • a483c9b setFont(): warn if font is not found
  • c0fa3ce add a font converter
  • bcf14ed fix for #1876 Uint8Array AddImage Support
  • 88f7d07 set default DV in acroform.js to null
  • 48ca33c restructure build files
  • b6b175a modify jsPDF to handle latest html2canvas version, remove html2canvas and Stackblur from project and make it an external dependency
  • 2af8438 modify context2d-plugin to work like a real 2d-context
  • 511afdd 4bd7d5c refactor context2d-plugin
  • 87fd3f2 deprecate fromHTML and addHTML, add html-plugin, which is based on html2canvas and solution of @eKoopmans
  • 1449e14 Bugfix/dataurl validation addimage
  • f6f5c36 putTotalPages works now with customfonts
  • 1449e14 bugfix dataurl validation in addimage
  • f251457 small changes in cell.js, add more documentation
  • 970b03d Restructure doc generation and add more documentation
  • 1019eca major refactoring of jspdf.js, add alot of unit testing
  • c53beb6 Font Dictionary now has toUnicode entry to be able to copy paste out from pdf viewer, thanks to @zhangchen0514
  • 5c489f1 bugfix in addimage.js generateAliasFromData had problem with ArrayBuffers
  • ade1227 FlateEncode, ASCIIHexencode and compression is not working
  • 0890ad5 Fix TTF Fonts Not Working when indexToLocFormat is 0, thanks to @briandevet
  • d8b698c Modify addimage.js so that the validations are done when conversions throw errors (increases performance)
  • ccb4519 acroform-methods sometimes overwrite existing javascript functions like Button() in sharepoint, if one of those methods are in the global scope, jsPDF wont overwrite the those methods anymore and will show a warning in console.log.
  • 1ea40e4 added a bidiEngine to jsPDF. now there is no necessity for an lang: ‘ar’ flag in .text-method, it will be solved automatically
  • 42e0564 completely refactored acroform.js (again). now acroform classes have better attributess and methods. it is now documented too.
  • cd4b710 annotations.js got refactored, now acroform-elements and annotations can be used at the same time
  • 8f33f4b new folder structure. put sourceode into src-folder. Thus should result into less confusion, because before people were sometimes using jspdf.js and complained about non-working methods, but it was because they should have used dist/jspdf.debug.js or min.js and some minor stuff, which we forgot to mention
  • d66d52b Add UserUnit option and limit pages to 14400x14400 UserUnits according to PDF Reference
  • b1704fa fix invalid typecheck in acroform.js for attribute maxLength, thx to @samlanning
  • 59ca71d add baseline option to API.text
  • be04de1 addimage.js now loads png-images directly and doesnt process them through canvas, Image-Elements of Browser-DOM now load directly the files
  • d3e1dba pages can have now artBox, bleedBox, cropBox, trimBox - values, internal processing of mediaBox is changed, still needs proper API methods
  • 65bba3c Correct the documentation in jspdf.js, thx to @silvioprog
  • 45dbf21 improve version handling while building the distribution, thx to @bwl21
  • 68b41fb add miterLimit functionality to pdf and context2d

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Uzlopakcommented, Dec 18, 2018

A snapshot of jsPDF 1.4.2 for testing purposes

jsPDF-1.4.2-beta-snapshot.zip

1reaction
Uzlopakcommented, Nov 1, 2018

@zhangchen0514 merged it, thank you 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Draft] Release Notes for jsPDF 1.4.2 · Issue #1819 - GitHub
New are jspdf.node.debug.js and jspdf.node.js. The node version has no included node modules. Despite this, jspdf.debug....
Read more >
jspdf - npm
PDF Document creation from JavaScript. Latest version: 2.5.1, last published: a year ago. Start using jspdf in your project by running `npm ...
Read more >
Draft 1.4.2 - AWS Thinkbox - Documentation
This build requires a new version 1.4 license. Please contact sales@thinkboxsoftware.com for an updated Draft 1.4 license file. Compatibility.
Read more >
jsPDF - Documentation - GitHub Pages
A library to generate PDFs in client-side JavaScript. You can catch me on twitter: @MrRio or head over to my company's website for...
Read more >
installing jspdf using npm command - angular - Stack Overflow
there is a problem with the latest version 1.5.3. try installing a previous version. It worked for me: npm install jspdf@1.4.1 --save.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found