Welcome to Pintexx Forum Sign in | Join | Faq

pinPDF

Started by anand at 09-24-2007 12:09 . Topic has 7 replies.

Print Search
Sort Posts:    
   09-24-2007, 12:09
anand is not online. Last active: 24.09.2007 09:07:19 anand

Top 500 Posts
Joined on 09-24-2007
Posts 2
Display in browser
Reply Quote

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 is not online. Last active: 30.12.2008 07:11:54 Pintexx Support

Top 10 Posts
Joined on 08-30-2005
Posts 1.574
Re: Display in browser
Reply Quote
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 is not online. Last active: 24.09.2007 09:07:19 anand

Top 500 Posts
Joined on 09-24-2007
Posts 2
Re: Display in browser
Reply Quote

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 is not online. Last active: 30.12.2008 07:11:54 Pintexx Support

Top 10 Posts
Joined on 08-30-2005
Posts 1.574
Re: Display in browser
Reply Quote
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 is not online. Last active: 30.12.2008 07:11:54 Pintexx Support

Top 10 Posts
Joined on 08-30-2005
Posts 1.574
Re: Display in browser
Reply Quote
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 is not online. Last active: 28.02.2008 16:48:26 Palanivel

Top 500 Posts
Joined on 02-28-2008
Posts 2
Re: Display in browser
Reply Quote

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 is not online. Last active: 30.12.2008 07:11:54 Pintexx Support

Top 10 Posts
Joined on 08-30-2005
Posts 1.574
Re: Display in browser
Reply Quote
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 is not online. Last active: 28.02.2008 16:48:26 Palanivel

Top 500 Posts
Joined on 02-28-2008
Posts 2
Re: Display in browser
Reply Quote

Hans,

This works good!

Thanks!


   Report 
Pintexx Forum » Developer Produ... » pinPDF » Display in browser