Archive for the ‘Adobe Reader’ category

Adobe Acrobat (PDF) files not displaying correctly on iPad?

October 30th, 2012

I have been working on an adobe acrobat export routine on the web that uses ComponentOne’s Active Reports tool to generate the files and I ran into a bit of a snag when trying to display the files on the iPad. I have posted the code below:

HttpResponseMessage message = null;
var pdfExport = new PdfExport();
var m_stream = new System.IO.MemoryStream();

var rpt = new YourActiveReport();
rpt.Run();

pdfExport.Export(rpt.Document, m_stream);
m_stream.Position = 0;
message = Request.CreateResponse(HttpStatusCode.OK);
message.Content = new StreamContent(m_stream);

message.Content.Headers.Add("Content-Disposition", "attachment; filename=yourreportname.pdf");
//this is the magic line
message.Content.Headers.ContentType = new MediaTypeHeaderValue("application/pdf");
return message;

I put a comment on the line that looks like this:
message.Content.Headers.ContentType = new MediaTypeHeaderValue(“application/pdf”);
I didn’t have that line in before and it will work just fine on standard machines like your desktop in your browser but since the ipad either doesn’t allow plugins inside safari or doesn’t know how to handle attachments the pdf was coming back as garbage, basically displaying the raw postscript in the browser, that wasn’t cool. All you have to do is add that line in and all is well, I hope this helps someone.

Adobe disappoints me a bit..

July 6th, 2012

I have been rolling along with my little PDF fillable form and its working great, I got it working on the acrobat reader on Windows and it even works inside Internet Explorer but I noticing it doesn’t work a whole lot of other places, particularly in the mobile world, which is where I forsee my users really want this functionality to end up.

When I open the PDF in safari or chrome, it will let me fill out the form but the submit button does nothing, which surprised me. It turns out each one of those browsers have their own way of handling the pdf form submissions. Here is my findings so far:

IE – Works
Chrome – No Worky
Firefox – Works
Safari – Could not even get it to load, not sure what is going on there

Then I started testing it over on my Kindle and IPhone and iPad, it pulls up on each one of those but again the submit button does nothing, this is very frustrating. Then I found this link and learned that Adobe doesn’t support it yet, so I am waiting on an update.

Adobe Sucks