Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / New versions of HTML2PDF and PDFCreatorLib
<< . 1 . 2 .
Author Message
Anonymous
# Posted: 14 Mar 2007 05:10


Hi Stan,

Thanks a lot for your help. But still we are struggling with the AutoLaunch option. The code with "pdf.AutoLaunch = true; " is producing the pdf while debugging; but fails when the site is published in IIS. Kindly help us to locate and fix the error. Even advice us if we need to register those dll's.


Thanks
Padmanabhan.

Stanislav
Member
# Posted: 14 Mar 2007 05:45


Dear Padmanabhan,

Yes, when you're using AutoLaunch with debugger account, ShellExecute method works on development machine, but this is not correct way to show file to the user from IIS.
You should use BinaryImage and write PDF to the responce, this way PDF will be opened in the user's browser.

Also, if you want to write file somewhere on the server, please check write permissions for this directory for the ASP.NET process.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Anonymous
# Posted: 14 Mar 2007 06:52


[b]Hi Stan,

We have seen the code u asked to look.

But we have issues on converting Object to Bytes in that code.

How could I implement the code which u posted in the forum earler.

PdfImage = PDF.BinaryImage

response.BinaryWrite PdfImage
response.End

We have problem in these conversion.


Please reply it is critical

Ur sample code for ur reference
PDFCreatorPilot3Lib.PDFDocument3 pdf = new PDFCreatorPilot3Lib.PDFDocument3Class();

pdf.StartEngine("", "");

//pdf.AutoLaunch = true;

pdf.LogActionsAndErrors = true;

pdf.FileName = Server.MapPath("samTest.pdf");

pdf.BeginDoc();

HTML2PDFAddOn.HTML2PDF2 html2pdf2 = new HTML2PDFAddOn.HTML2PDF2();

html2pdf2.StartHTMLEngine("", "");

html2pdf2.ConnectToPDFLibrary(pdf);

string htmlFile = Server.MapPath("PDFTemp.htm");

html2pdf2.LoadHTMLFile(htmlFile);

html2pdf2.ConvertAll();

html2pdf2.DisconnectFromPDFLibrary();

pdf.EndDoc();



Thanks,
Padu


Stanislav
Member
# Posted: 14 Mar 2007 09:34


Dear Padmanabhan,

Something like this:

PDF.GenerateInMemoryFile = true;
PDF.BeginDoc()
// document generation

PDF.EndDoc();

int nBytes = (int)PDF.MemoryFileSize;
Byte[] PDFBytes = new Byte[nBytes];
Array.Copy((System.Array)PDF.BinaryImage, PDFBytes, nBytes);

Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Type", "application/pdf");
Response.AddHeader("Content-Disposition", "inline; filename=file.pdf");
Response.BinaryWrite(PDFBytes);
Response.End();

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Anonymous
# Posted: 15 Mar 2007 02:14


Hi Stan,

Thanks a lot we are able to generate PDF.
But, While we are executing the code we found PDF is generating in the same page.
We need to generate as a seperate PDF form.

Please help us to meet this requirement.

Thanks,
Padu

Stanislav
Member
# Posted: 15 Mar 2007 02:55


Dear Padu,

Sorry, please explain, can't understand.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Anonymous
# Posted: 15 Mar 2007 05:06


Hi Stan,

We got solution for the problem Please tell us if there any limitation in trail version. Because we have tried in remote server, but we unable to produce pdf. We have installed the same .msi which we installed in the local machine. Please suggest us, we need test this in remote server.

Thanks,
Padmanaban.D

Stanislav
Member
# Posted: 15 Mar 2007 05:27


Dear Padu,

Do you have any error on the remote server ?

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Anonymous
# Posted: 15 Mar 2007 08:54


hi Stan,

No we didn' get any error in remote server. Pdf is not produced when we publish this in the static machine. We really don't know what is happening, because we installed the same exe in the static machine. But if we try the same deployed code in my local machine the pdf gets generated. Please tell us if something to be added if host in the remote server.

Thanks,
Padu.

Stanislav
Member
# Posted: 15 Mar 2007 11:00


Dear Padu,

If you're using web license on your development machine, you need to send us hardware id for the server. Do you have a web license ?
If not and you're not using BinaryImage on the server, please check write permissions to the target directory.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Anonymous
# Posted: 16 Mar 2007 00:55


Hi stan,

We are getting error in the static machine and i have pasted the error message below, please kindly help Us.

Unable to cast COM object of type 'PDFCreatorPilot3Lib.PDFDocument3Class' to interface type 'PDFCreatorPilot3Lib.IPDFDocument3'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{11D3D317-C7AD-4895-8BE4-1236F78CC63A}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Thanks & Regards.

Padmanaban.D

Stanislav
Member
# Posted: 16 Mar 2007 03:12


Dear Padu,

Please try to change code to

PDFCreatorPilot3Lib.PDFDocument3Class pdf = new PDFCreatorPilot3Lib.PDFDocument3Class();

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Anonymous
# Posted: 16 Mar 2007 04:58


Hi Stan,

Please give the phone number to contact.
We will call now and we need to close this. Since we are finding issues while publish as website and acessing in the remote machine.

Thanks,
Padu

Stanislav
Member
# Posted: 16 Mar 2007 05:12


Dear Padu,

Sorry, i'm available only by e-mail or on the forum or Skype in chat mode.
You can use our support form to contact me, please select PDF Creator Pilot as a subject.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Hevenz
# Posted: 12 Apr 2007 03:00


Hi,
Is there any way we can dump the file to the disk rather than reading through the memory like --> Response.BinaryWrite(PDFBuffer) --- to ---> C:test.pdf

Stanislav
Member
# Posted: 12 Apr 2007 06:55


Hello,

Yes, of course.

...
PDF.Filename = "C:test.pdf"
PDF.BeginDoc
...
PDF.EndDoc

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

smita
# Posted: 7 Jan 2008 06:40


hi when i add reference of PDFCreatorPilot3Lib i get following error message
type 'PDFCreatorPilot3Lib.PDFDocument3' is not defined

<< . 1 . 2 .
 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.016

 

Page top