Arm0geddon
Arm0geddon

Reputation: 486

Open PDF with javascript

Is there a way to open a PDF document using JavaScript (or C#) and have it automatically open with Acrobat, let the user edit document and upon the the user closing document, save back to server.

From my research, I found people recommend iTextsharp, but I don't think that will do what I'm trying to accomplish.

Basically I am trying to mimic the Check Out/Check In functionality of SharePoint.

Upvotes: 2

Views: 1903

Answers (4)

El Zorko
El Zorko

Reputation: 3399

Ignoring the browser, so assuming you're working in a C# application, this is quite possible and not as complex as it might seem. The details will depend on your exact setup, but I'd suggest a la:

Upvotes: 3

David van Driessche
David van Driessche

Reputation: 7048

A lot probably depends on what exactly you are trying to accomplish and how much control you have over your environment / users. Looking at what Acrobat X and SharePoint do, it looks like support for SharePoint is built into Acrobat X.

This can easily (well :-)) be done by creating an Acrobat plug-in. Plug-ins are capable of monitoring a myriad events within Adobe Acrobat and reacting on that. They can do complex things such as adding a file system (which allow you to open and save files that are actually stored in a database for example) but there are certainly more simple strategies imaginable.

Imagine a plug-in living in Adobe Acrobat that monitors each file that is opened by the user. Upon seeing a file opened from your server it marks that document as one of yours and checks it out with the server (however you want to implement that). When the user saves the document that notification would be received as well (both before and after the actual save) and again appropriate action can be taken.

So the general answer is yes, this is doable under certain circumstances, if you are willing to write a plug-in and if you have control enough over your environment that you can make sure all users actually have this plug-in installed in Adobe Acrobat.

Upvotes: 4

trigras
trigras

Reputation: 515

To save document back to SharePoint there should be support in client application. If I correctly understand Acrobat X supports this http://pdfdevjunkie.host.adobe.com/pdf/AcrobatXandMicrosoftSharePoint.pdf . Isn't that that are you looking for?

Upvotes: 3

moka
moka

Reputation: 23047

As I am aware there is no JS solutions to edit PDF (26.06.13), but there is a way to preview them, for example with pure JS solution PDF.JS.
You need to generate PDF files on server side using pure submitted data.

Upvotes: 1

Related Questions