ASP.Net Printing to printer installed on client machine in a website - asp.net-mvc-4

This is for ASP.Net website.
When user selects remote documents(pdfs) present on server and clicks print, we need to show the print dialog where user can choose which printer to print to.
The methods which we have tried are:
1. Merge all pdfs, load the resultant on a new window/iframe and invoke print command- The obvious issue here is it takes lots of time when the documents are very large.
Aspose pdf print code / Foxit print code - These require some printer to be installed on the IIS server, which is not feasible for us to do.
neodynamic - This requires an exe to be installed on client as well, which is not good for us.
Can someone suggest alternatives or what else can be tried?
Is there something obvious that we are missing here?
We heard about browser helper objects, if building these have worked for someone, please help.

Related

Can I use macro/vba in acces/excel to sign a pdf with a certificate?

Currently I do this process:
I have pdf files I want to sign with a certificate that is installed in my PC
I do some checks about some data (not relevant) and if some conditions are fulfilled, I open the pdf file in the screen with a simple instruction like this:
FollowHyperlink (fichero_pdf_actual_temp)
And let windows10 deal with the application, it opens te file with acrobat reader and the user has it in his screen.
Then the user sees the pdf, signs manually with the installed certificate inside his pc with acrobat reader (inside acrobat going to tools, selecting certificates and signing, the saving) and that is pretty much all.
As often a lot of files have to be signed and I can do the needed checks myself with code (inside “normal” database tables, not relevant for the example) I wonder if there is some way to this signature with vba code.
Any orientation would be welcome. Even a partial idea that saves some "clicks" would be fine.
The certificate is provided by my company and asociated to my company email and user in the company network.
I am not an expert at all in this, but I hope the information is clear.
Thanks
my idea would be to use some commandline application like PDFSign CL and call it via
Shell "PDFSignCL.exe /src=""c:\temp\doc_in.pdf"" /profile=""MySignProfile"""
You can deploy the .exe alongside your application.

Moodle .doc to .pdf conversion doesn't work

When I go to grading and click to attribute a grade to a student, an interface opens: it has a comment section, grade field, etc. and a screen where it's printed "Generating PDF" where the student's homework should be. Except that the PDF is never ever generated, it just leaves a blank page. It happens when the uploaded file is a Word document - didn't test it with other kinds of submission.
Print:
An image is worth more than a thousand words
I've looked it up in Moodle's forum and it seems this issue's pretty common, but I can't really understand what they are saying, 'cause it seems their solutions are directed to those who have a server at home.
My moodle is hosted on a third-party server, I'm not a server owner, I'm merely the website administrator. I do have access to the web hosting account, but don't have enough permissions to install/change/delete server routines and stuff that requires access to a terminal.
Is there anything that I, as a website administrator can do?
To clarify: 1 - I do not know if this is the right place to ask this questions - there are so many "stackoverflow-sites" that I can't keep track. So, feel free to move my topic.
2 - I did search if there was a similar question here and found none. If there is one, it's well hidden and I would appreciate if anyone could provide me with the link to that.
On moodle 3.2 and 3.1 you need unoconv and libreoffice installed on server, so if you can't install software on the server - it will not work.
On 3.3 it could use google services - didn't try it yet...

How to automate sending credentials to a DRM server to open a DRM pdf?

I have a client who wants me to automate certain document processing work.
There is this pdf that can only be opened by sending in username and password to a DRM server.
When I open it using Acrobat, I see this.
I have the username and password, courtesy of the client.
Issue is how do I automate this?
I have done web scraping before, where I automate a web login so that I can execute certain routine tasks.
But this is the first time I am trying to automate an authentication that does not occur inside the browser.
How do I go about doing this?
Companies pay a lot of money to do exactly not this. http://www.adobe.com/devnet/reader/topic_drm.html. I suspect the amount of effort to do this will not be worth it, especially if you are going to try and dive into the actual protocols/plugins used and hook in directly. This would be very implementations specific and likely to break in the future.
Your best bet is to leverage the existing Adobe Application and wrap it in an Automator script. Unfortunately, OSX specific.
They won't have generic workflow hooks, so the quick and nasty way would be to just record yourself doing it once, and play it back time and time again.
Workflow:
Drag PDF onto custom app
Automatically populate username
Automatically populate password
If you are looking for somewhere to start: http://www.macosxautomation.com/automator/features/virtual-user.html
The DRM module itself can set permissions about how you can print and re-distribute the files itself, you won't be able to get around any of that, but assuming you have all the permissions set correctly, you should at least be able to automate opening the file itself on OSX.

Chromium PDF Service

I am wondering if it would be possible to build a print service using the chromium project source code. The idea would be people clicking a print button on our web page would send a call to this service which would return a PDF rendering of the page?
Yes, on the server side you have a CGI script to do the conversion. You can reply with a link to the document, or you can e-mail it. You need to ensure the user spaces are kept separate and that the documents are kept on the server long enough for them to download.
Or you can rely on the observation that many people have PDF output pseudo-devices and can print the page locally.

Tracking through PDF

I am exporting a document as a PDF. It is kept on a publicly accessibly website so that any users can download and read it. Now I want to track this. e.g. "How many times the PDF got opened."
Note that my question is not to track while I download, we need to track when the PDF is opened. Is there any kind of script that is invoked when the PDF is opened so that Adobe Acrobat Reader sends the details to my server?
These are the details I would like:
IP
Date/Time
Possbilly GEO Location.
Yes, you can probably do this. PDF includes a Javascript API, which some (but not all) PDF readers implement. I'm only certain of Acrobat and Foxit Reader doing this, and it can be turned off in both, for security and privacy reasons. That said, it's probably your best shot.
I glanced through the Javascript for Acrobat API Reference, and it looks like you could register for the "Page/Open" event (page 368 in my copy), and on receiving the first one of those, make a Net.HTTP call (page 548) to a web server you're running. That will get you the date/time and the public IP of the client reading the document, from which you can get a geolocation using a service like GeoIP.
I'm not sure this is possible. Although PDF can execute Javascript, reader software is naturally paranoid about malware being embedded in "benign" documents, so the execution context is quite restricted, with warnings shown about possible dangerous activity.
See previous SO question Can my PDF ping my server when it is opened?