save/export image file from html content?

后端 未结 4 1707
日久生厌
日久生厌 2020-12-13 16:25

I have a scenario that, I am creating dynamic html content and I need to export/save the html content to an image file with php, jQuery and JavaScript [or with any other if

4条回答
  •  暖寄归人
    2020-12-13 16:35

    I put the canvas myself and did not use createElement line above You probably need to add this line before drawWindow() to get security permissions from user. See http://murfy.de/read/webgl-drawWindow

    netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
    

    If you want to save the image as PNG etc, I found a useful script at: http://www.nihilogic.dk/labs/canvas2image/

提交回复
热议问题