473,800 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTML to PDF using .net code or 3rd party component

Hi,

I need to convert HTML (online or offline) to PDF in C# application. In
addition I want to merge PDF documents also on the fly. I am looking
for C# / VB.NET code or a .NET component which can be referenced in my
project and accomplish the required tasks.

I have browsed but didn't find a suitable code or component to
accomplish the above task. I will really appreciate any help or pointer
in this.

Thanks
Dinesh

May 15 '06 #1
2 1746
We recently did some research into this and found that there are only a
couple of ways to do it without dropping a ton of cash for an on-the-fly
converter:

1) Upload the file into a folder which a component has a "watch" on. When
the file is put there, component sees it and does a "print" to a PDF
conversion "printer" that puts it into a predefined directory
2) Send the "print" command to the "PDF printer" and allow it to place the
PDF where you have it configured

The problem we found with these is that you don't know when the PDF creation
is finished, and there's no way to definitively tell there was an error. Some
printers output error.pdf if it encounters one, but in a multi-user
environment, you don't known if that was your doc or somebody elses.

The solution we found that gave you an API to the PDF interface was over
$1700 and made by ActivePDF. if you have that kind of cash theirs looked like
the most comprehensive. or at least check out the options I outlined above,
also available from them.

There are very cost-effective ways to create a PDF on the fly, but none that
are easy for conversion purposes. I think ActivePDF has a creator that's only
like $30. So if you can take the content of your page and manually write that
to a PDF, you'll have it made pretty cheaply using any of the wide array of
creators that are out there.
--
KMG Software, Inc.
Thinking Beyond, Above, and Before
http://www.kmgsoftware.com
"dc*****@gmail. com" wrote:
Hi,

I need to convert HTML (online or offline) to PDF in C# application. In
addition I want to merge PDF documents also on the fly. I am looking
for C# / VB.NET code or a .NET component which can be referenced in my
project and accomplish the required tasks.

I have browsed but didn't find a suitable code or component to
accomplish the above task. I will really appreciate any help or pointer
in this.

Thanks
Dinesh

May 15 '06 #2
Thanks a lot for the prompt reply.

Your methodology looks great. As my application is a desktop
application. Only single user will be using the application, so your
strategy should work fine. I have used cutepdf writer (printer) and I
think it will work here also.

But I am not sure how I am going to save HTML first locally with images
etc. for print. What I require is a pdf conversion of any html page. In
this case I think I have to always first download and save that html
page locally to the desktop and in this process I might loose the
format, images etc. of HTML.

What I was looking for is a way by which I will assign the URL and it
should be converted to pdf.

Do you think that the above can be done ?

Thanks
Dinesh
DeltaX Solutions
http://www.deltaxsolutions.com
Brandon@KMG wrote:
We recently did some research into this and found that there are only a
couple of ways to do it without dropping a ton of cash for an on-the-fly
converter:

1) Upload the file into a folder which a component has a "watch" on. When
the file is put there, component sees it and does a "print" to a PDF
conversion "printer" that puts it into a predefined directory
2) Send the "print" command to the "PDF printer" and allow it to place the
PDF where you have it configured

The problem we found with these is that you don't know when the PDF creation
is finished, and there's no way to definitively tell there was an error. Some
printers output error.pdf if it encounters one, but in a multi-user
environment, you don't known if that was your doc or somebody elses.

The solution we found that gave you an API to the PDF interface was over
$1700 and made by ActivePDF. if you have that kind of cash theirs looked like
the most comprehensive. or at least check out the options I outlined above,
also available from them.

There are very cost-effective ways to create a PDF on the fly, but none that
are easy for conversion purposes. I think ActivePDF has a creator that's only
like $30. So if you can take the content of your page and manually write that
to a PDF, you'll have it made pretty cheaply using any of the wide array of
creators that are out there.
--
KMG Software, Inc.
Thinking Beyond, Above, and Before
http://www.kmgsoftware.com
"dc*****@gmail. com" wrote:
Hi,

I need to convert HTML (online or offline) to PDF in C# application. In
addition I want to merge PDF documents also on the fly. I am looking
for C# / VB.NET code or a .NET component which can be referenced in my
project and accomplish the required tasks.

I have browsed but didn't find a suitable code or component to
accomplish the above task. I will really appreciate any help or pointer
in this.

Thanks
Dinesh


May 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1763
by: Nunya D. Bidness | last post by:
If anyone is interested in testing these components goto http://www.vibrantinnovations.com/vibrantlayouttools.asp The Vibrant Layout Tools ActiveX component is a suite of tools that allow developers to create WYSWIG Layouts in a snap. The toolset allows developers to easily impliment object oriented rich visual layouts that can be saved in a structured developer defined (extension wise) file format that is similiar to MS Word and can...
1
1858
by: aur56 | last post by:
I am using stringbuilder to create a html email message that is basically a two column table with the field name in one column, and the field value in another, and about 30 rows. I don't get any errors when the code runs, but there seems to be always one field that has the wrong background color, or has a "!" in the text of the e-mail message. On the e-mail message, when I click "View Source", I see that at the end of many rows, there is...
7
25371
by: Rathtap | last post by:
I want to write a C# application (lets call it Generator) that will receive an argument(patient account number) and dynamically generate a series of linked HTML files (claim information, payments, denials etc) by querying a database based on the argument. This Generator can be called from an aspx web page, a Cold Fusion page as well as from a windows application. 1. Does this C# app have to be a console application to receive arguments?...
27
8365
by: Michael C | last post by:
Anyone know of a good HTML Rendering control? I need a control that will render and display HTML in a Windows form. It doesn't need to pull down HTML pages from the Web - I'll feed it all the HTML it needs to display. I've already spent way too much time trying to get the Microsoft WebBrowser control to work, and I have too many other things to work on to waste any more time on it. If you know of any third-party HTML Renderers out there,...
4
3054
by: Valerian John | last post by:
I am looking for a way to sort of redirect the Page.Response content to a pdf generator component that would create a pdf file on the fly! I wonder if there is such a thing in the .net world. I see a java based product that may do this (from CORDA). This is really my problem: My asp.net page creates a complex report using web controls and I would like to be able to overcome browser printing issues by converting the resulting html to...
4
7676
by: Hongbo | last post by:
Hi, I'd like to create PDF file with tables in ASP.NET application in C# without using any third party component. I did some search online and only found the following link: http://www.c-sharpcorner.com//1/PDFFileGeneratorPKS.asp The code was published by Pramod Kumar Singh. His code didn't use any component, but it lacks the detail of the syntax
1
3676
by: Lee Greco | last post by:
I'm looking for some advice on how to proceed. Here's the scenario: I've got to develop a high availability VB.Net web service that basically acts as a middle man between the web service clients and a third party data provider. The third party data provider is accessed over a well defined TCP interface. The third party data server can accept about 25 concurrent TCP connections from the same client.
17
6259
by: Janiv Ratson | last post by:
Hello, I have written a C# dll in VS2005. One interface and class are exported using Interop Services. I want to use this c# dll in my MFC application, using VS2003. It compiles after I imported the dll to my MFC app. On runtime I get class not registered HR error in my MFC project. I use the code as follow: _NewActivationPtr myActivation = NULL;
2
1523
by: Brian Simmons | last post by:
Hi, Long story short: I've got a website built, and we moved it over to the production server, which is an SSL-required (https://...) server. A third party component that I'm using makes use of an <iframe>. Unfortunately they set the SRC attribute to "". This causes Internet Explorer to display a message box dialog warning about this page contains non-secure and secure items, do you wish to display the non-secure items, Y/N?
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10507
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10255
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10036
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9092
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7582
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4150
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.