Image of the first pdf page ios sdk

后端 未结 4 2107
醉酒成梦
醉酒成梦 2020-12-13 22:35

Do you know how to save into a UIImageView the first page of a pdf file? I have to create the preview for the pdf. Do you have any idea?

Thanks for help Nicco

4条回答
  •  执念已碎
    2020-12-13 22:56

    There are ways of taking screenshots of UIViews:

    Look Here http://www.icodeblog.com/2009/07/27/1188/

    Also look here: How Do I Take a Screen Shot of a UIView?

    this might be hacky, but you could open the PDF in a UIWebview take the screenshot of the first page using code in one of the above links to a UIImageView. Then close the PDF.

提交回复
热议问题