I don't really know where to start with this project. I've done a bit of research on here and haven't found exactly what I need. Essentially, I have a form that a user will navigate to, fill out several texts boxes/radio buttons. I have a submit button at the bottom that submits the data into my SQL database. I'm working in Visual Basic (C#/ASP).
After submission, I would like to include an option to save the webform as a PDF and an option, if possible, to email a copy of that webform to another user/group. I'm thinking the easiest way to do that would be to just include the save as pdf option and then the user can go to their personal email and do it that way.
Is there any basic "Save Webform as PDF" code template or any tips you all can give me? Feel free to post links to other questions/forums as I tried to read as much as I could over the past few days.
As always, thanks for any help.
Here is a page that shows how to create a PDF from textbox data using iTextSharp.
https://forums.asp.net/t/1906686.aspx?convert+aspx+page+into+pdf+and+send+the+pdf+as+attachment
This page shows how to send a PDF through email.
https://www.codeproject.com/Questions/459105/Convert-web-page-to-pdf-and-send-it-as-attachment
Good Luck!
Here are a few .NET libraries that will convert HTML or WebPages to PDF
PDFSharp: http://www.pdfsharp.net/?AspxAutoDetectCookieSupport=1
Free .NET PDF Library: https://marketplace.visualstudio.com/items?itemName=E-iceblueCoLtd.FreeNETPDFLibrary
iText 7: https://github.com/itext/itext7-dotnet
You could produce a receipt page and then give the user the option to convert that page to pdf for their records using one of these libraries.
Related
I have hundreds of PDF files that i need to present to users. When presenting these files through my MVC web app i don't want the users to have the ability to download the files, e.g.. i don't want the Acrobat reader controls for print/save showing up. Reading this stackoverflow post it seems that it's not possible to disable those controls.
I know users can still take screen shots and print out the page, but that's not an issue in my case.
What is the best way to go about this. I've reasearched using SWFTOOLS which looks like it may be a good solution, but i dont want to save the swf files to my filesystem. The optimal solution is PDF.js, but another problem i have is users will be accessing the files through IE8 - so PDF.js is out of the question. Unless there is another similar library that will convert the files to HTML 4.
Basically I just need to display the PDF files, on the fly would be best, in a different format than PDF
Any suggestions?
I had a similar project a while back, where sensitive pdfs were needed to be displayed to specific users but they weren't allowed to download/print/save it.
Since it was a web app I ended up using pdf.js. It is Mozilla's PDF renderer for firefox. It renders the pdf on to a canvas and by default has all the bells and whistles. If you have firefox, open a pdf file to see it in action.
It was tough to get it running at first but I ended up using a demo I found online as the base of the project. After removing each functionality that was forbidden the finished product did exactly what was required. You will need to add a print css file to block printing or find a better solution. I ended up using the css approach since print preview by passed my javascript check for the print action. Also ensure you block ctrl + s which allows the user to save the pdf.
Another aspect to note is that it works better on later versions of IE and struggles on older versions as the file size increases. Firefox and chrome are not a problem and I believe its the same for opera although I haven't tested that.
I would convert it to an image file, you can find tools or write script to do it, I personally would do it by displaying them in browser first and then use browser plug-ins to take screenshot of the entire webpage.
(you can automate this)
then just display then converted pdfs
**this is probably not the best solution :( **
I am trying to generate a fillable PDF document that can be viewed in the web browser and filled up so after pushing a "Submit" button the data from the fields can be received on the server.
I am reading an article related with the iTextSharp but i still can not find a way of getting my mission accomplished. The example there is with a HTML form that after submitted the fields get binded to a pdf Template.
Is this my only option?
There are a few online options.
formsite - unlimited pdf generation for about $50, but you have to manually connect the fields.
doculicious - automated creation of embed-able pdf form
logiforms - same as formsite, but a little nicer and more options in other areas
seamlessdocs - very nice email/web pdf automated (still checking them out, but so far so good)
If you want to display a fillable form, and then store the values when the user submits it, you might be better off with just an HTML form. A basic HTML form doesn’t require any extra tools, and won’t get PDF involved. This is the simplest solution to your question. If you need to use PDF, and have to provide the user with a copy of the filled out form, please clarify in the OP, and I can provide you with a mode detailed solution.
In ASP .NET is there a way to create a winform (or something of the sort) as a pdf viewer rather than using the browser?
I need to restrict print, url to pdf and right click to save as image or anything else. If I can do this through the browser, where can I find some sample code?
I understand there are hacks to get that PDF downloaded and PRINT SCREEN is another option as well as any image capture program. This is in a INTRANET site so these things I am aware of and not worried about. We just need to make it difficult for non tech employees.
The PDF's hold important reporting information that we do not want print and leave in there office anymore.
Anyone have sample code to achieve this or any tutorial or any leads to the direction I need to take to achieve this?
FYI, site in 3.5 and Webforms...upgrade to 4 or 4.5 has not been approved yet.
Thanks in advance
I want to show PDF Files in my asp.net(C#) web page.I found lot of pdf viewer for .net web page.But i want to do something more than that. I meant, i have retrieved bookmarks in the PDF files programatically using C# and then displayed in the TreeView.So, Whenever user click any Node, then i want to select(highlight) the appropriate ranges of the PDF file that is displayed in the PDF Viewer.
For example, see my attached picture...
Please lead me to get out of this problem...
Thanks & Regards,
P.SARAVANAN
Maybe you could get some ideas from this article: http://www.codeproject.com/Articles/41933/ASP-NET-PDF-Viewer-User-Control-Without-Acrobat-Re
I have a web page in which user has to enter many details.
I want to fetch the records that are being entered by the user and generate a pdf file, and also preview it in a browser.
I also want to save the pdf into the database.
Can anyone help me to understand how this process should start?? I mean how should I proceed?
I am using Visual Studio 2008 and mysql. I have adobe reader installed on my system. What else do I need?
Can I get the tutorials or code samples which will help me.
thank you
Adobe Reader is just what it says, a Reader application, and will not help with generating a PDF. I recommend you to have a look at iTextSharp
You'll need a third party library for the pdf generation, such as Report.net or ITextSharp.
The problem I see with browser preview, is that I don't know of a good way of doing it. If you just want to show them the data that goes in to the PDF, then just displaying that on a web page is easy enough. The problem is previewing the actual PDF. That will require the user to have some sort of PDF reader installed, and it will also require that their browser opens the PDF automatically and doesn't try to save it instead. It also has the problem of how the user will "get back" to your website once they're done with the previewing.