Skip to content

Conversation

jirikavi
Copy link
Contributor

@jirikavi jirikavi commented Jul 2, 2015

These small changes help me to work with this library in easier way.
usage:

    var doc = new jsPDF('p', 'pt', 'a4');
    var marginsDocProps2 = {
        top: lastTop,
        bottom: 0,
        left: 70
    };
    var docProps2ElementHandlers = { printHeaders: true }
    doc.fromHTML($('#documentProps2').get(0),
        marginsDocProps2.left,
        marginsDocProps2.top,
        {
            'elementHandlers': docProps2ElementHandlers
        },
        marginsDocProps2
    );
    var lastTop = docProps2ElementHandlers.outY - 20;

lastTop is y position of the last generated block so I know where I can start generate another block.

@dohomi
Copy link

dohomi commented Sep 16, 2015

Hi @jirikavi is there any news on this PR? I just investigating jsPDF for my usecase and wondering how to receive the ycoordinate after dynamic HTML rendering

@jirikavi
Copy link
Contributor Author

No news. If you like you can use my edited repo to get y coordinate

@dohomi
Copy link

dohomi commented Sep 16, 2015

@MrRio is there any function built-in to receive the current y-axis after render an HTML block? What is the recommended way for printing out dynamic data?

MrRio added a commit that referenced this pull request Feb 29, 2016
Get y coordinate from generated block from html, clear y coordinate after page break
@MrRio MrRio merged commit 5d80eaa into parallax:master Feb 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants