public static string StringFromAnnotationType(PSPDFAnnotationType annotationType)
        {
            IntPtr ptr = _StringFromAnnotationType(annotationType);
            string val = (string)(NSString)Runtime.GetNSObject(ptr);

            return(val);
        }
        public static string StringFromAnnotationType(PSPDFAnnotationType annotationType)
        {
            IntPtr ptr = _StringFromAnnotationType(annotationType);

            string val = (string) (NSString) Runtime.GetNSObject(ptr);

            return val;
        }
示例#3
0
 public static string GetString(PSPDFAnnotationType annotationType)
 {
     return((string)Runtime.GetNSObject <NSString> (_StringFromAnnotationType((nuint)(ulong)annotationType)));
 }
 private static extern IntPtr _StringFromAnnotationType(PSPDFAnnotationType annotationType);
示例#5
0
 public static string StringFromAnnotationType(PSPDFAnnotationType annotationType)
 {
     return (string)Runtime.GetNSObject<NSString> (_StringFromAnnotationType ((uint)annotationType));
 }
示例#6
0
 public virtual PSPDFAnnotation[] AnnotationsForPage(uint page, PSPDFAnnotationType type, CGPDFPage pageRef)
 {
     return AnnotationsForPage_ (page, type, pageRef.Handle);
 }
 public PSPDFAnnotation(CGPDFDictionary annotDict, CGPDFArray annotsArray, PSPDFAnnotationType annotationType)
     : this(annotDict.Handle, annotsArray.Handle, annotationType)
 {
 }
 public PSPDFAnnotation [] AnnotationsForPage(uint page, PSPDFAnnotationType type, CGPDFPage /*CGPDFPageRef*/ pageRef)
 {
     return(AnnotationsForPage_(page, type, pageRef.Handle));
 }
 private static extern IntPtr _StringFromAnnotationType(PSPDFAnnotationType annotationType);
示例#10
0
 public PSPDFAnnotation(CGPDFDictionary annotDict, CGPDFArray annotsArray, PSPDFAnnotationType annotationType) : this(annotDict.Handle, annotsArray.Handle, annotationType)
 {
 }
示例#11
0
 public virtual PSPDFAnnotation[] AnnotationsForPage(nuint page, PSPDFAnnotationType type, CGPDFPage pageRef)
 {
     if (pageRef == null)
         return AnnotationsForPage (page, type, IntPtr.Zero);
     else
         return AnnotationsForPage (page, type, pageRef.Handle);
 }
示例#12
0
 public static string StringFromAnnotationType(PSPDFAnnotationType annotationType)
 {
     return (string) new NSString (_StringFromAnnotationType ((uint)annotationType));
 }
示例#13
0
        public List <AnnotationItem> GenerateParseItem(nuint page, PSPDFAnnotationType type)
        {
            List <AnnotationItem> items = null;

            PSPDFAnnotation[] anns = this.Document.AnnotationsForPage(page, type);
            if (anns != null)
            {
                if (anns.Length > 0)
                {
                    items = new List <AnnotationItem>();

                    PSPDFPageView pageView = this.PageViewForPage(page);
                    if (pageView != null)
                    {
                        for (int i = 0; i < anns.Length; i++)
                        {
                            if (!anns[i].Deleted)
                            {
                                String             dictionaryKey = StringRef.Pen;
                                PSPDFInkAnnotation ann           = (PSPDFInkAnnotation)anns[i];
                                if (ann.LineWidth > 10)
                                {
                                    dictionaryKey = StringRef.Highlighter;
                                }
                                dictionaryKey += " " + i.ToString();

                                // boundingBox
                                String description = String.Empty;
                                String boundingBox = ann.DictionaryValue["boundingBox"].ToString();
                                description += "[BoundingBox]" + boundingBox;

                                // color
                                String color = ann.DictionaryValue["color"].ToString();
                                description += "[Color]" + color;

                                // lineWidth
                                String lineWidth = ann.DictionaryValue["lineWidth"].ToString();
                                description += "[LineWidth]" + lineWidth;

                                // Add description to the dictionary
                                items.Add(new AnnotationItem(dictionaryKey, description));

                                // Lines
                                String points  = String.Empty;
                                String pdfSize = StringRef.pdfSize + pageView.Frame.Width + "x" + pageView.Frame.Height;
                                for (int j = 0; j < ann.Lines.Count; j++)
                                {
                                    if (j != 0)
                                    {
                                        points += StringRef.annDivider;
                                    }

                                    String pointStr = String.Empty;
                                    if (ann.Lines[j] != null && ann.Lines[j].Length > 0)
                                    {
                                        for (int k = 0; k < ann.Lines[j].Length; k++)
                                        {
                                            pointStr += ann.Lines[j][k].ToString();
                                        }
                                    }

                                    List <CGPoint> pointList = AnnotationsDataAccessor.GeneratePointF(pointStr);
                                    if (pointList != null && pointList.Count > 0)
                                    {
                                        points += pdfSize + StringRef.viewPoints;
                                        foreach (CGPoint point in pointList)
                                        {
                                            points += pageView.ConvertPdfPointToViewPoint(point);
                                        }

                                        points += StringRef.pdfPoints;
                                        foreach (CGPoint point in pointList)
                                        {
                                            points += point;
                                        }
                                    }
                                }

                                // Add line points to the dictionary
                                items.Add(new AnnotationItem(dictionaryKey, points));
                            }
                        }
                    }
                }
            }

            return(items);
        }