Print and Save Question

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
PerryB
Posts: 2
Joined: Tue Oct 22, 2019 2:04 pm

Print and Save Question

Post by PerryB » Wed Oct 23, 2019 2:39 pm

We're developing a web application using ASP.NET Web Forms that involves some document processing and everything seems to be progressing well. The appliation allows the user to load a document (multipage tiff) and do some standard editing on the file like page rotation, page flip, page delete and redaction. To handle these edit actions we have our own buttons and use the PostCustomServerAction method to call our own methods to do the work.

All of these tasks work well and up until now we were just using the standard Print (DocuViewareAPI.Print) and Save (DocuViewareAPI.Save) methods to allow the user to save and print the documents. However, for our needs we are wondering if its possible to bypass the standard modal forms that pop up after clicking the Print and Save buttons. By this I mean the small modal windows that allow you to customize the print options (i.e. Destination, Content, Pages, etc.) and save options (File name, Destination format, pages, etc.). For our needs we always want to have the same settings (i.e. always save as pdf with all pages and annotations) and not give the users any means to change or even see these settings. Is there a way to call the Print and Save methods without popping up the modals first, just go directly to the browser's standard Print and Save As dialogs? Basically cut out the middle step of showing the settings modal. Maybe something along the lines of AddRectangleAnnotInteractive where you pass in the properties to the method so you don't need to pop up the 'Rectangle Annotation Properties' modal each time. Is there a similar type way of calling the Print and Save functionality?

Code: Select all

function RedactContent(ViewerName) {
    rectProperties = {
        fill: true,
        fillColor: "#000000",
        stroke: false
    }
    var enabledProperties = [];
    DocuViewareAPI.AddRectangleAnnotInteractive(ViewerName, rectProperties, false, enabledProperties);
}
For the saving, we tried having a custom button (and code-behind method) on the page to export the loaded and edited document and even though we could save the file with no issues it turned out it wouldn't contain any of the actual edits to the file. It would just export the original file but wouldn't include any of the edits that were done to the file and would still contain the deleted pages. Not sure if we were saving the file incorrectly or not, but we couldn't seem to get it to work. In the code behind we would get the loaded document using the "Dim status As GdPictureStatus = DocuVieware1.GetNativeImage(ImgID)" code, but this seems to just get the initially loaded document (without the edits), unless this is the incorrect way we should be getting the file.

Our experience with working with third-party API's like this is very limited so we could just be missing some things about this process.

Any help or ideas would be appreciated.
Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests