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


All forums · Statistics · Search ·

Two Pilots forum / For software developers / Saving to webserver
Author Message
Matt
# Posted: 20 Dec 2007 09:51


Hi
I can't seem to get this code to save to a folder, i have set aspnet full permission on the webroot. any ideas?

PDFCreatorPilot3Lib.PDFDocument3Class pdf = new PDFCreatorPilot3Lib.PDFDocument3Class();
// Declare PDFImage as Array
System.Array PDFImage;
long size;
pdf.StartEngine("demo@demo", "demo");
pdf.GenerateInMemoryFile = true;
pdf.BeginDoc();
pdf.PDFPAGE_SetActiveFont("Verdana", false, false, false, false, 14, PDFCreatorPilot3Lib.TxFontCharset.charsetANSI_CHAR SET);
pdf.PDFPAGE_TextOut(20, 40, 0, "HELLO, PDF !");
pdf.AutoLaunch = false;
pdf.EndDoc();
size = pdf.MemoryFileSize;
PDFImage = (System.Array)pdf.BinaryImage;
Byte[] PDFBuffer = new Byte[size];
Array.Copy(PDFImage, PDFBuffer, size);
Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Type", "application/pdf");
Response.AddHeader("Content-Disposition", "inline;filename=Temp test.pdf");
Response.BinaryWrite(PDFBuffer);
pdf.FileName = "c:Temp test.pdf";
Response.End();
pdf = null;

 

 

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

 

Page top