Generate PDF file without using third party DLL [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Can you please help me in generating PDF file using c# and without using 3rd party dll?
Expect all possible solutions/ideas/suggestions.
Thanks,
Anil

You can create a rdlc file and export it to PDF using the built-in function of ReportViewer.
Using ReportViewer you can also create a report and export it to PDF at runtime (without preview).

Is the pdf fromat a strict requirement? If not, it is a bit easier to create html or rtf documents, if you can't use 3 part libraries.
If it is a requirement, you can create a pdfdocument (example here) and create a text-template (like this one) to replace the data you want.

Related

what is the best way to export content in excel [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a report data which comes from back end service (.NET) and report format in HTML table.(angular)
I need to export this report to excel with Angular front end.
what would be the best way to achieve this? I found couple of ways which would be the better one or suggest if you find any other way
1. export the html table with xlsx package available on npm.
2. send http request which will get all the data from back end service including html.
Please also let me know what would the ideal solution for handling export to excel functionality. Is there any documentation Microsoft provides?
I use EPPlus on the back end in ASP.NET to generate Excel files. Open source, works great, far easier to deal with than manually creating the XLSX packages, and it supports a number advanced Excel features.

Export datagrid data to MS Word with style [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am using WPF windows application and I want to export data-grid data to Microsoft Word with background colors. Please suggest a way to do it.
I think you will need to use Microsoft.Office.Interop.Word namespace ... this is a walk-through https://msdn.microsoft.com/en-us/library/ee342218.aspx ... I guess you will be making use of the Table interface .
You will need msword at your machine and wherever your application is deployed.
Personally, if i had an option then i would export the data as CSV format and indicate the colour in one of the values.
That said, i don't really know the limitations but this should get you going .. alternatively try to find an open source lib that can help you with this. That is AFAIK there is no out of the box solution by .Net

Convert Microsoft Word Document to array in C# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a table (N x M) in Microsoft Word Document (.docs). How can I read this table in C# and enter all values in 2-dim array (N x M)?
You can use third party library or the dedicated Microsoft OpenXML SDK to do this. Here's some documentation about how word tables works using the OpenXML SDK.
Also, as mentionned, docx are packed zip with xml files inside them, you can go the brute way or using COM Interop.
.docx file is a zip archive with some service files insde. You can programmaticaly unpack file, containing your data and read it as standart xml-file.
If you want to use COM, you should:
Create COM object
Open required .docx
Navigate throught doc to table
Read it cell by cell

Validate Excel Data in C# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I would like to validate Excel data according to the following before importing into a database:
Some columns have a maximum length
Some columns are numbers/dates
There must be no special characters
How can i go about this? (I am using C#)
EDIT: How do I validate an Excel column to have a maximum text length using Interop, for example, if I do not want the text to be more than 30 characters long? #JMK #artm #Linger #ivan_pozdeev #BenR
Use the Microsoft OpenXML SDK for Office to open the file and examine its contents. Library is available here http://msdn.microsoft.com/en-us/library/office/bb448854(v=office.15).aspx
Open XML SDK will be a great start
try this guide from MSDN - http://msdn.microsoft.com/EN-US/library/office/gg575571(v=office.15).aspx
NOTE - Open XML SDK is free to use and distribute. Go through documentation and first try to understand how Spreadsheets are structured. Also Open XMl SDK support ONLY open XMl file foramts, that means .XLSX as default for exel and NOT .XLS

How to generate a report in PDF and DOC with Console Application? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to generate a report by the Console Application to DOC and PDF how can I do this?
Use:Itextsharp
ITextSharp is a library used to create PDF documents. It provides all of the primitive functions necessary to create a PDF document. However, since all of the methods are based on primitive operations, it is easy to confuse the look and feel of a document without enforcing certain standards. This helper class provides two key benefits. First, it simplifies the creation of PDF documents. Second, it helps enforce standards in terms of the look and feel of a document.

Categories

Resources