![]() UIGraphicsBeginImageContext(CGSizeMake(596,842)) ĬGContextRef currentContext = UIGraphicsGetCurrentContext() ĬGContextTranslateCTM(currentContext, 0, 842) ĬGContextScaleCTM(currentContext, 1.0, -1. 4 Answers Sorted by: 2 Convert your PDF into an image and call: UIImageWriteToSavedPhotosAlbum (UIImage image, id completionTarget, SEL completionSelector, void contextInfo) Share Improve this answer Follow answered at 11:37 Mundi 79. NSURL* url = ĬGPDFDocumentRef document = CGPDFDocumentCreateWithURL ((CFURLRef) url) UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 612, 792), string" drawInRect:CGRectMake(50, 50, 300, 200) withFont: ] UIGraphicsBeginPDFContextToFile(pdfPath, CGRectZero, nil) NSString* pdfPath = [localDocuments create a sample PDF (just for illustration) ![]() I've used A4 dimensions for the PDF, but if you're not in UK / Europe you might need to US letter sizes. How to save a picture as a PDF on iPhone Thirdly, press Save to files, then change the PDF name and output directory. This converts a pdf called test.pdf sitting in the local documents directory to a png called test.png. As - the following fragment will get you going:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |