Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • T ThatPDF
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 12
    • Issues 12
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Filepicker
  • ThatPDF
  • Issues
  • #12
Closed
Open
Issue created Dec 27, 2014 by Kyle Kuo@gyx8899

After we insert a textField annotation, we save it with the pdf page, the textField is disappeared, but it is really saved to the pdf.

When I encounter this problem, i am so surprised with the "right" code in drawing text String. After server days, I found the key of the problem. My code are following:

  • (void) drawInContext:(CGContextRef)context { UIGraphicsPushContext(context); // key 1

    CGContextSetTextMatrix(context, CGAffineTransformMake(1.0,0.0, 0.0, -1.0, 0.0, 0.0)); CGContextSetTextDrawingMode(context, kCGTextFill); // This is the default CGContextSetFillColorWithColor(context, [[UIColor blackColor] CGColor]); [self.text drawInRect:self.rect withAttributes:@{NSFontAttributeName:self.font}];

    UIGraphicsPopContext(); // key 2 }

Assignee
Assign to
Time tracking