UITextField not showing on a generated PDF
===

I am making an app where the user can load up a pdf and view it page by page and annotate it.  The user can draw on the screen with different colors and also place textfields on the screen and place their text.

There is one view for the pdf and one view for the annotations.  The created UITextFields are added as subviews of the annotation view (theDrawingView in the code).  These text fields show up fine within the application but when the pdf gets generated to include the annotations, the textfields do not show (all the other annotations do).

I tried to call the drawRect of the textField with both its own bounds and the bounds the other views are using, neither worked.  The only subviews of the drawing view are textfields.

Here is where I do the drawing to generate the pdf:




    for (int i = 0; i < numPages; i++) {
        UIGraphicsBeginPDFPage();
        
        //set the current pages of the views to get each page
        
        [self nextPage];
        
        [thePDFView drawRect:bounds];
        [theDrawingView drawRect:bounds];
        for(UITextField *txt in [theDrawingView subviews]){
            [txt drawRect:txt.bounds];
        }
    }
    
    UIGraphicsEndPDFContext();

Any ideas on how to get the text fields to get drawn on the pdf context?  Thanks