I'm generating PDF files from RDLC report programaticaly without a viewer (ASP.NET 2.0 C#).
I would like to find a way to send it directly via email without downloading the PDF file. Thanks for any help.
I would suggest these two approaches.. See which one fits best for you
http://weblogs.asp.net/rajbk/archive/2006/03/02/How-to-render-client-report-definition-files-_28002E00_rdlc_2900_-directly-to-the-Response-stream-without-preview.aspx
http://www.codeproject.com/KB/reporting-services/PDFUsingSQLRepServices.aspx
I think Jonathon has posted exactly what you need in this answer to my (similar) question a few days ago:
Distributing RDLC output as an email attachment
Related
I have an intranet web site based app, where I want to do the following:
When a user presses the button, a server-side xlsx template gets filled in with the relevant data from the back-end table and then the file is saved as both xlsx and pdf format.
The reason to save xlsx is to (maybe) make it easier to save as pdf. The pdf version will then be emailed to the user for review.
I cannot use external libraries, so need to do it all from scratch.
Given that, MSFT does not recommend using office automation libraries, what would be the best approach? Any suggestions would be greatly appreciated.
I understand that this is a broad question, but I am looking for ideas and suggestions. Thanks much in advance.
To generate XLSX from a web application, you do not need an XL library. Just generate a table. But, before that, set the content type of the output to a spreadsheet mime type.
Response.buffer=true
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=report.xls"
The browser will download the file as an XL and most spreadsheet programs will process it as a spreadsheet file without any problem.
However, PDFs cannot be generated without a library.
http://www.gnostice.com/nl_article.asp?id=288&t=Can_I_create_and_edit_PDFs_without_using_a_third_party_PDF_library
I think the best solution is using ReportViewer Local control to create a report that could easily exported as XLS or PDF. You could also use its Render method to do it programmatically.
here is a different type of requirement in my project regarding pdf.
I want to generate a pdf with few of prefilled values. rest of the fields can be filled by user so Pdf should allow the user to edit the pdf so that he can save it locally on his system.
The pdf may contain checkboxes and textboxes.
I have worked with "itextsharp", "abc pdf" and "Rad Pdf".
For this purpose i can't use "Rad Pdf", due to some limitations by project owner.
Please share your valuable answers to give me a proper way to do this task.
Looking forward for your replies.
You need to use Adobe Professional, you can turn your existing electronic or paper forms into fillable forms with a few clicks.
http://adobe.ly/Ydc7qb
Acrobat Reader XI provides features to save eForms out of the box.
Provided your clients are using this version of Acrobat they will be able to fill in and save standard PDF forms.
The only problem you may have relates to older versions of Acrobat Reader which did not have this feature.
So any eForm produced using ABCpdf or indeed any PDF library should work the way you want provided your clients have a recent version of Acrobat Reader.
ABCpdf includes an example project called 'Annotations' which shows how to create eForms in this way.
My replies may feature concepts based around ABCpdf .NET because it's something I work on. :-)
I have a complicated report that I need to draw with GDI+ (I don't know of a better way) with multiple pages and have it save to PDF so the user can download. What is the best way to do this?
Not sure how complex your report is and what you are doing with GDI+ but here's some ideas that may help:
Checkout ITextSharp and/or PDFSharp.
The spark view engine also has pdf generation built in.
As another thought.... If you have access to SQL Report server and/or at least it's client and can use it to create your report you can generate and call from .Net MVC and output as PDF.
Check out this SO answer:
Asp.Net MVC how to get view to generate PDF
There is another way of doing it, install Bullzip on the server, and using the COM interface, you can programmatically print it out to a pdf document which I would think would be less hassle...simply select the Bullzip PDF Printer as the active printer and print it out to a destination pdf folder. Have a look at this here to see how the COM works...the COM interface is the same as bioPDF's COM model.
Hope this helps,
Best regards,
Tom.
I'm a fan of Data Dynamics ActiveReports myself. Probably has a little do with the fact that they're local in town, and if I have a problem I can just call them up. Very good reporting engine though. Prints directly to PDF.
I want to read pdf file and i want to store it's detail in my database.
But i could not read pdf file & store it in sql database in asp.net using c#. So, please give me a solution if anyone knows...
Very very thanx in advance
If you need to effectively parse the contents of the PDF file, you may want to use a PDF management library such as iTextSharp. Otherwise, you could just store the raw file contents using a binary field in your table.
Please see these article, May be these will help you.
http://www.codeproject.com/KB/string/pdf2text.aspx
http://www.codeproject.com/showcase/TallComponents.asp
Else if you can purchase adobe toolkit for this then it will very easy for you to play with PDF.
I'm looking for an easy way of printing output to a pdf file for users, especially data grids. Formatting options would be a plus.
Potential scenario -> Users view page with 2 data grids -> Users click print -> Page opens a pdf file that they can save/print
Our budget is tight, so a free solution would be ideal, but I'd like to look into and evaluate any other solutions as well.
Thanks for the help!
For a solution using open source iTextSharp, check this article out:
Creating PDF documents in ASP.NET
The question was also discussed here on SO:
How to make pdf ?
Crystal Reports in a PDF file? (check out the link in JP's response)