Thank you for answer, I think I 've solved the problem (now I am testing), 
follow the information:

 

1-The system has a questionnarie to get information from the user and then send 
the data into a PDF. Finally the user opens the PDF with the information given.

 

2-I am using C# to program the system

 

3-The PDFs open without problems in Internet Explorer versions 9 or below

 

To solve the problem I've changed the following code:

 

To open the PDF I was using:

 

                //using (FileStream pdfOutputFile = new 
FileStream(outputFilePath, FileMode.Create))

                //{

                                               ..........

                                               //formFiller = new 
PdfStamper(reader, pdfOutputFile);

 

                       // Get the form fields

                        AcroFields addressChangeForm = formFiller.AcroFields;

 

                        // Fill the form

                        addressChangeForm.SetField("Mensaje PDF", 
objDatos.MensajePDF);

 

                                               ......................

 

               //JMM

                //Response.ContentType = "application/pdf";

                //Response.AppendHeader("Content-Disposition", "attachment; 
filename=" + filePath.Substring(filePath.LastIndexOf(@"\") + 1));

                //Response.TransmitFile(filePath);

                //Response.Flush();

                //Response.Close();

 

The new code:

 

                        MemoryStream _MemoryStream = new MemoryStream();

                        formFiller = new PdfStamper(reader, _MemoryStream);

 

 

                       // Get the form fields

                        AcroFields addressChangeForm = formFiller.AcroFields;

 

                        // Fill the form

                        addressChangeForm.SetField("Mensaje PDF", 
objDatos.MensajePDF);

 

                           ..........................

 

                       
//*******************************************************JMM

                        HttpContext.Current.Response.ClearContent();

                        HttpContext.Current.Response.ClearHeaders();

    HttpContext.Current.Response.ContentType = "application/pdf";

    HttpContext.Current.Response.AddHeader("Content-Disposition", 
"attachment;filename=" + 

                                                          
outputFilePath.Substring(outputFilePath.LastIndexOf(@"\") + 1));

                        
HttpContext.Current.Response.BinaryWrite(_MemoryStream.ToArray());

                        HttpContext.Current.Response.End();

 

                        _MemoryStream.Dispose();

 

I hope this will be useful.

 

Best regards

 

 

 

 

 

De: 1T3XT BVBA [mailto:i...@1t3xt.info] 
Enviado el: Tuesday, August 06, 2013 11:38 AM
Para: itext-questions@lists.sourceforge.net
Asunto: Re: [iText-questions] Problem with Internet Explorer 10

 

On 6/08/2013 17:26, Macedo Muth, Javier wrote:

        Good morning my name is Javier Macedo and I would like to know where to 
report a problem with iTextSharp, I hope is here.

         

        The problem is: I am using ie10 and when I try to open a PDF file, some 
times I have to press the Cancel button one or two times and try again to open 
the PDF file (other times it open correctly)

         

        ¿Could you recommend me something to solve the problem?


No, because you don't give us sufficient information.
You're not telling us what your web app is supposed to do.
You're not telling us if you created an app in Java, C#,...
You're not telling us if your PDFs open fine in other browser.
Basically you're not telling us anything that helps us help you.

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to