Append to displayed document via "Open" button

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
SyKaufax
Posts: 5
Joined: Fri Jun 25, 2021 5:02 pm

Append to displayed document via "Open" button

Post by SyKaufax » Thu Mar 10, 2022 7:17 pm

Currently, it is possible to append by scanning. How could this be done via the open button? Right now, it replaces what is displayed.

Hugo
Posts: 227
Joined: Tue Dec 18, 2018 10:09 am

Re: Append to displayed document via "Open" button

Post by Hugo » Fri Mar 11, 2022 5:13 pm

Hi there,

Thanks for your question.

I am having difficulties understanding what you mean by this.
Could you perhaps further explain this via screenshots or an example please?

Regards,
Hugo Cudd
Technical Support

SyKaufax
Posts: 5
Joined: Fri Jun 25, 2021 5:02 pm

Re: Append to displayed document via "Open" button

Post by SyKaufax » Tue Mar 15, 2022 7:59 pm

Scanning allows you to append.
Scan_append.PNG
Using drag and drop or "Open" button replaces the displayed document with the item selected.
Scan_append.PNG
Is there a way to do an append to document like when twain allows?
Attachments
Open_button.PNG

User avatar
Fabio
Posts: 173
Joined: Thu Aug 27, 2020 9:57 am

Re: Append to displayed document via "Open" button

Post by Fabio » Thu Mar 17, 2022 6:31 pm

Hi there,

To create an "append to document" scan-like feature, you can do it this way:

Create a custom button in the top bar
https://www.docuvieware.com/guides/aspn ... utton.html

Create a js method that will let your user selects a file
-> https://developer.mozilla.org/en-US/doc ... plications

Ask the client-side to launch a server-side method and send the document
-> https://www.docuvieware.com/guides/aspn ... ction.html

The goal here is to set the file within the parameter "params" of the PostCustomServerAction. For instance, you can convert the user's selected document to a base64 one, to set it in the "params" argument.

Get the loaded file
-> https://www.docuvieware.com/guides/aspn ... tData.html
-> https://www.docuvieware.com/guides/aspn ... vePDF.html
-> https://www.docuvieware.com/guides/aspn ... Image.html

Merge the loaded file and the customer's selection document
-> https://www.gdpicture.com/guides/gdpict ... ream).html

Load the merged document in the viewer
-> https://www.docuvieware.com/guides/aspn ... tream.html

Another workflow that can work:

Every time your user loads or does something to the loaded document, save a copy server-side. When your user will open a new document, you can raise the RegisterOnNewDocumentLoaded event, and send a request to the server thanks to the PostCustomServerAction to merge the new and old document together.

--

If you need any help on that, do not hesitate to ask!

Best regards,
Fabio

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest