1

I am trying to embed a pdf in a web page. I am using the following code:

<object data='pdf/main.pdf#nameddest=fun&view=FitH' 
        type='application/pdf' 
        width='740' 
        height='800'>

This works in chrome(apart from FitH doesn't work) and firefox and ie for me. However, when viewing on a mac it doesn't work with named destinations(just loads to the top of the pdf if Safari). Also, it doesn't seem to work in Firefox as firefox seems to have disabled adobe plugin by default. Is there a better way to embed a pdf with relative ease and wide compatability?


restkit google maps

I'm using RestKit v0.20.0-pre6 for iOS. My input is JSON from a service running on Google App Engine. This is what is being returned from the service:

  {
    action:"NOP",
    payload:null,
    timeStamp:new Date(1359427714679),
    type:null
  }

This is the error I'm getting displayed from RestKit in the output window:

  E restkit.network:RKResponseMapperOperation.m:240 
  Failed to parse response data: Loaded an unprocessable response (200) with content type 'application/json'

It is choking when NSJSONSerialization is called to parse the data. I'm sure it is the line that contains new Date(1359427714679), but I am unsure on how to parse this line. The RestKit documentation mentions writing your own formatter, but I'm unclear on how to do this.

Any insight on how to solve this issue would be much appreciated.

4

1 回答 1

0

目前最好的方法是使用PDF.js你可以在这里查看演示:pdf.js的演示并从这里下载源代码

它由 Mozilla 开发,得到了广泛的支持/使用。

于 2013-01-29T04:19:13.443 回答