Skip to content

PDF Annotation Highlighter and Pen Tool not working #74

Open

Description

@yhelfronda

Hi,

I'm currently using your library on my existing project but I have an issue when using the highlighter and pen. If your using just one finger it doesn't work but when I tried 2 fingers it worked. I don't know what causes this issue. But when I try to use it on new project one finger worked when using pen and highlighter

Here's CG_CONTEXT_SHOW_BACKTRACE:

<Error>: CGContextRestoreGState: invalid context 0x0. Backtrace:
  <_TFC9UXMPDFKit17PDFPathAnnotationW5colorCSo7UIColor+164>
   <_TFC9UXMPDFKit17PDFPathAnnotations5colorCSo7UIColor+152>
    <_TFC9UXMPDFKit24PDFHighlighterAnnotationcfT_S0_+200>
     <_TFC9UXMPDFKit24PDFHighlighterAnnotationCfT_S0_+28>
      <_TTWC9UXMPDFKit17PDFPathAnnotationS_13PDFAnnotationS_FS1_CfT_x+24>
       <_TFC9UXMPDFKit23PDFAnnotationControllerP33_5512D3F841EECEA3D762B93CDA4482EC19createNewAnnotationfT_T_+168>
        <_TFC9UXMPDFKit23PDFAnnotationController12touchesBeganfTGVs3SetCSo7UITouch_4withGSqCSo7UIEvent__T_+832>
         <_TToFC9UXMPDFKit23PDFAnnotationController12touchesBeganfTGVs3SetCSo7UITouch_4withGSqCSo7UIEvent__T_+116>
          <<redacted>+336>
           <<redacted>+60>
            <<redacted>+1948>
             <<redacted>+3192>
              <<redacted>+340>
               <<redacted>+2400>
                <<redacted>+4268>
                 <<redacted>+148>
                  <<redacted>+24>
                   <<redacted>+540>
                    <<redacted>+744>
                     <CFRunLoopRunSpecific+424>
                      <GSEventRunModal+100>
                       <UIApplicationMain+208>
                        <main+76>

Environment

  • iOS Version: 10.0
  • Xcode Version: 8.3.2
  • Swift Version: 3.0

Activity

  1. scottcc commented on Nov 7, 2017

    @scottcc

    I have this feeling you may not be understanding how the toolbar UI seems to be built - if you use the default tools, touching the "Pen" expands it to allow you to choose between Pen and Highlighter. You have to pick one of those, then it will work.

    There is a separate issue that while signing, two-finger touches will both zoom the page and start drawing a new annotation from the first finger (less good). But, that's a separate thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions