2012-10-18 44 views
1

我有一个应用程序,其中PDF显示在UIWebView中,最重要的是,我把一些需要填充的UITextFields。问题是,当我从这些视图生成新的PDF时,PDF(来自UIWebView)分辨率保持不变,但来自UITextFields的文本是模糊的。如何解决这个问题?iPad的UIView到PDF - 低分辨率

我有以下的代码来生成PDF:

// Creates a mutable data object for updating with binary data, like a byte array 
    NSMutableData *pdfData = [NSMutableData data]; 

    // Points the pdf converter to the mutable data object and to the UIView to be converted 
    UIGraphicsBeginPDFContextToData(pdfData, aView.bounds, nil); 
    UIGraphicsBeginPDFPage(); 
    CGContextRef pdfContext = UIGraphicsGetCurrentContext(); 


    // draws rect to the view and thus this is captured by UIGraphicsBeginPDFContextToData 

    [aView.layer renderInContext:pdfContext]; 

    // remove PDF rendering context 
    UIGraphicsEndPDFContext(); 

回答