Skip to content

No text in PDF, only images #1570

@emlun007

Description

@emlun007

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

Are you using the latest version of jsPDF?

yes,

https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js

Have you tried using jspdf.debug.js?

Yes

Steps to reproduce

I am using jsPDF to save my tables made with dataTables plugin.

Here is my code:

    var doc = new jsPDF();
    var specialElementHandlers = {
        '#editor': function (element, renderer) {
            return true;
        }
    };

    $('#Save_as_pdf').click(function () {
        doc.fromHTML($('#inventory_table').html(), 15, 15, {
            'width': 170,
                'elementHandlers': specialElementHandlers
        });
        doc.save('Inventory.pdf');
    });

What I saw

In Chrome:

Error and an empty PDF:

error_v2

In IE 11:

Only large images instead of what should have been icons but still no text:

generated_pdf

What I expected

PDF with my dataTables, containing text and images.

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