|
|
pinPDF
Started by anand at 09-24-2007 12:09 . Topic has 7 replies.
 
 
|
|
Sort Posts:
|
|
|
|
09-24-2007, 12:09
|
anand
Joined on 09-24-2007
Posts 2
|
|
|
|
I want to use pinpdf to create pdf documents from web pages but instead
of writting to file system I want to first display generated pdf document in browser
and user should have option to save pdf document from browser.
|
|
|
|
|
Report
|
|
|
|
09-24-2007, 1:51
|
Pintexx Support
Joined on 08-30-2005
Posts 1.574
|
|
|
Hi,
then you have to convert the html content to a pdf file and do something like
response.redirect "my.pdf"
This command depends on the technology you are using.
Regards,
Hans-Peter
|
|
|
|
|
Report
|
|
|
|
09-26-2007, 11:15
|
anand
Joined on 09-24-2007
Posts 2
|
|
|
|
I wan't to use PDF generation for web site. My application will not have file write permision on client machine.
so instead of writting to file system if pdf document generated and displayed in browser and user will be prompted
to open or save document.
|
|
|
|
|
Report
|
|
|
|
09-26-2007, 11:46
|
Pintexx Support
Joined on 08-30-2005
Posts 1.574
|
|
|
Hi,
we will offer saving to a stream in .Net version in next release coming probably end of October.
Regards,
Hans-Peter
|
|
|
|
|
Report
|
|
|
|
09-27-2007, 4:55
|
Pintexx Support
Joined on 08-30-2005
Posts 1.574
|
|
|
Hi,
we have changed our schedule so that we will probably release pinPDF 2.0 next week.
Regards,
Hans-Peter
|
|
|
|
|
Report
|
|
|
|
02-28-2008, 6:36
|
Palanivel
Joined on 02-28-2008
Posts 2
|
|
|
|
I am using .Net 1.1. Could you write some code to use the Process method to write the data into Stream object? Also correct my code below, please:
System.IO.Stream memStream = new System.IO.MemoryStream();
pdfPage.Process(memStream);
byte[] bdata = new byte[memStream.Length];
int i = memStream.Read( bdata,0, (int) memStream.Length-1);
Response.ContentType="application/pdf";
Response.AddHeader("Content-Disposition","inline; filename=testPDF.pdf");
Response.BinaryWrite(bdata);
For the above code, I am getting an error: "File does not begin with '%PDF-'." in Adobe Reader. It seems the byte array is not properly updated by Stream data.
|
|
|
|
|
Report
|
|
|
|
02-28-2008, 8:54
|
Pintexx Support
Joined on 08-30-2005
Posts 1.574
|
|
|
Hi,
just try this:
Response.Clear();
Response.ContentType = "application/pdf";
if(!objPDF.Process(Response.OutputStream)) {
Response.Write(objPDF.ErrorMessage);
}
Response.End();
Regards,
Hans-Peter
|
|
|
|
|
Report
|
|
|
|
02-28-2008, 6:23
|
Palanivel
Joined on 02-28-2008
Posts 2
|
|
|
|
Hans,
This works good!
Thanks!
|
|
|
|
|
Report
|
|
|
|
|
Pintexx Forum » Developer Produ... » pinPDF » Display in browser
|
|
|
|