简体   繁体   中英

Save Updated Web Page

I have a page that displays a PDF page, as a base64 image. The user can add images dynamically, on top of this PDF image, as it now is on the page. 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. 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. 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? 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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