Is it possible to convert a webpage along with images and preserving styles into PDF document using open libraries like iTextSharp using C#.
Yes but.
iText[Sharp]'s style support is spotty at best. Your absolute best html->pdf bet is wkhtmltopdf. I haven't tried it personally, but it seems to have all its ducks in a row.
Related
I have PDF document data with table structure format and I would like to convert that PDF file into a text file with the same structure with margin and spaces between text in pdf
You need to write your own PDF tool then. Which is not exactly an easy task. Honestly, 3rd party tools make your job much easier, why don't you want to use one?
If you change your mind, I can suggest iTextSharp. I've used it in the past with great success. Here are some example to get you going:
http://www.codeproject.com/Articles/12445/Converting-PDF-to-Text-in-C
ps. there are 3 tools used in there.
I am using iTextSharp to generate a pdf invoice.
I have a template for the invoice which is very simple, but uses CSS3 for the formatting and styling.
when I display the page in a browser it works fine, but when I try to generate the page into a pdf using itextsharp it seems to ignore all the CSS3 formatting for some reason.
My question is: Is there a way to get it to work with CSS? Or is that a limitation of iTextSharp ?
Are your stylesheets linked with an absolute path or a relative one? PDF converters don't tend to work too well with relative paths.
i'm trying to create a PDF by using database in ASP C#. PDF will include just titles and contents so what do i have to use to do such a thing and can you provide me a some examples? Thank you.
You can use iTextSharp which is an open source pdf library.
You can find a documentation format here.
Book reference : iText in Action
Generate PDF using iTextSharp can be a good startup on how to use iTextSharp to generate PDF using asp.net.
I would go for html -> pdf conversion. You can use a free command line utility wkhtmltopdf for it.
If you want something more complex like prepare multiple templates or store history of pdf outputs. Look at free reporting server jsreport. ( I am the author)
can someone tell me if AcrobatAccessLib (Acrobat Access 3.0 Type Library) in com references can be used for text searching in pdf document?
It contains class PDDom, but I dont know if I can load document into it or, how to work with it.
(I dont wanna use iTextSharp, and others, I tryied it but not works as I wanted - pdf has corrupted number paging + contains tables, that are across 2 pages - iTextSharp finds me searching text on both pages - instead of 1, but if I use Acrobat Reader - it works well)
EDIT: Or another question, Can I use acrobat reader and its searching module in my application?
I am working in c#
Thanks a lot!
Try to use PDFLIBNET.DLL
in that dll have pdfwrapper class, this class provides lots methods to get text from pdf. The FindText method used to get a text from a particular position, and exportToText method gives content of pdf page
from that content u will search the pdf content..
am using tat DLL and searching the pdf content with out any issue..
try it and let me know..
If money is not an issue, I would by the Aspose PDF components. They work pretty well and are built for server usage.
I want to create some reports on my asp.net website in PDF format. I need a way to do this easy. I am not using fancy text directions or things like that. What do you recommand I should choose?
iTextSharp is free.
However, any PDF library will require you to define fonts etc.