How to convert ics file to pdf format programatically? - c#

I have an ics file. I want to convert it to pdf format programatically using c#. Can you please tell me how can i do that programatically. Do i need to use any dll for that?

If you don't want to approach the ics file as a flat file (as flat text), you can use something like DDay.iCal to get to the data through an Object Model. From there on, you'd use e.g. iTextSharp to create your pdf.

You will need a pdf conversion library. There are several available, some paid, some free.
Here'a an example of a free one: http://www.pdfsharp.com/PDFsharp/

You can work with .ics file like with simple text file. So you can use any library which allow to create pdf.
I use itextsharp. You can download it here: http://sourceforge.net/projects/itextsharp/

You can use the NET library Aspose.iCal to parse the ICS file
http://www.aspose.com/community/blogs/salman.sarfraz/archive/2008/11/21/where-is-aspose-icalendar.aspx (used to be http://www.aspose.com/categories/file-format-components/aspose.network-for-.net/default.aspx)
And the using iTextSharp at http://sourceforge.net/projects/itextsharp/ or similar software create the PDF.

Related

Convert Html to PDF with link to a specific location in another PDF

I'm converting a group of HTML files to PDF in C#.
Wkhtmltopdf did the job perfectly, but now I need to add a link to a location in another pdf and wkhtmltopdf doesn't seem to be able to do that.
Creating links to point to another location in the same document is easy:
Link
Also, linking to another document works well:
Link
However, I need to link to a specific location in a different document.
The simple method with wkhtmltopdf fails here:
This link doesn't work
This is supported in PDF specification with Remote Go-To actions.
PDF Reference, p. 520:
How can this be achieved in C#?
I need the converter to support CSS 3, so I think the way to go would be to first convert the HTML to PDF with wkhtmltopdf and then use a library to edit the PDF to correct the links.
How to do this practically? Which library to use and how to use it?
UPDATE:
I've created a feature request for wkhtmltopdf on GitHub. However, this question is still relevant.

How to convert Excel to Html using OpenXml

Currently, I can convert Word to Html using OpenXml with ConvertToHtml method. But I can not apply this method for SpeardSheetDocument file (xlxs). So how can I similarly convert the excel file to Html via OpenXml. Or is there any other approach for my situation ? It would be better if I can convert powerpoint file (ppt) to Html too.
I know there is a library called Interop but if I use this I need to install microsoft office, but I dont want to install those softwares.
Thank all !

Making a pdf copy of a csv file programmatically in C#

I have a csv file and I need to make a pdf copy in the console application that creates the csv. All I have found 3rd party libraries for working with pdf but I don't want to use that. Can I just make a copy and save it as a pdf? If so, how?
Also, I'm using C#, in case you didn't read the title.
Try the below link hope it will help you.
http://sourceforge.net/project/platformdownload.php?group_id=72954
You can open the csv with excel.
than use office PIA (interop) to save as PDF.
see:
Can I use Microsoft Office 2010: Primary Interop Assemblies to convert word,excel to PDF
first read the csv files using c# code, and load that data's into DataTable,
write the datatable values into pdf file using c#
may this idea will help 4 u

Replacing contents inside docx and pdf file using asp.net c#

In my application I am using some templates in docx and pdf format. I am storing this docs to DB as Bytes.
Befor showing/sending this docs back to user or application I need to replace some contents inside the doc. eg:if the doc contain ##username## I need to replace this with the exact username of the customer. I am not getting a proper solution for this. Any good ideas?
For the docx file, your best bet is to use OpenXML, and instead of having special text like ##username##, replace it with a content control that you can fill in.
Since you specified docx, you can use OpenXML, which is great, it's an API. If it has to work with older doc files, then you'll have to automate Word (which should be avoided if at all possible).
For the PDF, your best bet is to create a PDF form, and fill it in a runtime (using a tool like itextsharp).
HTH,
Brian
For DOC / DOCX:
You should use the MSWord object model through MSWord assembly reference (will work only on machines which have msoffice installed.. or else you can use something like ASPOSE word libraries which wont need msoffice installation on server). You can programmatically trigger the Find-Replace context of word through the library's API.
For PDF: You will need a third party library for editing pdf files.. 3rd party libraries like ABCpdf are available.. (not sure whether Adobe itself has something for this)
The same mechanism like for word library.. but I am not sure whether you will be able to trigger the Find-replace context here or do something else... I have not used a pdf generation library.

Need the .NET PDF library to edit pdf info

I need the 100% .NET library to edit PDF Info like Author, Title, Creator, Subject and Keywords. All PDF libraries I tried are unable to do this without completely resaving the hole PDF documents. So for huge files (>35MB) it takes too much time. I need only to update several text fields (see above) and I don't need to resave the entire document for this.
Is there any lib that can do it like image libraries change IPTC/EXIF fields (without changing the original image)?
Thanks for any help,
Murat
iTextSharp (hosted here) ?

Categories

Resources