0

I want to Showing PDF inside iframe for user preview before download the file or print,

i use byte array convert my report file to pdf then showing it.

everything was perfect until i need something in ssl/https.

because of that i must change my application to ssl/https can some one show me how can i show pdf in this condition.

thanks for listening and reading my prob.

here my code

        reportDocument.Load(reportPath);
        reportDocument.SetDataSource(dataSet);
        _contentBytes = StreamToBytes(reportDocument.ExportToStream(ExportFormatType.PortableDocFormat));
       .....
       //setting header
       .....

       //then flush
       stream.Flush();
Chris
  • 75
  • 11
  • Not sure what you're asking here, the same code should work as long as you're using relative references or using the correct URL after checking if `Request.ServerVariables("HTTPS") = on` – Cahit Jan 28 '16 at 21:48
  • nothing wrong with the code. my prob is only because ssl/https don't want to create preview file. in http everything is working because it want to load the pdf. – Chris Jan 28 '16 at 22:05
  • You had mentioned using an iframe do load the PDF file -- can you check if the iframe is also published with SSL? Your issue might be using SSL for the parent but not for the inside frame. – Cahit Jan 29 '16 at 00:12
  • My iframe is already in ssl. I check the network then open the link to my report to open the pdf. It won't open. So i thing the main prob is in open pdf in ssl – Chris Jan 29 '16 at 05:19

1 Answers1

1

i found the solution in PDF conversion suddenly fails if reading stylesheet from SSL the problem is the pdf reader inside my chrome browser. so i updating my chrome reader in store search pdf viewer.. just it..

Community
  • 1
  • 1
Chris
  • 75
  • 11