Client-side JavaScript PDF generation for everyone.

Related tags

Files hacktoberfest
Overview

jsPDF

Build Status Code Climate Test Coverage GitHub license Total alerts Language grade: JavaScript Gitpod ready-to-code

A library to generate PDFs in JavaScript.

You can catch me on twitter: @MrRio or head over to my company's website for consultancy.

jsPDF is now co-maintained by yWorks - the diagramming experts.

Live Demo | Documentation

Install

Recommended: get jsPDF from npm:

npm install jspdf --save
# or
yarn add jspdf

Alternatively, load it from a CDN:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.3.1/jspdf.umd.min.js"></script>

Or always get latest version via unpkg

<script src="https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js"></script>

The dist folder of this package contains different kinds of files:

  • jspdf.es.*.js: Modern ES2015 module format.
  • jspdf.node.*.js: For running in Node. Uses file operations for loading/saving files instead of browser APIs.
  • jspdf.umd.*.js: UMD module format. For AMD or script-tag loading.
  • polyfills*.js: Required polyfills for older browsers like Internet Explorer. The es variant simply imports all required polyfills from core-js, the umd variant is self-contained.

Usually it is not necessary to specify the exact file in the import statement. Build tools or Node automatically figure out the right file, so importing "jspdf" is enough.

Usage

Then you're ready to start making your document:

import { jsPDF } from "jspdf";

// Default export is a4 paper, portrait, using millimeters for units
const doc = new jsPDF();

doc.text("Hello world!", 10, 10);
doc.save("a4.pdf");

If you want to change the paper size, orientation, or units, you can do:

// Landscape export, 2×4 inches
const doc = new jsPDF({
  orientation: "landscape",
  unit: "in",
  format: [4, 2]
});

doc.text("Hello world!", 1, 1);
doc.save("two-by-four.pdf");

Running in Node.js

const { jsPDF } = require("jspdf"); // will automatically load the node version

const doc = new jsPDF();
doc.text("Hello world!", 10, 10);
doc.save("a4.pdf"); // will save the file in the current working directory

Other Module Formats

AMD
require(["jspdf"], ({ jsPDF }) => {
  const doc = new jsPDF();
  doc.text("Hello world!", 10, 10);
  doc.save("a4.pdf");
});
Globals
const { jsPDF } = window.jspdf;

const doc = new jsPDF();
doc.text("Hello world!", 10, 10);
doc.save("a4.pdf");

Optional dependencies

Some functions of jsPDF require optional dependencies. E.g. the html method, which depends on html2canvas and, when supplied with a string HTML document, dompurify. JsPDF loads them dynamically when required (using the respective module format, e.g. dynamic imports). Build tools like Webpack will automatically create separate chunks for each of the optional dependencies. If your application does not use any of the optional dependencies, you can prevent Webpack from generating the chunks by defining them as external dependencies:

// webpack.config.js
module.exports = {
  // ...
  externals: {
    // only define the dependencies you are NOT using as externals!
    canvg: "canvg",
    html2canvas: "html2canvas",
    dompurify: "dompurify"
  }
};

In Vue CLI projects, externals can be defined via the configureWebpack or chainWebpack properties of the vue.config.js file (needs to be created, first, in fresh projects).

In Angular projects, externals can be defined using custom webpack builders.

In React (create-react-app) projects, externals can be defined by either using react-app-rewired or ejecting.

TypeScript/Angular/Webpack/React/etc. Configuration:

jsPDF can be imported just like any other 3rd party library. This works with all major toolkits and frameworks. jsPDF also offers a typings file for TypeScript projects.

import { jsPDF } from "jspdf";

You can add jsPDF to your meteor-project as follows:

meteor add jspdf:core

Polyfills

jsPDF requires modern browser APIs in order to function. To use jsPDF in older browsers like Internet Explorer, polyfills are required. You can load all required polyfills as follows:

import "jspdf/dist/polyfills.es.js";

Alternatively, you can load the prebundled polyfill file. This is not recommended, since you might end up loading polyfills multiple times. Might still be nifty for small applications or quick POCs.

<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.3.1/polyfills.umd.js"></script>

Use of Unicode Characters / UTF-8:

The 14 standard fonts in PDF are limited to the ASCII-codepage. If you want to use UTF-8 you have to integrate a custom font, which provides the needed glyphs. jsPDF supports .ttf-files. So if you want to have for example Chinese text in your pdf, your font has to have the necessary Chinese glyphs. So, check if your font supports the wanted glyphs or else it will show garbled characters instead of the right text.

To add the font to jsPDF use our fontconverter in /fontconverter/fontconverter.html. The fontconverter will create a js-file with the content of the provided ttf-file as base64 encoded string and additional code for jsPDF. You just have to add this generated js-File to your project. You are then ready to go to use setFont-method in your code and write your UTF-8 encoded text.

Alternatively you can just load the content of the *.ttf file as a binary string using fetch or XMLHttpRequest and add the font to the PDF file:

const doc = new jsPDF();

const myFont = ... // load the *.ttf font file as binary string

// add the font to jsPDF
doc.addFileToVFS("MyFont.ttf", myFont);
doc.addFont("MyFont.ttf", "MyFont", "normal");
doc.setFont("MyFont");

Advanced Functionality

Since the merge with the yWorks fork there are a lot of new features. However, some of them are API breaking, which is why there is an API-switch between two API modes:

  • In "compat" API mode, jsPDF has the same API as MrRio's original version, which means full compatibility with plugins. However, some advanced features like transformation matrices and patterns won't work. This is the default mode.
  • In "advanced" API mode, jsPDF has the API you're used from the yWorks-fork version. This means the availability of all advanced features like patterns, FormObjects, and transformation matrices.

You can switch between the two modes by calling

doc.advancedAPI(doc => {
  // your code
});
// or
doc.compatAPI(doc => {
  // your code
});

JsPDF will automatically switch back to the original API mode after the callback has run.

Support

Please check if your question is already handled at Stackoverflow https://stackoverflow.com/questions/tagged/jspdf. Feel free to ask a question there with the tag jspdf.

Feature requests, bug reports, etc. are very welcome as issues. Note that bug reports should follow these guidelines:

  • A bug should be reported as an mcve
  • Make sure code is properly indented and formatted (Use ``` around code blocks)
  • Provide a runnable example.
  • Try to make sure and show in your issue that the issue is actually related to jspdf and not your framework of choice.

Contributing

jsPDF cannot live without help from the community! If you think a feature is missing or you found a bug, please consider if you can spare one or two hours and prepare a pull request. If you're simply interested in this project and want to help, have a look at the open issues, especially those labeled with "bug".

You can find information about building and testing jsPDF in the contribution guide

Credits

  • Big thanks to Daniel Dotsenko from Willow Systems Corporation for making huge contributions to the codebase.
  • Thanks to Ajaxian.com for featuring us back in 2009.
  • Our special thanks to GH Lee (sphilee) for programming the ttf-file-support and providing a large and long sought after feature
  • Everyone else that's contributed patches or bug reports. You rock.

License (MIT)

Copyright (c) 2010-2020 James Hall, https://github.com/MrRio/jsPDF (c) 2015-2020 yWorks GmbH, https://www.yworks.com/

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • Update rollup to the latest version 🚀

    Update rollup to the latest version 🚀

    The devDependency rollup was updated from 1.12.1 to 1.12.3.

    This version is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


    Release Notes for v1.12.3

    2019-05-19

    Bug Fixes

    • Prevent duplicate imports when exports are reexported as default exports (#2866)

    Pull Requests

    Commits

    The new version differs by 12 commits.

    • 455e994 1.12.3
    • c72da4a Update changelog
    • 9f84980 Properly deduplicate reexported default exports (#2866)
    • 0655489 Update changelog
    • 65b6aef Enable TypeScript strictNullChecks (#2755)
    • a4fbc53 1.12.2
    • 968cb2a Update changelog
    • 72f2e81 Cache transitive reexport detection (#2864)
    • 020e87f Update changelog
    • 7aaec61 Declare processConfigsErr before use (#2858)
    • 6a79bc1 keep nested exports with preserveModules (#2854) (#2863)
    • 7e3225f Fix date in changelog

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 123
  • Update pdfjs-dist to the latest version 🚀

    Update pdfjs-dist to the latest version 🚀

    Version 2.0.95 of pdfjs-dist was just published.

    Dependency pdfjs-dist
    Current Version 2.0.91
    Type devDependency

    The version 2.0.95 is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

    It might be worth looking into these changes and trying to get this project onto the latest version of pdfjs-dist.

    If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


    Commits

    The new version differs by 1 commits.

    • 8c1edbe PDF.js version 2.0.95 - See mozilla/pdf.js@99b62fe3d45571792b977302d046aa6cc75f4655

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 118
  • file-saver package-lock method requires ssh to github

    file-saver package-lock method requires ssh to github

    Thank you for submitting an issue to jsPDF. Please read carefully.

    Are you using the latest version of jsPDF? I had to rollback to 1.4.1 because of this bog

    Have you tried using jspdf.debug.js?

    Steps to reproduce just compile from somewhere you don't have direct ssh access to github

    Ideally a link too. Try fork this http://jsbin.com/rilace/edit?html,js,output

    What I saw

    15:49:10 npm ERR! Error while executing:
    15:49:10 npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/eligrey/FileSaver.js.git
    15:49:10 npm ERR!
    15:49:10 npm ERR! ssh: Could not resolve hostname github.com: Name or service not known
    15:49:10 npm ERR! fatal: Could not read from remote repository.
    15:49:10 npm ERR!
    15:49:10 npm ERR! Please make sure you have the correct access rights
    15:49:10 npm ERR! and the repository exists.
    15:49:10 npm ERR!
    15:49:10 npm ERR! exited with error code: 128
    

    What I expected No ssh git access, only https method

    My analysis Not an npm expert but i saw this change btw 1.4.1 and 1.5.3 and 1.5.3 does'nt seem standard : in package-lock.json: 1.4.1

        "file-saver": {
          "version": "1.3.8",
          "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-1.3.8.tgz",
          "integrity": "sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg=="
        },
    
        "file-saver": {
         "version": "github:eligrey/FileSaver.js#e865e37af9f9947ddcced76b549e27dc45c1cb2e",
         "from": "github:eligrey/FileSaver.js#1.3.8"
        },
    

    npmjs.org registry should probably be used instead of github ? this is the only package using this method.

    Bug Fixed 
    opened by rhanka 80
  • addHTML image quality

    addHTML image quality

    When I use rasterizeHTML to render the page as a canvas, then use jsPDF's addHTML, the image quality is variable.

    If I don't use the option "pagesplit", it renders one PDF page in good quality. If I set pagesplit to true, then it renders the entire page but the image quality on each page is dramatically reduced.

    Also, I found that the default code was stretching or compressing the images. I made some changes to the code. This is the code from line 1779.

    var crop = function() {
                        var cy = 0;
                        while(1) {
                            var canvas = document.createElement('canvas');
                            canvas.width = Math.min(W*K,obj.width);
                            canvas.height = Math.min(H*K,obj.height-cy);
                            var ctx = canvas.getContext('2d'),
                                scaledHeight = obj.height * canvas.width / obj.width;
                            ctx.drawImage(obj, 0, cy, obj.width, obj.height, 0, 0, canvas.width, scaledHeight);
                            var args = [canvas, x,cy?0:y,canvas.width/K,canvas.height/K, format,null];
                            this.addImage.apply(this, args);
                            cy += (obj.width * (canvas.height / canvas.width));
                            if(cy >= obj.height) break;
                            this.addPage();
                        }
                        callback(w,cy,null,args);
                    }.bind(this);
    

    Basically, I added 'scaledHeight' so the drawImage height is normal, then I changed the 'cy' amount.

    I also checked already, bypassing the part where it takes the canvas and does .toDataUrl('image/png') does not improve the image quality.

    Improvement Discussion addhtml.js 
    opened by bpmckee 70
  • ES6 import doesn't work in versions 1.5.1 and 1.5.2

    ES6 import doesn't work in versions 1.5.1 and 1.5.2

    I'm trying to import jspdf into my Vuejs application. But looks like it imports function RGBColor instead of the the module.

    Are you using the latest version of jsPDF? Yes

    Have you tried using jspdf.debug.js? Yes

    Steps to reproduce

    import jsPDF from 'jspdf/dist/jspdf.debug';
    console.log(jsPDF);
    

    or

    import * as jsPDF from 'jspdf/dist/jspdf.debug';
    console.log(jsPDF);
    

    What I saw Output in versions 1.5.1 and 1.5.2:

    RGBColor()
    ​  length: 1
    ​  name: "RGBColor"
      ​prototype: Object { … }
    ​  __proto__: function ()
    

    What I expected Output in 1.4.1:

    jsPDF()
      ​API: Object { events: (13) […], addField: addField(), addButton: addButton(), … }
    ​  length: 4
    ​  name: "jsPDF"
    ​  prototype: Object { … }
    ​  saveAs: function saveAs()
    ​  version: "0.0.0"
    ​  __proto__: function ()
    

    Is something wrong with my setup?

    My env:

    $ vue info
    
    Environment Info:
    
      System:
        OS: Windows 7
        CPU: (4) x64 Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
      Binaries:
        Node: 8.11.3 - C:\Programs\Devel\node\node.EXE
        Yarn: Not Found
        npm: 6.5.0 - C:\Programs\Devel\node\npm.CMD
      npmPackages:
        @vue/babel-preset-app:  3.2.0
        @vue/cli-overlay:  3.2.0
        @vue/cli-plugin-babel: ^3.2.0 => 3.2.0
        @vue/cli-plugin-eslint: ^3.2.0 => 3.2.1
        @vue/cli-service: ^3.2.0 => 3.2.0
        @vue/cli-shared-utils:  3.2.0
        @vue/component-compiler-utils:  2.3.1
        @vue/eslint-config-airbnb: ^4.0.0 => 4.0.0
        @vue/preload-webpack-plugin:  1.1.0
        @vue/web-component-wrapper:  1.2.0
        babel-helper-vue-jsx-merge-props:  2.0.3
        babel-plugin-transform-vue-jsx:  4.0.1
        eslint-plugin-vue: ^5.0.0-0 => 5.0.0
        vue: ^2.5.17 => 2.5.21
        vue-eslint-parser:  2.0.3
        vue-hot-reload-api:  2.3.1
        vue-loader:  15.4.2
        vue-style-loader:  4.1.2
        vue-template-compiler: ^2.5.17 => 2.5.21
        vue-template-es2015-compiler:  1.6.0
      npmGlobalPackages:
        @vue/cli: Not Found
    
    Bug 
    opened by vzhikness 69
  • New html-method

    New html-method

    Existing jsPDF plugins

    Hi, I've been working on a new html2pdf package that uses html2canvas + jsPDF to convert HTML content to PDF. I know there are already three existing jsPDF plugins for HTML: addHTML, fromHTML, and html2pdf (same name). I don't want to step on any toes - from what I can tell:

    • fromHTML is the oldest plugin and renders the HTML directly to PDF (which is great), but its support for complex HTML/CSS is lacking.
    • addHTML is newer (but now deprecated) and uses html2canvas/rasterizeHTML to create a canvas, then puts the image onto the PDF page. Current state is described at #944.
    • html2pdf: I haven't found much info (apart from the demo), but it looks like it renders directly to PDF like fromHTML, which again is great but runs the risk of poor HTML/CSS support.

    New html2pdf package

    My html2pdf package takes the same approach as addHTML - I convert to a canvas with html2canvas, split that image up into pages, and attach each image onto its own PDF page. I believe it has some advantages over the jsPDF plugins:

    • Easier to use - creating a PDF from an HTML element/page/string is one line: html2pdf(element);
    • Fits content to the page - it copies the HTML first into an (invisible) container div with the PDF page width, so that content can resize appropriately (also working on a 'shrink-to-page' option)
    • Supports page-breaks - a feature that comes up a lot, i.e. #190
    • Is external - it keeps the logic separate and can respond more readily to updates in both repos (including html2canvas internally in jsPDF causes some problems)
    • Is external (disadvantage) - it can't be used inline with other jsPDF commands the way the current plugins are - it's a standalone package that creates and closes the PDF.

    Open issues

    That said, I've found 48 open issues on jsPDF that I think html2pdf could resolve, but I don't want to start pushing html2pdf if it conflicts with jsPDF's internal implementations. @MrRio @Flamenco I'd appreciate your feedback!

    Discussion html.js no-issue-activity 
    opened by eKoopmans 68
  • addImage produces an blur or too low quality image in the pdf

    addImage produces an blur or too low quality image in the pdf

    I am using the latest version of jsPDF 1.2.61, While adding an image it adds an blur image even though the image is of high quality, if I the same base64 in on-line decoder it produces the perfect image as the original, but the base64 produces low quality when I use addImage functionality of jsPDF.

    Snippet:

    var doc = new jsPDF('landscape'); var Imagebase64=null; doc.setFontSize(20); doc.text(35, 25, "GoodYear"); var Imagebase64='data:image/jpeg;base64,/'; doc.addImage(imagePath, 'jpeg',0, 5, 210, 35); doc.save("mypdf.pdf");

    Bug addimage.js 
    opened by Balaji-Gopal 61
  • jsPDF AMD version doesn't compile Adler32 dependancy correctly

    jsPDF AMD version doesn't compile Adler32 dependancy correctly

    When using requireJs to import jspdf.amd.min.js the imported object didn't look anything like jspdf.

    It turns out that the build script must be simply wrapping the adler32 module inside of the jspdf module. The adler32 module contains a define call which gets called before the define call for jspdf and gets used in the place of the jspdf define call.

    opened by cwohlman 58
  • Update pdfjs-dist to the latest version 🚀

    Update pdfjs-dist to the latest version 🚀

    Version 1.8.587 of pdfjs-dist just got published.

    Dependency pdfjs-dist
    Current Version 1.8.585
    Type devDependency

    The version 1.8.587 is not covered by your current version range.

    Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.

    I recommend you look into these changes and try to get onto the latest version of pdfjs-dist. Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.


    Commits

    The new version differs by 1 commits.

    • e1869c7 PDF.js version 1.8.587 - See mozilla/pdf.js@ec916566d7c4a8332abb466efb5f1b697df40bfe

    See the full diff

    Not sure how things should work exactly?

    There is a collection of frequently asked questions and of course you may always ask my humans.


    Your Greenkeeper Bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 57
  • addImage documentation

    addImage documentation

    I have a screenshot image taken from an HTML5 Canvas. It may be taller than one page or span the equivalent of multiple pages in the PDF. How do I set the addImage options so that it will use the actual height of the canvas? I tried using canvas width and height, but it just zooms and blurs.

    I can't find any documentation on jsPDF addImage() to see if there is a way to adjust the options to have a single image with a height that adjusts.

    Here is my code

    var element = $('#report');
            html2canvas(element, {
                onrendered: function(canvas) {
                    var doc = new jsPDF('landscape');
                    var dataUrl = canvas.toDataURL('image/jpeg');
                    doc.addImage(dataUrl,0,0,canvas.width,canvas.height);
                    doc.save('MeterPhotosReport.pdf');   
                }
            });
    

    Thanks, Don

    opened by doubletaketech 56
  •  jspdf justify arabic text

    jspdf justify arabic text

    I have an issue with justifying Arabic I add algin "right" it work with me but there is small issue the last line not fit with paragraph @arasabbasi

    Wontfix no-issue-activity 
    opened by saadss1990 50
  • autoSize wraps header if cell values are too small

    autoSize wraps header if cell values are too small

    I have read and understood the contribution guidelines.

    At some fontsizes, the text in the header cell is wrapped, even if autoSize is set to true.

    var doc = new jsPDF();
    
    const header = ["VAT"];
    const rows = [{VAT: "7%"}, {VAT: "7%"}];
    doc.table(5, 15, rows, header, { autoSize: true, printHeaders: true, fontSize: 12 });
    

    The minmal example can be pasted to https://raw.githack.com/MrRio/jsPDF/master/index.html

    image
    opened by JarnoRFB 0
  • Couldn't find a correct font for Chinese that will support also Japanese and will not squeeze English characters

    Couldn't find a correct font for Chinese that will support also Japanese and will not squeeze English characters

    "I have read and understood the contribution guidelines.". Hi

    First of all, I would like to know if will JsPDF support languages for UTF8 without using custom fonts in the near future.

    I am using a set custom font in JsPDF to show Chinese characters in the PDF file correctly, but the font that I am using from time to time squeezed English characters (in my PDF can be Chinese and English characters together).

    For example: Below, you can see that the custom font shows Chinese characters correctly: Screenshot 2022-12-26 134727

    But below you can see squeezed English characters with the same custom font for Chinese Screenshot 2022-12-26 140619

    Please suggest me a custom font that will support Chinese Traditional/Simplify and Japanese characters and will not squeeze English characters.

    opened by DanielMinasyan 0
  • jsPDF - Error in background image in div in pdf generation.

    jsPDF - Error in background image in div in pdf generation.

    HEAD

    <head>
        <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
            integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
        <style>
            body {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                padding: 40px;
            }
            #previewHtmlContent {
                width: 400px;
                height: 200px;
                background: https://i.stack.imgur.com/8UAs5.jpg center / cover !important;
            }
        </style>
    </head>
    

    BODY

    <div id="previewHtmlContent">
        Content PDF
    </div>
    
    <hr />
    <button onclick="converHTMLToPDF()" class="btn btn-primary">Create PDF</button>
    
    <script src="https://html2canvas.hertzen.com/dist/html2canvas.js"></script>
    <script src="https://code.jquery.com/jquery-3.6.3.js"
        integrity="sha256-nQLuAZGRRcILA+6dMBOvcRh5Pe310sBpanc6+QBmyVM=" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
        crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
    

    FUNCTION

    // Function to convert HTML to PDF
    function converHTMLToPDF() {
        const { jsPDF } = window.jspdf;
        var pdf = new jsPDF('p', 'px', [793.706, 1122.52]);
        var pdfjs = document.querySelector('#previewHtmlContent');
    
        pdf.html(pdfjs, {
            callback: function (pdf) {
                pdf.save("file.pdf");
            },
            x: 1,
            y: 1
        });
    }
    

    jsPDF - When adding an image to the background of a div. When generating the pdf, the div with the background image turns black.

    The html with the background image in a div.

    The pdf generated from the function.

    opened by jefter-dev 0
  • The symbol

    The symbol "Vt" has already been declared

    errors: [ { detail: undefined, id: '', location: { column: 40507, file: 'node_modules/.pnpm/[email protected]/node_modules/jspdf/dist/jspdf.es.min.js', length: 2, line: 236, lineText: ' */function te(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function ee(t){function e(t){if(!t)throw Error("assert :P")}function r(t,e,r){for(var n=0;4>n;n++)if(t[e+n]!=r.charCodeAt(n))return!0;return!1}function n(t,e,r,n,i){for(var a=0;a<i;a++)t[e+a]=r[n+a]}function i(t,e,r,n){for(var i=0;i<n;i++)t[e+i]=r}function a(t){return new Int32Array(t)}function o(t,e){for(var r=[],n=0;n<t;n++)r.push(new e);return r}function s(t,e){var r=[];return function t(r,n,i){for(var a=i[n],o=0;o<a&&(r.push(i.length>n+1?[]:new e),!(i.length<n+1));o++)t(r[o],n+1,i)}(r,0,t),r}var c=function(){var t=this;function c(t,e){for(var r=1<<e-1>>>0;t&r;)r>>>=1;return r?(t&r-1)+r:t}function u(t,r,n,i,a){e(!(i%n));do{t[r+(i-=n)]=a}while(0<i)}function h(t,r,n,i,o){if(e(2328>=o),512>=o)var s=a(512);else if(null==(s=a(o)))return 0;return function(t,r,n,i,o,s){var h,f,d=r,p=1<<n,g=a(16),m=a(16);for(e(0!=o),e(null!=i),e(null!=t),e(0<n),f=0;f<o;++f){if(15<i[f])return 0;++g[i[f]]}if(g[0]==o)return 0;for(m[1]=0,h=1;15>h;++h){if(g[h]>1<<h)return 0;m[h+1]=m[h]+g[h]}for(f=0;f<o;++f)h=i[f],0<i[f]&&(s[m[h]++]=f);if(1==m[15])return(i=new l).g=0,i.value=s[0],u(t,d,1,p,i),p;var v,b=-1,y=p-1,w=0,N=1,L=1,A=1<<n;for(f=0,h=1,o=2;h<=n;++h,o<<=1){if(N+=L<<=1,0>(L-=g[h]))return 0;for(;0<g[h];--g[h])(i=new l).g=h,i.value=s[f++],u(t,d+w,o,A,i),w=c(w,h)}for(h=n+1,o=2;15>=h;++h,o<<=1){if(N+=L<<=1,0>(L-=g[h]))return 0;for(;0<g[h];--g[h]){if(i=new l,(w&y)!=b){for(d+=A,v=1<<(b=h)-n;15>b&&!(0>=(v-=g[b]));)++b,v<<=1;p+=A=1<<(v=b-n),t[r+(b=w&y)].g=v+n,t[r+b].value=d-r-b}i.g=h-n,i.value=s[f++],u(t,d+(w>>n),o,A,i),w=c(w,h)}}return N!=2*m[15]-1?0:p}(t,r,n,i,o,s)}function l(){this.value=this.g=0}function f(){this.value=this.g=0}function d(){this.G=o(5,l),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Dr,f)}function p(t,r,n,i){e(null!=t),e(null!=r),e(2147483648>i),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=r,t.pa=n,t.Jd=r,t.Yc=n+i,t.Zc=4<=i?n+i-4+1:n,_(t)}function g(t,e){for(var r=0;0<e--;)r|=k(t,128)<<e;return r}function m(t,e){var r=g(t,e);return P(t)?-r:r}function v(t,r,n,i){var a,o=0;for(e(null!=t),e(null!=r),e(4294967288>i),t.Sb=i,t.Ra=0,t.u=0,t.h=0,4<i&&(i=4),a=0;a<i;++a)o+=r[n+a]<<8*a;t.Ra=o,t.bb=i,t.oa=r,t.pa=n}function b(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<Ur-8>>>0,++t.bb,t.u-=8;A(t)&&(t.h=1,t.u=0)}function y(t,r){if(e(0<=r),!t.h&&r<=Tr){var n=L(t)&Rr[r];return t.u+=r,b(t),n}return t.h=1,t.u=0}function w(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function N(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function L(t){return t.Ra>>>(t.u&Ur-1)>>>0}function A(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>Ur}function x(t,e){t.u=e,t.h=A(t)}function S(t){t.u>=zr&&(e(t.u>=zr),b(t))}function _(t){e(null!=t&&null!=t.oa),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(e(null!=t&&null!=t.oa),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function P(t){return g(t,1)}function k(t,e){var r=t.Ca;0>t.b&&_(t);var n=t.b,i=r*e>>>8,a=(t.I>>>n>i)+0;for(a?(r-=i,t.I-=i+1<<n>>>0):r=i+1,n=r,i=0;256<=n;)i+=8,n>>=8;return n=7^i+Hr[n],t.b-=n,t.Ca=(r<<n)-1,a}function I(t,e,r){t[e+0]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=r>>0&255}function F(t,e){return t[e+0]<<0|t[e+1]<<8}function C(t,e){return F(t,e)|t[e+2]<<16}function j(t,e){return F(t,e)|F(t,e+2)<<16}function O(t,r){var n=1<<r;return e(null!=t),e(0<r),t.X=a(n),null==t.X?0:(t.Mb=32-r,t.Xa=r,1)}function B(t,r){e(null!=t),e(null!=r),e(t.Xa==r.Xa),n(r.X,0,t.X,0,1<<r.Xa)}function M(){this.X=[],this.Xa=this.Mb=0}function E(t,r,n,i){e(null!=n),e(null!=i);var a=n[0],o=i[0];return 0==a&&(a=(t*o+r/2)/r),0==o&&(o=(r*a+t/2)/t),0>=a||0>=o?0:(n[0]=a,i[0]=o,1)}function q(t,e){return t+(1<<e)-1>>>e}function D(t,e){return((4278255360&t)+(4278255360&e)>>>0&4278255360)+((16711935&t)+(16711935&e)>>>0&16711935)>>>0}function R(e,r){t[r]=function(r,n,i,a,o,s,c){var u;for(u=0;u<o;++u){var h=t[e](s[c+u-1],i,a+u);s[c+u]=D(r[n+u],h)}}}function T(){this.ud=this.hd=this.jd=0}function U(t,e){return((4278124286&(t^e))>>>1)+(t&e)>>>0}function z(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function H(t,e){return z(t+(t-e+.5>>1))}function W(t,e,r){return Math.abs(e-r)-Math.abs(t-r)}function V(t,e,r,n,i,a,o){for(n=a[o-1],r=0;r<i;++r)a[o+r]=n=D(t[e+r],n)}function G(t,e,r,n,i){var a;for(a=0;a<r;++a){var o=t[e+a],s=o>>8&255,c=16711935&(c=(c=16711935&o)+((s<<16)+s));n[i+a]=(4278255360&o)+c>>>0}}function Y(t,e){e.jd=t>>0&255,e.hd=t>>8&255,e.ud=t>>16&255}function J(t,e,r,n,i,a){var o;for(o=0;o<n;++o){var s=e[r+o],c=s>>>8,u=s,h=255&(h=(h=s>>>16)+((t.jd<<24>>24)*(c<<24>>24)>>>5));u=255&(u=(u=u+((t.hd<<24>>24)*(c<<24>>24)>>>5))+((t.ud<<24>>24)*(h<<24>>24)>>>5));i[a+o]=(4278255360&s)+(h<<16)+u}}function X(e,r,n,i,a){t[r]=function(t,e,r,n,o,s,c,u,h){for(n=c;n<u;++n)for(c=0;c<h;++c)o[s++]=a(r[i(t[e++])])},t[e]=function(e,r,o,s,c,u,h){var l=8>>e.b,f=e.Ea,d=e.K[0],p=e.w;if(8>l)for(e=(1<<e.b)-1,p=(1<<l)-1;r<o;++r){var g,m=0;for(g=0;g<f;++g)g&e||(m=i(s[c++])),u[h++]=a(d[m&p]),m>>=l}else t["VP8LMapColor"+n](s,c,d,p,u,h,r,o,f)}}function K(t,e,r,n,i){for(r=e+r;e<r;){var a=t[e++];n[i++]=a>>16&255,n[i++]=a>>8&255,n[i++]=a>>0&255}}function Z(t,e,r,n,i){for(r=e+r;e<r;){var a=t[e++];n[i++]=a>>16&255,n[i++]=a>>8&255,n[i++]=a>>0&255,n[i++]=a>>24&255}}function $(t,e,r,n,i){for(r=e+r;e<r;){var a=(o=t[e++])>>16&240|o>>12&15,o=o>>0&240|o>>28&15;n[i++]=a,n[i++]=o}}function Q(t,e,r,n,i){for(r=e+r;e<r;){var a=(o=t[e++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;n[i++]=a,n[i++]=o}}function tt(t,e,r,n,i){for(r=e+r;e<r;){var a=t[e++];n[i++]=a>>0&255,n[i++]=a>>8&255,n[i++]=a>>16&255}}function et(t,e,r,i,a,o){if(0==o)for(r=e+r;e<r;)I(i,((o=t[e++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),a+=32;else n(i,a,t,e,r)}function rt(e,r){t[r][0]=t[e+"0"],t[r][1]=t[e+"1"],t[r][2]=t[e+"2"],t[r][3]=t[e+"3"],t[r][4]=t[e+"4"],t[r][5]=t[e+"5"],t[r][6]=t[e+"6"],t[r][7]=t[e+"7"],t[r][8]=t[e+"8"],t[r][9]=t[e+"9"],t[r][10]=t[e+"10"],t[r][11]=t[e+"11"],t[r][12]=t[e+"12"],t[r][13]=t[e+"13"],t[r][14]=t[e+"0"],t[r][15]=t[e+"0"]}function nt(t){return t==Hn||t==Wn||t==Vn||t==Gn}function it(){this.eb=[],this.size=this.A=this.fb=0}function at(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ot(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new it,this.f.kb=new at,this.sd=null}function st(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ct(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ut(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ht(t,e){var r=t.T,i=e.ba.f.RGBA,a=i.eb,o=i.fb+t.ka*i.A,s=vi[e.ba.S],c=t.y,u=t.O,h=t.f,l=t.N,f=t.ea,d=t.W,p=e.cc,g=e.dc,m=e.Mc,v=e.Nc,b=t.ka,y=t.ka+t.T,w=t.U,N=w+1>>1;for(0==b?s(c,u,null,null,h,l,f,d,h,l,f,d,a,o,null,null,w):(s(e.ec,e.fc,c,u,p,g,m,v,h,l,f,d,a,o-i.A,a,o,w),++r);b+2<y;b+=2)p=h,g=l,m=f,v=d,l+=t.Rc,d+=t.Rc,o+=2*i.A,s(c,(u+=2*t.fa)-t.fa,c,u,p,g,m,v,h,l,f,d,a,o-i.A,a,o,w);return u+=t.fa,t.j+y<t.o?(n(e.ec,e.fc,c,u,w),n(e.cc,e.dc,h,l,N),n(e.Mc,e.Nc,f,d,N),r--):1&y||s(c,u,null,null,h,l,f,d,h,l,f,d,a,o+i.A,null,null,w),r}function lt(t,r,n){var i=t.F,a=[t.J];if(null!=i){var o=t.U,s=r.ba.S,c=s==Tn||s==Vn;r=r.ba.f.RGBA;var u=[0],h=t.ka;u[0]=t.T,t.Kb&&(0==h?--u[0]:(--h,a[0]-=t.width),t.j+t.ka+t.T==t.o&&(u[0]=t.o-t.j-h));var l=r.eb;h=r.fb+h*r.A;t=Sn(i,a[0],t.width,o,u,l,h+(c?0:3),r.A),e(n==u),t&&nt(s)&&An(l,h,c,o,u,r.A)}return 0}function ft(t){var e=t.ma,r=e.ba.S,n=11>r,i=r==qn||r==Rn||r==Tn||r==Un||12==r||nt(r);if(e.memory=null,e.Ib=null,e.Jb=null,e.Nd=null,!Mr(e.Oa,t,i?11:12))return 0;if(i&&nt(r)&&br(),t.da)alert("todo:use_scaling");else{if(n){if(e.Ib=ut,t.Kb){if(r=t.U+1>>1,e.memory=a(t.U+2*r),null==e.memory)return 0;e.ec=e.memory,e.fc=0,e.cc=e.ec,e.dc=e.fc+t.U,e.Mc=e.cc,e.Nc=e.dc+r,e.Ib=ht,br()}}else alert("todo:EmitYUV");i&&(e.Jb=lt,n&&mr())}if(n&&!Ci){for(t=0;256>t;++t)ji[t]=89858*(t-128)+_i>>Si,Mi[t]=-22014*(t-128)+_i,Bi[t]=-45773*(t-128),Oi[t]=113618*(t-128)+_i>>Si;for(t=Pi;t<ki;++t)e=76283*(t-16)+_i>>Si,Ei[t-Pi]=Vt(e,255),qi[t-Pi]=Vt(e+8>>4,15);Ci=1}return 1}function dt(t){var r=t.ma,n=t.U,i=t.T;return e(!(1&t.ka)),0>=n||0>=i?0:(n=r.Ib(t,r),null!=r.Jb&&r.Jb(t,r,n),r.Dc+=n,1)}function pt(t){t.ma.memory=null}function gt(t,e,r,n){return 47!=y(t,8)?0:(e[0]=y(t,14)+1,r[0]=y(t,14)+1,n[0]=y(t,1),0!=y(t,3)?0:!t.h)}function mt(t,e){if(4>t)return t+1;var r=t-2>>1;return(2+(1&t)<<r)+y(e,r)+1}function vt(t,e){return 120<e?e-120:1<=(r=((r=$n[e-1])>>4)*t+(8-(15&r)))?r:1;var r}function bt(t,e,r){var n=L(r),i=t[e+=255&n].g-8;return 0<i&&(x(r,r.u+8),n=L(r),e+=t[e].value,e+=n&(1<<i)-1),x(r,r.u+t[e].g),t[e].value}function yt(t,r,n){return n.g+=t.g,n.value+=t.value<<r>>>0,e(8>=n.g),t.g}function wt(t,r,n){var i=t.xc;return e((r=0==i?0:t.vc[t.md*(n>>i)+(r>>i)])<t.Wb),t.Ya[r]}function Nt(t,r,i,a){var o=t.ab,s=t.c*r,c=t.C;r=c+r;var u=i,h=a;for(a=t.Ta,i=t.Ua;0<o--;){var l=t.gc[o],f=c,d=r,p=u,g=h,m=(h=a,u=i,l.Ea);switch(e(f<d),e(d<=l.nc),l.hc){case 2:Gr(p,g,(d-f)*m,h,u);break;case 0:var v=f,b=d,y=h,w=u,N=(_=l).Ea;0==v&&(Wr(p,g,null,null,1,y,w),V(p,g+1,0,0,N-1,y,w+1),g+=N,w+=N,++v);for(var L=1<<_.b,A=L-1,x=q(N,_.b),S=_.K,_=_.w+(v>>_.b)*x;v<b;){var P=S,k=_,I=1;for(Vr(p,g,y,w-N,1,y,w);I<N;){var F=(I&~A)+L;F>N&&(F=N),(0,Zr[P[k++]>>8&15])(p,g+ +I,y,w+I-N,F-I,y,w+I),I=F}g+=N,w+=N,++v&A||(_+=x)}d!=l.nc&&n(h,u-m,h,u+(d-f-1)*m,m);break;case 1:for(m=p,b=g,N=(p=l.Ea)-(w=p&~(y=(g=1<<l.b)-1)),v=q(p,l.b),L=l.K,l=l.w+(f>>l.b)*v;f<d;){for(A=L,x=l,S=new T,_=b+w,P=b+p;b<_;)Y(A[x++],S),$r(S,m,b,g,h,u),b+=g,u+=g;b<P&&(Y(A[x++],S),$r(S,m,b,N,h,u),b+=N,u+=N),++f&y||(l+=v)}break;case 3:if(p==h&&g==u&&0<l.b){for(b=h,'... 56485 more characters, namespace: '', suggestion: '' }, notes: [ { location: { column: 18651, file: 'node_modules/.pnpm/[email protected]/node_modules/jspdf/dist/jspdf.es.min.js', length: 2, line: 236, lineText: ' */function te(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function ee(t){function e(t){if(!t)throw Error("assert :P")}function r(t,e,r){for(var n=0;4>n;n++)if(t[e+n]!=r.charCodeAt(n))return!0;return!1}function n(t,e,r,n,i){for(var a=0;a<i;a++)t[e+a]=r[n+a]}function i(t,e,r,n){for(var i=0;i<n;i++)t[e+i]=r}function a(t){return new Int32Array(t)}function o(t,e){for(var r=[],n=0;n<t;n++)r.push(new e);return r}function s(t,e){var r=[];return function t(r,n,i){for(var a=i[n],o=0;o<a&&(r.push(i.length>n+1?[]:new e),!(i.length<n+1));o++)t(r[o],n+1,i)}(r,0,t),r}var c=function(){var t=this;function c(t,e){for(var r=1<<e-1>>>0;t&r;)r>>>=1;return r?(t&r-1)+r:t}function u(t,r,n,i,a){e(!(i%n));do{t[r+(i-=n)]=a}while(0<i)}function h(t,r,n,i,o){if(e(2328>=o),512>=o)var s=a(512);else if(null==(s=a(o)))return 0;return function(t,r,n,i,o,s){var h,f,d=r,p=1<<n,g=a(16),m=a(16);for(e(0!=o),e(null!=i),e(null!=t),e(0<n),f=0;f<o;++f){if(15<i[f])return 0;++g[i[f]]}if(g[0]==o)return 0;for(m[1]=0,h=1;15>h;++h){if(g[h]>1<<h)return 0;m[h+1]=m[h]+g[h]}for(f=0;f<o;++f)h=i[f],0<i[f]&&(s[m[h]++]=f);if(1==m[15])return(i=new l).g=0,i.value=s[0],u(t,d,1,p,i),p;var v,b=-1,y=p-1,w=0,N=1,L=1,A=1<<n;for(f=0,h=1,o=2;h<=n;++h,o<<=1){if(N+=L<<=1,0>(L-=g[h]))return 0;for(;0<g[h];--g[h])(i=new l).g=h,i.value=s[f++],u(t,d+w,o,A,i),w=c(w,h)}for(h=n+1,o=2;15>=h;++h,o<<=1){if(N+=L<<=1,0>(L-=g[h]))return 0;for(;0<g[h];--g[h]){if(i=new l,(w&y)!=b){for(d+=A,v=1<<(b=h)-n;15>b&&!(0>=(v-=g[b]));)++b,v<<=1;p+=A=1<<(v=b-n),t[r+(b=w&y)].g=v+n,t[r+b].value=d-r-b}i.g=h-n,i.value=s[f++],u(t,d+(w>>n),o,A,i),w=c(w,h)}}return N!=2*m[15]-1?0:p}(t,r,n,i,o,s)}function l(){this.value=this.g=0}function f(){this.value=this.g=0}function d(){this.G=o(5,l),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Dr,f)}function p(t,r,n,i){e(null!=t),e(null!=r),e(2147483648>i),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=r,t.pa=n,t.Jd=r,t.Yc=n+i,t.Zc=4<=i?n+i-4+1:n,_(t)}function g(t,e){for(var r=0;0<e--;)r|=k(t,128)<<e;return r}function m(t,e){var r=g(t,e);return P(t)?-r:r}function v(t,r,n,i){var a,o=0;for(e(null!=t),e(null!=r),e(4294967288>i),t.Sb=i,t.Ra=0,t.u=0,t.h=0,4<i&&(i=4),a=0;a<i;++a)o+=r[n+a]<<8*a;t.Ra=o,t.bb=i,t.oa=r,t.pa=n}function b(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<Ur-8>>>0,++t.bb,t.u-=8;A(t)&&(t.h=1,t.u=0)}function y(t,r){if(e(0<=r),!t.h&&r<=Tr){var n=L(t)&Rr[r];return t.u+=r,b(t),n}return t.h=1,t.u=0}function w(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function N(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function L(t){return t.Ra>>>(t.u&Ur-1)>>>0}function A(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>Ur}function x(t,e){t.u=e,t.h=A(t)}function S(t){t.u>=zr&&(e(t.u>=zr),b(t))}function _(t){e(null!=t&&null!=t.oa),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(e(null!=t&&null!=t.oa),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function P(t){return g(t,1)}function k(t,e){var r=t.Ca;0>t.b&&_(t);var n=t.b,i=r*e>>>8,a=(t.I>>>n>i)+0;for(a?(r-=i,t.I-=i+1<<n>>>0):r=i+1,n=r,i=0;256<=n;)i+=8,n>>=8;return n=7^i+Hr[n],t.b-=n,t.Ca=(r<<n)-1,a}function I(t,e,r){t[e+0]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=r>>0&255}function F(t,e){return t[e+0]<<0|t[e+1]<<8}function C(t,e){return F(t,e)|t[e+2]<<16}function j(t,e){return F(t,e)|F(t,e+2)<<16}function O(t,r){var n=1<<r;return e(null!=t),e(0<r),t.X=a(n),null==t.X?0:(t.Mb=32-r,t.Xa=r,1)}function B(t,r){e(null!=t),e(null!=r),e(t.Xa==r.Xa),n(r.X,0,t.X,0,1<<r.Xa)}function M(){this.X=[],this.Xa=this.Mb=0}function E(t,r,n,i){e(null!=n),e(null!=i);var a=n[0],o=i[0];return 0==a&&(a=(t*o+r/2)/r),0==o&&(o=(r*a+t/2)/t),0>=a||0>=o?0:(n[0]=a,i[0]=o,1)}function q(t,e){return t+(1<<e)-1>>>e}function D(t,e){return((4278255360&t)+(4278255360&e)>>>0&4278255360)+((16711935&t)+(16711935&e)>>>0&16711935)>>>0}function R(e,r){t[r]=function(r,n,i,a,o,s,c){var u;for(u=0;u<o;++u){var h=t[e](s[c+u-1],i,a+u);s[c+u]=D(r[n+u],h)}}}function T(){this.ud=this.hd=this.jd=0}function U(t,e){return((4278124286&(t^e))>>>1)+(t&e)>>>0}function z(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function H(t,e){return z(t+(t-e+.5>>1))}function W(t,e,r){return Math.abs(e-r)-Math.abs(t-r)}function V(t,e,r,n,i,a,o){for(n=a[o-1],r=0;r<i;++r)a[o+r]=n=D(t[e+r],n)}function G(t,e,r,n,i){var a;for(a=0;a<r;++a){var o=t[e+a],s=o>>8&255,c=16711935&(c=(c=16711935&o)+((s<<16)+s));n[i+a]=(4278255360&o)+c>>>0}}function Y(t,e){e.jd=t>>0&255,e.hd=t>>8&255,e.ud=t>>16&255}function J(t,e,r,n,i,a){var o;for(o=0;o<n;++o){var s=e[r+o],c=s>>>8,u=s,h=255&(h=(h=s>>>16)+((t.jd<<24>>24)*(c<<24>>24)>>>5));u=255&(u=(u=u+((t.hd<<24>>24)*(c<<24>>24)>>>5))+((t.ud<<24>>24)*(h<<24>>24)>>>5));i[a+o]=(4278255360&s)+(h<<16)+u}}function X(e,r,n,i,a){t[r]=function(t,e,r,n,o,s,c,u,h){for(n=c;n<u;++n)for(c=0;c<h;++c)o[s++]=a(r[i(t[e++])])},t[e]=function(e,r,o,s,c,u,h){var l=8>>e.b,f=e.Ea,d=e.K[0],p=e.w;if(8>l)for(e=(1<<e.b)-1,p=(1<<l)-1;r<o;++r){var g,m=0;for(g=0;g<f;++g)g&e||(m=i(s[c++])),u[h++]=a(d[m&p]),m>>=l}else t["VP8LMapColor"+n](s,c,d,p,u,h,r,o,f)}}function K(t,e,r,n,i){for(r=e+r;e<r;){var a=t[e++];n[i++]=a>>16&255,n[i++]=a>>8&255,n[i++]=a>>0&255}}function Z(t,e,r,n,i){for(r=e+r;e<r;){var a=t[e++];n[i++]=a>>16&255,n[i++]=a>>8&255,n[i++]=a>>0&255,n[i++]=a>>24&255}}function $(t,e,r,n,i){for(r=e+r;e<r;){var a=(o=t[e++])>>16&240|o>>12&15,o=o>>0&240|o>>28&15;n[i++]=a,n[i++]=o}}function Q(t,e,r,n,i){for(r=e+r;e<r;){var a=(o=t[e++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;n[i++]=a,n[i++]=o}}function tt(t,e,r,n,i){for(r=e+r;e<r;){var a=t[e++];n[i++]=a>>0&255,n[i++]=a>>8&255,n[i++]=a>>16&255}}function et(t,e,r,i,a,o){if(0==o)for(r=e+r;e<r;)I(i,((o=t[e++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),a+=32;else n(i,a,t,e,r)}function rt(e,r){t[r][0]=t[e+"0"],t[r][1]=t[e+"1"],t[r][2]=t[e+"2"],t[r][3]=t[e+"3"],t[r][4]=t[e+"4"],t[r][5]=t[e+"5"],t[r][6]=t[e+"6"],t[r][7]=t[e+"7"],t[r][8]=t[e+"8"],t[r][9]=t[e+"9"],t[r][10]=t[e+"10"],t[r][11]=t[e+"11"],t[r][12]=t[e+"12"],t[r][13]=t[e+"13"],t[r][14]=t[e+"0"],t[r][15]=t[e+"0"]}function nt(t){return t==Hn||t==Wn||t==Vn||t==Gn}function it(){this.eb=[],this.size=this.A=this.fb=0}function at(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ot(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new it,this.f.kb=new at,this.sd=null}function st(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ct(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ut(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ht(t,e){var r=t.T,i=e.ba.f.RGBA,a=i.eb,o=i.fb+t.ka*i.A,s=vi[e.ba.S],c=t.y,u=t.O,h=t.f,l=t.N,f=t.ea,d=t.W,p=e.cc,g=e.dc,m=e.Mc,v=e.Nc,b=t.ka,y=t.ka+t.T,w=t.U,N=w+1>>1;for(0==b?s(c,u,null,null,h,l,f,d,h,l,f,d,a,o,null,null,w):(s(e.ec,e.fc,c,u,p,g,m,v,h,l,f,d,a,o-i.A,a,o,w),++r);b+2<y;b+=2)p=h,g=l,m=f,v=d,l+=t.Rc,d+=t.Rc,o+=2*i.A,s(c,(u+=2*t.fa)-t.fa,c,u,p,g,m,v,h,l,f,d,a,o-i.A,a,o,w);return u+=t.fa,t.j+y<t.o?(n(e.ec,e.fc,c,u,w),n(e.cc,e.dc,h,l,N),n(e.Mc,e.Nc,f,d,N),r--):1&y||s(c,u,null,null,h,l,f,d,h,l,f,d,a,o+i.A,null,null,w),r}function lt(t,r,n){var i=t.F,a=[t.J];if(null!=i){var o=t.U,s=r.ba.S,c=s==Tn||s==Vn;r=r.ba.f.RGBA;var u=[0],h=t.ka;u[0]=t.T,t.Kb&&(0==h?--u[0]:(--h,a[0]-=t.width),t.j+t.ka+t.T==t.o&&(u[0]=t.o-t.j-h));var l=r.eb;h=r.fb+h*r.A;t=Sn(i,a[0],t.width,o,u,l,h+(c?0:3),r.A),e(n==u),t&&nt(s)&&An(l,h,c,o,u,r.A)}return 0}function ft(t){var e=t.ma,r=e.ba.S,n=11>r,i=r==qn||r==Rn||r==Tn||r==Un||12==r||nt(r);if(e.memory=null,e.Ib=null,e.Jb=null,e.Nd=null,!Mr(e.Oa,t,i?11:12))return 0;if(i&&nt(r)&&br(),t.da)alert("todo:use_scaling");else{if(n){if(e.Ib=ut,t.Kb){if(r=t.U+1>>1,e.memory=a(t.U+2*r),null==e.memory)return 0;e.ec=e.memory,e.fc=0,e.cc=e.ec,e.dc=e.fc+t.U,e.Mc=e.cc,e.Nc=e.dc+r,e.Ib=ht,br()}}else alert("todo:EmitYUV");i&&(e.Jb=lt,n&&mr())}if(n&&!Ci){for(t=0;256>t;++t)ji[t]=89858*(t-128)+_i>>Si,Mi[t]=-22014*(t-128)+_i,Bi[t]=-45773*(t-128),Oi[t]=113618*(t-128)+_i>>Si;for(t=Pi;t<ki;++t)e=76283*(t-16)+_i>>Si,Ei[t-Pi]=Vt(e,255),qi[t-Pi]=Vt(e+8>>4,15);Ci=1}return 1}function dt(t){var r=t.ma,n=t.U,i=t.T;return e(!(1&t.ka)),0>=n||0>=i?0:(n=r.Ib(t,r),null!=r.Jb&&r.Jb(t,r,n),r.Dc+=n,1)}function pt(t){t.ma.memory=null}function gt(t,e,r,n){return 47!=y(t,8)?0:(e[0]=y(t,14)+1,r[0]=y(t,14)+1,n[0]=y(t,1),0!=y(t,3)?0:!t.h)}function mt(t,e){if(4>t)return t+1;var r=t-2>>1;return(2+(1&t)<<r)+y(e,r)+1}function vt(t,e){return 120<e?e-120:1<=(r=((r=$n[e-1])>>4)*t+(8-(15&r)))?r:1;var r}function bt(t,e,r){var n=L(r),i=t[e+=255&n].g-8;return 0<i&&(x(r,r.u+8),n=L(r),e+=t[e].value,e+=n&(1<<i)-1),x(r,r.u+t[e].g),t[e].value}function yt(t,r,n){return n.g+=t.g,n.value+=t.value<<r>>>0,e(8>=n.g),t.g}function wt(t,r,n){var i=t.xc;return e((r=0==i?0:t.vc[t.md*(n>>i)+(r>>i)])<t.Wb),t.Ya[r]}function Nt(t,r,i,a){var o=t.ab,s=t.c*r,c=t.C;r=c+r;var u=i,h=a;for(a=t.Ta,i=t.Ua;0<o--;){var l=t.gc[o],f=c,d=r,p=u,g=h,m=(h=a,u=i,l.Ea);switch(e(f<d),e(d<=l.nc),l.hc){case 2:Gr(p,g,(d-f)*m,h,u);break;case 0:var v=f,b=d,y=h,w=u,N=(_=l).Ea;0==v&&(Wr(p,g,null,null,1,y,w),V(p,g+1,0,0,N-1,y,w+1),g+=N,w+=N,++v);for(var L=1<<_.b,A=L-1,x=q(N,_.b),S=_.K,_=_.w+(v>>_.b)*x;v<b;){var P=S,k=_,I=1;for(Vr(p,g,y,w-N,1,y,w);I<N;){var F=(I&~A)+L;F>N&&(F=N),(0,Zr[P[k++]>>8&15])(p,g+ +I,y,w+I-N,F-I,y,w+I),I=F}g+=N,w+=N,++v&A||(_+=x)}d!=l.nc&&n(h,u-m,h,u+(d-f-1)*m,m);break;case 1:for(m=p,b=g,N=(p=l.Ea)-(w=p&~(y=(g=1<<l.b)-1)),v=q(p,l.b),L=l.K,l=l.w+(f>>l.b)*v;f<d;){for(A=L,x=l,S=new T,_=b+w,P=b+p;b<_;)Y(A[x++],S),$r(S,m,b,g,h,u),b+=g,u+=g;b<P&&(Y(A[x++],S),$r(S,m,b,N,h,u),b+=N,u+=N),++f&y||(l+=v)}break;case 3:if(p==h&&g==u&&0<l.b){for(b=h,'... 56485 more characters, namespace: '', suggestion: '' }, text: 'The symbol "Vt" was originally declared here:' }, { location: { column: 35413, file: 'node_modules/.pnpm/[email protected]/node_modules/jspdf/dist/jspdf.es.min.js', length: 6, line: 331, lineText: 'function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var r,n,i,a,o,s,c,u=e,h=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},d={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},p=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],g=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),m=!1,v=0;this.__bidiEngine__={};var b=function(t){var e=t.charCodeAt(),r=e>>8,n=d[r];return void 0!==n?u[256*n+(255&e)]:252===r||253===r?"AL":g.test(r)?"L":8===r?"R":"N"},y=function(t){for(var e,r=0;r<t.length;r++){if("L"===(e=b(t.charAt(r))))return!1;if("R"===e)return!0}return!1},w=function(t,e,o,s){var c,u,h,l,f=e[s];switch(f){case"L":case"R":m=!1;break;case"N":case"AN":break;case"EN":m&&(f="AN");break;case"AL":m=!0,f="R";break;case"WS":f="N";break;case"CS":s<1||s+1>=e.length||"EN"!==(c=o[s-1])&&"AN"!==c||"EN"!==(u=e[s+1])&&"AN"!==u?f="N":m&&(u="AN"),f=u===c?u:"N";break;case"ES":f="EN"===(c=s>0?o[s-1]:"B")&&s+1<e.length&&"EN"===e[s+1]?"EN":"N";break;case"ET":if(s>0&&"EN"===o[s-1]){f="EN";break}if(m){f="N";break}for(h=s+1,l=e.length;h<l&&"ET"===e[h];)h++;f=h<l&&"EN"===e[h]?"EN":"N";break;case"NSM":if(i&&!a){for(l=e.length,h=s+1;h<l&&"NSM"===e[h];)h++;if(h<l){var d=t[s],p=d>=1425&&d<=2303||64286===d;if(c=e[h],p&&("R"===c||"AL"===c)){f="R";break}}}f=s<1||"B"===(c=e[s-1])?"N":o[s-1];break;case"B":m=!1,r=!0,f=v;break;case"S":n=!0,f="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":m=!1;break;case"BN":f="N"}return f},N=function(t,e,r){var n=t.split("");return r&&L(n,r,{hiLevel:v}),n.reverse(),e&&e.reverse(),n.join("")},L=function(t,e,i){var a,o,s,c,u,d=-1,p=t.length,g=0,y=[],N=v?l:h,L=[];for(m=!1,r=!1,n=!1,o=0;o<p;o++)L[o]=b(t[o]);for(s=0;s<p;s++){if(u=g,y[s]=w(t,L,y,s),a=240&(g=N[u][f[y[s]]]),g&=15,e[s]=c=N[g][5],a>0)if(16===a){for(o=d;o<s;o++)e[o]=1;d=-1}else d=-1;if(N[g][6])-1===d&&(d=s);else if(d>-1){for(o=d;o<s;o++)e[o]=c;d=-1}"B"===L[s]&&(e[s]=0),i.hiLevel|=c}n&&function(t,e,r){for(var n=0;n<r;n++)if("S"===t[n]){e[n]=v;for(var i=n-1;i>=0&&"WS"===t[i];i--)e[i]=v}}(L,e,p)},A=function(t,e,n,i,a){if(!(a.hiLevel<t)){if(1===t&&1===v&&!r)return e.reverse(),void(n&&n.reverse());for(var o,s,c,u,h=e.length,l=0;l<h;){if(i[l]>=t){for(c=l+1;c<h&&i[c]>=t;)c++;for(u=l,s=c-1;u<s;u++,s--)o=e[u],e[u]=e[s],e[s]=o,n&&(o=n[u],n[u]=n[s],n[s]=o);l=c}l++}}},x=function(t,e,r){var n=t.split(""),i={hiLevel:v};return r||(r=[]),L(n,r,i),function(t,e,r){if(0!==r.hiLevel&&c)for(var n,i=0;i<t.length;i++)1===e[i]&&(n=p.indexOf(t[i]))>=0&&(t[i]=p[n+1])}(n,r,i),A(2,n,e,r,i),A(1,n,e,r,i),n.join("")};return this.__bidiEngine__.doBidiReorder=function(t,e,r){if(function(t,e){if(e)for(var r=0;r<t.length;r++)e[r]=r;void 0===a&&(a=y(t)),void 0===s&&(s=y(t))}(t,e),i||!o||s)if(i&&o&&a^s)v=a?1:0,t=N(t,e,r);else if(!i&&o&&s)v=a?1:0,t=x(t,e,r),t=N(t,e);else if(!i||a||o||s){if(i&&!o&&a^s)t=N(t,e),a?(v=0,t=x(t,e,r)):(v=1,t=x(t,e,r),t=N(t,e));else if(i&&a&&!o&&s)v=1,t=x(t,e,r),t=N(t,e);else if(!i&&!o&&a^s){var n=c;a?(v=1,t=x(t,e,r),v=0,c=!1,t=x(t,e,r),c=n):(v=0,t=x(t,e,r),t=N(t,e),v=1,c=!1,t=x(t,e,r),c=n,t=N(t,e))}}else v=0,t=x(t,e,r);else v=a?1:0,t=x(t,e,r);return t},this.__bidiEngine__.setOptions=function(t){t&&(i=t.isInputVisual,o=t.isOutputVisual,a=t.isInputRtl,s=t.isOutputRtl,c=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL'... 25700 more characters, namespace: '', suggestion: '' }, text: 'Duplicate lexically-declared names are not allowed in an ECMAScript module. This file is considered to be an ECMAScript module because of the "export" keyword here:' } ], pluginName: '', text: 'The symbol "Vt" has already been declared' } ],

    opened by masterbater 4
  • fix(sec): upgrade karma to 6.3.16

    fix(sec): upgrade karma to 6.3.16

    What happened?

    There are 1 security vulnerabilities found in karma 5.1.0

    What did I do?

    Upgrade karma from 5.1.0 to 6.3.16 for vulnerability fix

    What did you expect to happen?

    Ideally, no insecure libs should be used.

    The specification of the pull request

    PR Specification from OSCS

    opened by admxj 0
Releases(v2.5.1)
  • v2.5.1(Jan 28, 2022)

    This release fixes two security related issues.

    • #3348: Check integrity when loading the pdfobject lib from CDN in calls to output('pdfobjectnewwindow')
    • #3368: Fix inefficient regular expression in setDisplayMode (CWE-1333)
    Source code(tar.gz)
    Source code(zip)
  • v2.5.0(Dec 21, 2021)

    This release adds some minor new features and fixes some bugs, e.g. related to multiline text. Thanks to all contributors!

    New Features

    • #3324 add getLineWidth function
    • #3294: add horizontalScale option to text function

    Bugfixes

    • #3271: fix html function only rendering on the first invocation per document
    • #3304, #3295: fix context2D.closePath (now properly closes the path)
    • #3274: fix Acroform text fields with multiline text
    • #3281: fix textWithLink for multiline text
    • #3283: fix lineHeightFactor in text options having no effect
    • #3302: fixes to html typings
    • #3272: fix return type of save function in typings (promise overload)
    Source code(tar.gz)
    Source code(zip)
  • v2.4.0(Sep 14, 2021)

    This release brings long awaited improvements to the html function and many other bugfixes and improvements. Thanks to all contributors!

    • #3203: Add width and windowWidth options to the html method, which will make correct scaling much easier.
    • #2977: Add/implement margin option for html method and add autoPaging option with two different modes: 'slice' and 'text'.
    • #3169: Add setLineDash and lineDashOffset to context2d.
    • #3039: Add rowStart and cellStart events and headerTextColor property to `table' function
    • #3132: Fix possibly negative line widths in context2d.
    • #3217: Fix setFont with fontWeight parameter for the built-in basic fonts
    • #3173: Fix violation of strict mode.
    • #3121: Improve addImage performance.
    • #3124: Allow to pass RGBA array to addImage.
    • #3135: Fix possibly imbalanced render target stack with form objects.
    • #3148: Add getDrawColor function to typings.
    • #3149: Fix font name escaping.
    • #3150: Throw an error when a zero size canvas is passed to addImage.
    • #3168: Fix word spacing after justified text.
    • #3215: Fix nullability of style arguments of geometry methods.
    • #3108: Complete the jsPDFOptions type in the typings.
    • #3119: Improve typings of the output function.
    Source code(tar.gz)
    Source code(zip)
  • v2.3.1(Mar 9, 2021)

    Small bugfixes. Thanks to all contributors!

    • #3073: fix HTMLAnchorElement is not defined in file saver
    • #3078: fix exception in getTextDimensions() with maxWidth set
    • #3087: fix typings of table() function
    • #3091: fix ReDos vulnerability in addImage function
    • #3099: improve documentation of output function
    Source code(tar.gz)
    Source code(zip)
  • v2.3.0(Jan 15, 2021)

    A couple of bugfixes, improved font handling and faster compression.

    • #3026: Fix alignment of links created with textWithLink
    • #3032: Fix alignment of table headers
    • #3062: Fix a bug where the options.flags parameter was ignored by the text method and consequently had the wrong defaults. This lead to garbled characters sometimes and was a regression to 1.5.3.
    • #3014: Add typings for internal events API
    • #3036: Support for numeric font weights and separation of font weight and font style
    • #3040: New fontFaces option for the html method that allows to add fonts similar CSS @font-face rules (no addFont calls required anymore). When supplied, fonts are resolved using the CSS 3 font loading algorithm.
    • #3054: replace pako library with fflate leading to faster compression and smaller bundle sizes.
    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Dec 7, 2020)

    Incorporates many of the awesome contributions in context of the Hacktoberfest. Thanks to all the contributors!

    • #2944: Fix PDF compression. Special thanks to @markotaht!
    • #2959: Add support for PDF encryption. Special thanks to @owenl131!
    • #3018: Fix font name escaping
    • #3017: Fix dependencies in bower.json
    • #3014: Added typings for the events API
    • #2982: Bump dompurify version to fix cve-2020-7691
    • #2981: Fix Canvg import
    • #2946: Remove API, that was removed in the 2.0.0 release, also from the typings
    • #2943: Fix links on pages with different size than the first page
    • #2942: Fix multiline texts in combination with the maxWidth text option
    • #2933, #3021: Fix typings of exported types like ImageCompression
    • #2915: Fix documentation of text method
    • #2906: Fix "Could not load <module>" error messages
    • #2905: Fix usages of atob/btoa in Internet Explorer and "old Edge"
    Source code(tar.gz)
    Source code(zip)
  • v2.1.1(Sep 7, 2020)

  • v2,1,0(Aug 25, 2020)

    • #2865: Fix "Critical dependency: the request of a dependency is an expression" warning and loading of optional dependencies
    • #2872: Add support for numbers in cell module
    • #2866: Fix XREF table generation
    • #2855: Fix PdfJS output filename
    • #2848: Fix getTextDimensions typings
    • Updated readme
    • Fixed some examples
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Aug 11, 2020)

    Finally a new release!

    A lot has changed since the last release:

    • jsPDF is now co-maintained by yWorks and we merged the yWorks fork into this repo adding a lot of new features like patterns, matrices, simple path operations, etc. See the readme for details.
    • Modernized the output bundles: there are now bundles for ES modules, UMD and a special node version. We renamed the files in dist for consistency: jspdf.debug/min.js is now jspdf.umd(.min).js. We also changed the name of the global variable to jspdf (lower case) when using script tags to be consistent with the new es modules format and named imports/exports. For backwards compatibility add this line:
    window.jsPDF = window.jspdf.jsPDF
    
    • Added typings for TypeScript support.
    • Removed APIs that were previously marked as deprecated. Namely: addHTML, fromHTML, html2pdf, addSvg, addButton, addTextField, addChoiceField, cellInitialize, setFontStyle, setFontType, clip_fixed.
    • Fixed the file-saver npm/bower install issue where jsPDF depended on a (non-existent) version directly from GitHub.
    • Made it compatible with all major toolkits and frameworks.
    • Refactored big parts of the code.
    • A lot of small and big bugfixes. Especially thanks to @SmythConor, @bwl21, @32leaves, @mktcode, @durs, @kakugiki, @AdamGold and many others!

    Here an (incomplete) list of additional bugfixes and changes:

    • #2835: Fixed reading of compound glyphs when using custom fonts
    • #2834: Fixed usage of custom fonts in context2d/when using the html method
    • #2824: Added maxWidth parameter to getTextDimensions
    • #2817: Fixed top margin in html method that occurred with [email protected]
    • #2816: Fixed escaping of font names with spaces
    • #2702: Fix context2d lineWidth scaling
    • #2806: Fix sanitizing of HTML passed as string to the html method
    • #2797: Fix scaling issue with Acroform fields
    • #2793: Fix autopaging issue in context2d with 10 or more pages
    • addImage and addFont accept now urls as parameters so the conversion to dataURLs is now only needed if you want to avoid CORS restrictions
    • WebP and JPEG Raw are now supported.
    • unnecessary data conversions are now reduced, so for example images should now render faster

    There are some breaking changes in the API. But these are mostly API-methods which you should not use anyway.

    While this release is a big step in the right direction, there are still many open issues (currently ~90). The maintainers of this repo (currently mostly @HackbrettXXX) have very limited time and can't resolve them all without the help of the community. This is another shout out to the community: if you like this project and want to make it even more awesome, consider spending one or two hours on improving it. Pull requests are very much appreciated!

    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Dec 20, 2018)

    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.

    You are free to submit PRs, 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 maintained 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
    Source code(tar.gz)
    Source code(zip)
  • v1.4.1(Jun 6, 2018)

    Thanks to @arasabbasi and @dasaCoder. We've got another bugfix release:

    • Base64-validation of images fixed (ea4c174 )
    • Internal use of different css-colornames methods reduced to one (e43a913, 5d0b760)
    • Update canvg to recent version (e43a913)
    • Update context2d so that it can handle properly transform-method (e43a913)
    • Add methods to TextField and other Elements like var TextField = new jsPDF.API.AcroForm.TextField() or var TextField = new doc.AcroFormTextField(); in AcroForm.js
    • Hotfix html2canvas so that whitespace doesnt result in to corrupted PDF (31bb2fd)
    • Remove nodeJS-Loading-Method from addImage( Commit 7a1089a)
    • Added gif- and bmp-support (38b50f4)
    • Fixed a performance-leak in extractInfoFromBase64DataURI in addImage-Plugin (c0a5e3a)
    • Add fallback filetype to filetype recognition in getImageFileTypeByImageData in addImage.js (3d32fb7)
    • Add documentation to addImage.js (3d32fb7)
    • Add addSvgAsImage-method and renaming addSVG to addSvg, but keeping addSVG for backwards-compatibility to svg.js (3d32fb7)
    • Make build.js independent from git call (c2d8501)
    • Modify split_text_to_size.js and jspdf.js to handle unicode strings , add unit tests for methods of split_text_to_size (4efd59c, f03af75, 25e8330, f03af75)
    • Add unit tests for arabic-parser and fix bugs found by unit tests (fc81d12)
    Source code(tar.gz)
    Source code(zip)
  • v.1.4.0(May 21, 2018)

    This is a biggie!

    As usual, thanks to everyone who has contributed!

    We'll be adding to the Unicode documentation as we go.

    Big thanks to @arasabbasi for getting this shipped!

    The three main aspects of this release were UTF-8-support, increased NodeJS/AngularJS/WebPack-support and stabilizing jsPDF by fixing bugs.

    jsPDF supports finally UTF-8 by having the ability to use custom fonts. We want to thank here especially to contributor @sphilee, who programmed the TTFFont.js library file, which is the core of this great feature. Because of the specialties of the arabic-writing-system we have a separate plugin for that writing system.

    In the light of the increased amount of reported issues by nodeJS/angularJS/WebPack-users we focused in this build on increased compatibility with nodeJS and other third-party-software. We hope that those changes will solve the reported issues to your sufficiency.

    A lot of bugfixes were applied to the core and the addimage.js-plugin.

    • Now API.text is supporting rotation, multiline, right, center and justify alignment to a satisfying level.
    • addimage.js now recognizes images by the magic headers. The PNG-Engine now supports Interlace-mode and CMYK.
    • acroform.js got refactored and works now in Internet Explorer 11, too
    • and many many small bugfixes here and there
    Source code(tar.gz)
    Source code(zip)
  • v1.3.5(Sep 14, 2017)

    As jsPDF has grown, we've been managing some technical debt. Some of this is from before NPM existed - so those dependencies were brought in through git. That's now fixed, which should mean you can install jsPDF into containers without git.

    We also removed a load of old unneeded files. We'll continue tidying up, as we have some pretty big changes coming up soon.

    Main fixes include:

    • 7f5008ba1e32240ee2da701ad2b625a273093e44 Move deps to npm
    • daacf2c6e2471d136ed3532991881ff2f65e9ddc Added a Code of Conduct document
    • 41bcbfa80187b19b574a39ab6cbdf9159e87863f Fixed an issue with memory leaks for large images
    • ef7ecda904ee603b107a21d82aae4af5eedb4944 Tidied up a bunch of old file

    As always, let me know how you get on! Please report any issues using the template, creating a working jsbin example really helps us to sort the issue out quickly.

    Source code(tar.gz)
    Source code(zip)
  • 1.3.4(Apr 10, 2017)

    This release integrates all previous hotfixes, so if you were daring and enabled them, you can now remove those instructions from your code as they are now enabled by default.

    You can see the commits for list release here: https://github.com/MrRio/jsPDF/commits/master

    The official notes for this release are pending.

    Source code(tar.gz)
    Source code(zip)
  • v1.3.3(Feb 23, 2017)

    We've got a bunch of fixes for SVG display, including:

    • #1044 Fixing a regression in angle calculation.
    • #1043 #1037 #1045 Arc fixes – many types of graphs and charts now display much better.
    • #1040 Canvas width fix.
    • #1042 Scaling text now works well.
    • https://github.com/MrRio/jsPDF/compare/v1.3.2...v1.3.3 Full changeset

    We've also introduced a selection of SVG hotfixes which can be optionally enabled. These may be enabled by default and completely merged in the future.

    Source code(tar.gz)
    Source code(zip)
  • v1.3.2(Sep 30, 2016)

  • v1.3.1(Sep 30, 2016)

    In this release we've:

    • c1dcb877a3ba78d080b970f5acba5814757921b8 Made it possible to draw SVG with a transparent background
    • ac01169797f8189e6223360e839d727362b34e67 Removed the old bash build scripts
    • fc841d02965c72f174ba083c9eb4427a0b3dbe83 Fixed up html2pdf examples
    • https://github.com/MrRio/jsPDF/compare/v1.3.0...v1.3.1 A load of other bits
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Sep 28, 2016)

    Big thanks to @Flamenco and SAP for this release.

    You can test out the SVG functionality by running:

    npm start

    and then visiting:

    http://localhost:8000/examples/canvg_context2d/bar_graph_with_text_and_lines.html

    We've also done the following:

    • c0ae8a2378045d594f321907e241a8d62d0a30bb Started to replace committed deps with npm deps, this project existed before npm or git can you believe?
    • 804785384e04e6aed9e9162de3a88bf8bc4ada01 Use rollupjs to bundle jsPDF, plugins and libs
    • 68baeff29914ff03e46eff26c55c8df3c1359a1e Fix a longstanding issue with generating the document multiple times
    • bd60b2f4b97c0b850358affe3fc3de31e00913fd Fixed PNG compression
    • c3dc3914dae5a2a86da878ce063d2cf059df7e9a Started transpiling with babel
    • Loads of other little fixes
    Source code(tar.gz)
    Source code(zip)
  • v1.2.61(Mar 1, 2016)

  • v1.2.60(Feb 29, 2016)

  • 1.1.135(May 18, 2015)

    This is a large update, and is in preparation for a larger refactor.

    • Refactor plugins into plugins/ folder.
    • Numerous fixes to HTML plugin, including context2d support!
    Source code(tar.gz)
    Source code(zip)
  • v1.0.272(Sep 29, 2014)

    [2014-09-29][diegocr][43eb081] New dist files. [2014-09-21][diegocr][d477072] Added setDisplayMode function to define zoom, layout, and page modes [2014-09-20][diegocr][30dbe14] Clipping Lines to Inside a Rectangle - closes #328 [2014-09-20][diegocr][d7cb062] Added setPage() function - closes #108 [2014-09-20][diegocr][4c9c0ec] Automatically add new pages if .text() would overflow - closes #119 [2014-09-20][diegocr][7da6aac] Adding letter-spacing method - closes #143 [2014-09-20][diegocr][b6f019c] Added Image Rotation support - closes #338 [2014-09-20][diegocr][2b53fb4] Added per-page support for document width, height, format and orientation - #49 [2014-09-19][diegocr][3da4b59] New dist files. [2014-09-19][diegocr][9f814ae] Added Line BReaks support to fromTHML [2014-09-19][diegocr][672105c] fromHTML fixes kindly suggested by @mcurland [2014-09-19][diegocr][2bb6a89] Fixed #355 - missing images on fromHTML() [2014-09-18][diegocr][b675300] Fixed #348 - fromHtml method blows pdf graphics stack [2014-09-18][diegocr][f3f6261] Fixed getTextDimension() for Firefox - closes #235 [2014-08-28][yscumc][6899fac] Fix for CreationDate timezone #345 [2014-08-28][James Hall][ef1626c] Use UTC time in CreationDate, fixes #345 [2014-08-11][diegocr][f35960b] MSIE cannot handle Data URIs on the live example... closes #334 [2014-07-28][diegocr][d88c833] addImage: Implemented generateAliasFromData - Related to #99 and #300 [2014-07-22][diegocr][8f9d6cd] New dist files. [2014-07-22][Diego Casorran][ed1c917] Fixed #301 [2014-07-19][diegocr][1fde787] Workaround for dataurlnewwindow usage on Safari. [2014-07-19][diegocr][140c979] Added bloburl output type. [2014-07-19][diegocr][e33e44f] Slightly improved our SAFE function [2014-07-17][diegocr][41fcc3a] New dist files. [2014-07-16][Huy, Vuong Do Thanh][6f9361b] requirejs patch for anonymous define() [2014-07-02][Antoine Duchateau][07908c3] fixed grayscale JPEG [2014-06-29][Wolfgang Gassler][2c565a2] margin padding support for floated images [2014-06-29][diegocr][8247a27] addImage: detect png format from img.src - related to #291 [2014-06-27][diegocr][0f3c2d0] addImage: Detect PNG format from raw data - related to #291

    Source code(tar.gz)
    Source code(zip)
  • v1.0.178(Jun 27, 2014)

    [2014-06-27][diegocr][da257c2] New dist files. [2014-06-27][Wolfgang Gassler][7ab98a3] image floating [2014-06-05][Wolfgang Gassler][9c70e27] empty line between first lines on new page removed [2014-06-05][Wolfgang Gassler][4e6bcb4] problem of lost lines solved [2014-05-21][Wolfgang Gassler][45b5f8e] floating around image [2014-06-25][Diego Casorran][0b51903] Tiny improvement over #278 [2014-06-25][diegocr][82893ba] Fixed #289 - a single define() call [2014-06-19][Salem Talha][60dfed6] Small fix for svg rendering script [2014-06-08][Turan Rustamli][d23ad56] Fixed default coordinates for fromHTML

    Source code(tar.gz)
    Source code(zip)
  • v1.0.150(May 30, 2014)

    [2014-05-30][diegocr][75d18af] New dist files with updated Blob.js and FileSaver.js [2014-05-25][diegocr][dcbc9fc] Fixed fromHTML bug when using strings... [2014-05-25][diegocr][fac3703] Minor tweaks related to #267 [2014-05-25][Diego Casorran][fcb97f4] Update README.md [2014-05-25][Wolfgang Gassler][029b96a] applied proposals of #267 by @diegocr [2014-05-25][Wolfgang Gassler][fb3c7df] support of dataurl images [2014-05-21][diegocr][157527d] Fixed #96 [2014-05-21][diegocr][84b6204] Reindent of jspdf.plugin.from_html.js [2014-05-21][diegocr][7f06fdf] Minor fix related to #260 [2014-05-20][Wolfgang Gassler][ee4ba08] master merged [2014-05-08][Wolfgang Gassler][1bbb8a5] header footer working [2014-03-10][Ben Gribaudo][41802ea] Updating reference to live editor & examples

    Source code(tar.gz)
    Source code(zip)
  • v1.0.138(May 18, 2014)

    [2014-05-18][diegocr][aed93c3] addHTML() can now split the canvas into multiple pages; Also, added rasterizeHTML support. [2014-05-18][diegocr][99b632e] Check for define.amd [2014-05-13][diegocr][e931375] Fixed #257 [2014-05-11][diegocr][4952bd2] New dist files with updated basic example [2014-05-11][Daniel][57388f4] Squashed commit of the following: [2014-05-07][chmanie][09b147a] change supportsArrayBuffer check to work with Safari [2014-05-07][chmanie][59e3133] change supportsArrayBuffer check to work with Safari [2014-04-29][Wolfgang Gassler][8813035] prcoessing css style justify added [2014-04-29][Wolfgang Gassler][bd9fd98] processing of css style text-align center and right added

    Source code(tar.gz)
    Source code(zip)
  • v1.0.119(Apr 29, 2014)

    [2014-04-29][diegocr][4c69493] Ensuring the PNG support dont break the library initialization under older browsers [2014-04-28][diegocr][119a246] Removing senseless .toString(10) calls [2014-04-28][diegocr][5dd397b] Added lineIndent option to the SplitText PlugIn [2014-04-27][Matej Kenda][fde17a9] #239: fix for YUI compressor errors: short -> palShort, byte -> abyte

    Source code(tar.gz)
    Source code(zip)
  • v1.0.116(Apr 26, 2014)

A JavaScript PDF generation library for Node and the browser

PDFKit A JavaScript PDF generation library for Node and the browser. Description PDFKit is a PDF document generation library for Node and the browser

null 8.5k Jan 7, 2023
File downloading using client-side javascript

download Summary The download() function is used to trigger a file download from JavaScript. It specifies the contents and name of a new file placed i

dandavis 2.1k Dec 31, 2022
PDF Reader in JavaScript

PDF.js PDF.js is a Portable Document Format (PDF) viewer that is built with HTML5. PDF.js is community-driven and supported by Mozilla. Our goal is to

Mozilla 41.1k Jan 8, 2023
Pretty diff to html javascript library (diff2html)

diff2html diff2html generates pretty HTML diffs from git diff or unified diff output. Table of Contents Features Online Example Distributions Usage Di

Rodrigo Fernandes 2.3k Dec 31, 2022
Client/server side PDF printing in pure JavaScript

pdfmake PDF document generation library for server-side and client-side in pure JavaScript. Check out the playground and examples. This is unstable ma

Bartek Pampuch 10.5k Jan 1, 2023
A Javascript library to export svg charts from the DOM and download them as an SVG file, PDF, or raster image (JPEG, PNG) format. Can be done all in client-side.

svg-exportJS An easy-to-use client-side Javascript library to export SVG graphics from web pages and download them as an SVG file, PDF, or raster imag

null 23 Oct 5, 2022
PDF.js Read Only is an additional readonly mode for PDF.js

PDF.js Read Only PDF.js Read Only is an additional readonly mode for PDF.js, a Portable Document Format (PDF) viewer that is built with HTML5 which is

Aprillio Latuminggi 19 Dec 22, 2022
I'm trying to create simple program for adding the digital signature to a pdf file with self-signed certificate. I use node-signpdf and pdf-lib library.

pdf-digital-signature-with-node-signpdf-ejs I'm trying to create simple program for adding the digital signature to a pdf file with self-signed certif

null 5 Dec 25, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A JavaScript PDF generation library for Node and the browser

PDFKit A JavaScript PDF generation library for Node and the browser. Description PDFKit is a PDF document generation library for Node and the browser

null 8.5k Jan 7, 2023
A JavaScript PDF generation library for Node and the browser

PDFKit A JavaScript PDF generation library for Node and the browser. Description PDFKit is a PDF document generation library for Node and the browser

null 8.5k Jan 2, 2023
Fast and minimal JS server-side writer and client-side manager.

unihead Fast and minimal JS <head> server-side writer and client-side manager. Nearly every SSR framework out there relies on server-side components t

Jonas Galvez 24 Sep 4, 2022
Easy server-side and client-side validation for FormData, URLSearchParams and JSON data in your Fresh app 🍋

Fresh Validation ??     Easily validate FormData, URLSearchParams and JSON data in your Fresh app server-side or client-side! Validation Fresh Validat

Steven Yung 20 Dec 23, 2022
Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation

Aphrodite Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation. Support for colocating y

Khan Academy 5.3k Jan 1, 2023
Make drag-and-drop easier using DropPoint. Drag content without having to open side-by-side windows

Make drag-and-drop easier using DropPoint! DropPoint helps you drag content without having to open side-by-side windows Works on Windows, Linux and Ma

Sudev Suresh Sreedevi 391 Dec 29, 2022
This is an application that entered the market with a mobile application in real life. We wrote the backend side with node.js and the mobile side with flutter.

HAUSE TAXI API Get Started Must be installed on your computer Git Node Firebase Database Config You should read this easy documentation Firebase-Fires

Muhammet Çokyaman 4 Nov 4, 2021
This plugin allows side-by-side notetaking with videos. Annotate your notes with timestamps to directly control the video and remember where each note comes from.

Obsidian Timestamp Notes Use Case Hello Obsidian users! Like all of you, I love using Obsidian for taking notes. My usual workflow is a video in my br

null 74 Jan 2, 2023
This Plugin is For Logseq. If you're using wide monitors, you can place journals, linked references, and journal queries side by side.

Logseq Column-Layout Plugin Journals, linked references, and journal queries can be placed side by side if the minimum screen width is "1850px" or mor

YU 14 Dec 14, 2022