如何在iPhone中添加PDF格式的文本字段?
是否可以在PDf文件中添加文本字段和标签,并向这些字段添加id,以便我们以后可以通过相应的id访问这些字段?是的,如下所示:如何在iPhone中添加PDF格式的文本字段?,iphone,ios,pdf,Iphone,Ios,Pdf,是否可以在PDf文件中添加文本字段和标签,并向这些字段添加id,以便我们以后可以通过相应的id访问这些字段?是的,如下所示: CGContextBeginPage(yourPDFContextRef,nil); //Draw view into PDF UIView *aPageNote=[[UIView alloc]initWithFrame:CGRectMake(0,0, 612, 892)]; //provide height and width of pdf page aPag
CGContextBeginPage(yourPDFContextRef,nil);
//Draw view into PDF
UIView *aPageNote=[[UIView alloc]initWithFrame:CGRectMake(0,0, 612, 892)]; //provide height and width of pdf page
aPageNote.backgroundColor=[UIColor whiteColor];
//turn PDF upsidedown
CGAffineTransform aCgAffTrans = CGAffineTransformIdentity;
aCgAffTrans = CGAffineTransformMakeTranslation(0,892);
aCgAffTrans = CGAffineTransformScale(aCgAffTrans, 1.0, -1.0);
CGContextConcatCTM(yourPDFContextRef, aCgAffTrans);
//add UI Control here to UIVIEW
UIImageView *aImgViewSign = [[UIImageView alloc] initWithFrame:frame];
aImgViewSign.image = [imageArray objectAtIndex:index];
[aPageNote addSubview:aImgViewSign];
[aPageNote.layer renderInContext:yourPDFContextRef];
[aPageNote release];
CGContextEndPage (yourPDFContextRef);