HTML to PDF

The PDF Creator .NET Library enables you to create secure PDF documents on the fly and to view, print and process existing PDF documents. If you have any questions about PDF Creator .Net, please post them here.

HTML to PDF

Postby htmltopdf on Wed Aug 03 2005

Can i use PDF Creator .Net to convert HTML source to PDF stream?
is there any sample? pls post.
htmltopdf
 
Posts: 1
Joined: Wed Aug 03 2005

Postby Joan on Thu Aug 04 2005

Hello,

No, the PDF Creator enables you to view and edit existing pdf files and to create new PDFs from scratch.

If you wish to convert HTML documents to PDF you need to use our PDF Converter. This is a printer driver to which you can print your HTML file to get PDF output.

Hope this helps.
Joan
Amyuni Team
 
Posts: 2799
Joined: Wed Sep 11 2002

Re: HTML to PDF

Postby asuwandarathne on Tue Feb 23 2010

private void button2_Click(object sender, EventArgs e)
{
acPDFCreatorLib.Initialize();
acPDFCreatorLib.SetLicenseKey("string company", "string license id");
string inFile = Application.StartupPath + @"\docs\" + "Html.html";
string outFile = Application.StartupPath + @"\docs\" + "Html.pdf";

SetupPrinter("Html.pdf");

Process pr = new Process();

pr.StartInfo.FileName = "Html2PDF.exe";
pr.StartInfo.Arguments = string.Format(@"""{0}"" ""{1}"" ""SWPC Field Report Writer PDF Converter""", inFile, outFile);

MessageBox.Show("HTML - PDF created");
}


private static void SetupPrinter(string fileName)
{

gPDF = new CDIntfEx.CDIntfEx();

gPDF.DriverInit("SWPC Field Report Writer PDF Converter");

gPDF.DefaultDirectory = Application.StartupPath;

gPDF.DefaultFileName = Application.StartupPath + @"\docs\" + fileName;

gPDF.SetDefaultPrinter();

gPDF.EnablePrinter("string company", "string license");
}
asuwandarathne
 
Posts: 4
Joined: Mon Feb 22 2010


Return to Amyuni PDF Creator .NET (PDF Viewer / Editor)

Who is online

Users browsing this forum: No registered users and 1 guest