小编ayk*_*kon的帖子

使用jsPDF从Iframe内容下载PDF文件

我想保存包含IFrame内容的PDF文件.我使用jsPDF Javascript库.

这是我的代码:

function toPDF(){       
        var pdf = new jsPDF('p', 'in', 'letter');

    // source can be HTML-formatted string, or a reference
    // to an actual DOM element from which the text will be scraped.
    source = $('#iframeid')[0]

    // we support special element handlers. Register them with jQuery-style 
    // ID selector for either ID or node name. ("#iAmID", "div", "span" etc.)
    // There is no support for any other type of selectors 
    // (class, of compound) at this time.
    specialElementHandlers = …
Run Code Online (Sandbox Code Playgroud)

javascript pdf jspdf

4
推荐指数
1
解决办法
5780
查看次数

标签 统计

javascript ×1

jspdf ×1

pdf ×1