How to implement the image transfer PDF in iOS development

Source: Internet
Author: User

Quartz 2D Overview

The Quartz 2D is a 2D drawing engine under the core grapgics for iOS and Mac OS x. It has powerful drawing function, provides visual angle effect rendering, anti-aliasing rendering, color Management, drawing PDF and so on.

Developers do not have to consider the display of different device rates, because all of these adaptation operations Quartz are all packed.

Specific quartz can do something, the following figure gives the best answer:

Tool class for pictures to PDF

Using quartz 2D to convert picture data into a PDF without distortion, I've encapsulated:

(The PDF part attribute is not listed, if there is extra need, additional assignment is required)

    
//  WQPDFManager.h    
//  wqphototopdf////    
Created by  Wu Qian on 12-10-22.    
//    
        
#import <Foundation/Foundation.h>    
        
@interface wqpdfmanager:nsobject    
        
/**   
 *  @brief  Create pdf file   
 *   
 *  @param  imgdata         nsdata   photo Data   
 *  @param  destFileName    NSString-generated PDF filename   
 *  @param  pw              nsstring The password to be set *
/+ (void) wqcreatepdffilewithsrc :(NSData *) imgdata    
                    todestfile: (NSString *) destFileName Withpassword    
                  : (NSString *) pw;    
        
        
/**   
 *  @brief  throw a PDF file to store the address   
 *   
 *  @param  filename    nsstring   
 * *  @return NSString Address * * (
NSString *) Pdfdestpath: (NSString *) filename;    
        
@end

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.