/* Use this method on systems that don't have Deflater stream or when troubleshooting. private void AddPageContent(Page page) { Newobj(); Append("<<\n"); Append("/Length "); Append(page.buf.Length); Append("\n"); Append(">>\n"); Append("stream\n"); Append(page.buf); Append("\nendstream\n"); Endobj(); page.buf = null; // Release the page content memory! page.contents.Add(objNumber); } */ private int AddAnnotationObject(Annotation annot, int index) { Newobj(); annot.objNumber = objNumber; Append("<<\n"); Append("/Type /Annot\n"); Append("/Subtype /Link\n"); Append("/Rect ["); Append(annot.x1); Append(' '); Append(annot.y1); Append(' '); Append(annot.x2); Append(' '); Append(annot.y2); Append("]\n"); Append("/Border [0 0 0]\n"); if (annot.uri != null) { Append("/F 4\n"); Append("/A <<\n"); Append("/S /URI\n"); Append("/URI ("); Append(annot.uri); Append(")\n"); Append(">>\n"); } else if (annot.key != null) { Destination destination = destinations[annot.key]; if (destination != null) { Append("/F 4\n"); Append("/Dest ["); Append(destination.pageObjNumber); Append(" 0 R /XYZ 0 "); Append(destination.yPosition); Append(" 0]\n"); } } if (index != -1) { Append("/StructParent "); Append(index++); Append("\n"); } Append(">>\n"); Endobj(); return index; }
internal void AddAnnotation(Annotation annotation) { annots.Add(annotation); if (pdf.compliance == Compliance.PDF_UA) { StructElem element = new StructElem(); element.structure = StructElem.LINK; element.language = annotation.language; element.altDescription = annotation.altDescription; element.actualText = annotation.actualText; element.annotation = annotation; structures.Add(element); } }