开发者

how to convert jpeg file to pdf file in iphone?

I want to convert jepg file into pdf file in an iphone application...

Do anyon开发者_JS百科e know any link or tutorial or any idea about this?


All you can do is load the image file and draw it into a newly created PDF context:

  1. Load the JPEG file into a UIImage.
  2. Create a new PDF context with CGPDFContextCreate() or CGPDFContextCreateWithURL().
  3. Add a page to the PDF context with CGPDFContextBeginPage().
  4. Draw the image into the PDF context. You will probably have to play a bit with the coordinate systems and the size of the image, depending on how you want the image to appear in the PDF.
  5. Call CGPDFContextEndPage() and CGPDFContextClose().
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜