MrRio/jsPDF — Issue #8: Multiline text (aka Word Wrap)
Author: dvdotsenko
Created: 2012-02-17 23:53:07+00:00
State: open

Hi.

I am planning to add code that automatically splits long strings into multiple text lines.

Efficient string length calculation is not going to be a problem - will use off-screen DIV to measure length of text, infer chunk lengths and cut appropriately. What is a problem is the obtuseness of DOM manipulation using pure JavaScript (and browser-specific gotchas that come with that). So, naturally will roll with what i know - jQuery, which will make my code jQuery-dependent.

This is fine for us (corporate use, we already have jQuery where that matters), but, understandably could not go well if you want to pull the code into your mainline repo.

Could you mention your suggestions / thoughts on possible addition of line wrapping code to jsPDF?

If you already have some thoughts on that, and would like to have it as part of mainline jsPDF, by all means, chime in so we can try to code in way that helps eventual pull. If you don't really care about auto line wrapping, would be good to know too as it frees our hands.

Cheers.