简体   繁体   English

保存更新的网页

[英]Save Updated Web Page

I have a page that displays a PDF page, as a base64 image. 我有一个页面显示一个PDF页面,作为base64图像。 The user can add images dynamically, on top of this PDF image, as it now is on the page. 用户可以像现在在页面上一样,在此PDF图像之上动态添加图像。 I was wondering if anyone new a way to display this newly updated web page, so that I can ultimately save it as a new file. 我想知道是否有人以一种新的方式来显示此新近更新的网页,以便最终将其另存为新文件。 I can get the file as it was before the user added new data, using either itextsharp or WebClient. 我可以使用itextsharp或WebClient获得用户添加新数据之前的文件。 However, I need to obtain the page as it is now, with the new information on it. 但是,我需要立即获取包含新信息的页面。 I am using C# Webforms, JavaScript and a SQL Server back-end. 我正在使用C#Webforms,JavaScript和SQL Server后端。 So, the page will initially look like this: 因此,页面最初将如下所示:

    <div id="imgId">
    <img id="page1" class="page" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABKMAAAYACAYAAACq7Yt4AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQ...">
    </div>

Then, if a user adds a new image on top of it, it would look like this: 然后,如果用户在其顶部添加新图像,则该图像如下所示:

    <div id="imgId">
            <img id="page1" class="page" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABKMAAAYACAYAAACq7Yt4AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQ...">
            <img src="include/images/sign_here.jpg" data-marker-id="marker1" id="marker1" class="marker ui-draggable ui-draggable-handle" draggable="true" style="left: 526px; top: 369px;">
    </div>

Is there a way to save this HTML as a string, as it is now updated? 有没有办法将此HTML保存为字符串,因为它现在已更新? I am trying to word this properly so that it is understandable, so if anyone has any questions, please ask and I will do my best to clearify the question. 我正在尝试正确地措辞,以便可以理解,因此,如果有人有任何疑问,请提出,我将尽力解决这个问题。 Thank you very much in advance. 提前非常感谢您。

You are looking to save the uploaded image as a blob. 您正在寻找将上传的图像另存为斑点。 Im not sure of the data type in sql server. 我不确定sql server中的数据类型。 But you essentially save it as binary. 但是您实际上将其保存为二进制文件。 To do this use a file uploader input and on postback save the data into the relevant table. 为此,请使用文件上传器输入,并在回发时将数据保存到相关表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM