UGH

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
nelson4183
Posts: 4
Joined: Tue Dec 07 2004
Location: Wisconsin

UGH

Post by nelson4183 »

This just isn't making sense to me.

I'm using C# and ASP .Net. All I want to do is pull some (html) text from a database, maybe load it in a literal (I would prefer to send the string directly to the PDF Printer) and then print the damn page to PDF.

I've seen the post for c# examples, but that doesn't work for me. I keep getting a "device not ready" error when I try to set the default printer.
-Also, I always return 0 when i use DriverInit();
-im supposed to use printDoc.Print() but how am I supposed to do that when I never get to add anything to the printDoc.
-am I supposed to be using the .Net printDoc or the CDIntfEx.Document

Maybe it's just me, but it seems that the documentation is real hard to understand. Some examples use the ActiveX, some use unmangaed code and pointers, some don't....what the heck?


CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfExClass() ;

int j = PDF.DriverInit ("Amyuni PDF Converter");
j = PDF.EnablePrinter ("Suite Evaluation Developer Pro", CODE);

PDF.DefaultDirectory = "c:\\";
//Complete path of resulting PDF document
PDF.DefaultFileName = "c:\\fromCsharp.pdf";
//Set printer as default
bool b = PDF.SetDefaultPrinter();
PDF.FileNameOptionsEx = (int)(NO_PROMPT + USE_FILE_NAME);
j = PDF.EnablePrinter ("", CODE);

//supposedly some code to printDoc.Print()

PDF.RestoreDefaultPrinter();
PDF.FileNameOptions = 0;
PDF.DriverEnd();
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

If you need to convert HTML text to PDF, the best way is to convert your HTML text to HTML pages and print these pages to the PDF Printer.

Will this help?

You can use our HTML2PDF tool from the command prompt to convert HTML pages to PDF.

If you are evaluating our PDF Converter or any of our products and you need specific help, you can contact support@amyuni.com or europe.support@amyuni.com.

Hope this helps.
Post Reply