Skip to content

Saving PDF with image fails #702

@rogerfar

Description

@rogerfar

Create a ticket with an image, it will fail on the following line:

var datauri = ('' + type).substr(0, 6) === 'dataur'
                    ? 'data:application/pdf;base64,' + btoa(buildDocument()) : 0;

With the error:

Error: Error in function Error (native): Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
    at Console.$window.console.error (http://localhost:3333/App/Business/AngularErrorHandler.js:43:23)
    at Object.__safeCallWrapper [as output] (http://localhost:3333/Scripts/jsPDF/jspdf.js:471:44)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions