PdfDictionary getMK() { PdfDictionary mk = (PdfDictionary)get(PdfName.MK); if (mk == null) { mk = new PdfDictionary(); put(PdfName.MK, mk); } return mk; }
PdfObject subtype = annot.get(PdfName.SUBTYPE); if (subtype == null) { throw new PdfAConformanceException(obj1, MessageLocalization.getComposedMessage("annotation.type.1.not.allowed", "null")); PdfDictionary ap = getDirectDictionary(annot.get(PdfName.AP)); if (ap != null) { if (ap.contains(PdfName.R) || ap.contains(PdfName.D)) { PdfArray rect = getDirectArray(annot.get(PdfName.RECT)); if (rect != null && rect.size() == 4) { PdfNumber index0 = rect.getAsNumber(0);
markUsed(annots); if (!annot.isUsed()) { PdfRectangle rect = (PdfRectangle) annot.get(PdfName.RECT); if (rect != null && (rect.left() != 0 || rect.right() != 0 || rect.top() != 0 || rect.bottom() != 0)) { int rotation = reader.getPageRotation(pageN);
annots.add(annot.getIndirectReference()); if (!annot.isUsed()) { PdfRectangle rect = (PdfRectangle)annot.get(PdfName.RECT); if (rect != null && (rect.left() != 0 || rect.right() != 0 || rect.top() != 0 || rect.bottom() != 0)) { int rotation = reader.getPageRotation(pageN);
markUsed(annots); if (!annot.isUsed()) { PdfRectangle rect = (PdfRectangle) annot.get(PdfName.RECT); if (rect != null && (rect.left() != 0 || rect.right() != 0 || rect.top() != 0 || rect.bottom() != 0)) { int rotation = reader.getPageRotation(pageN);
annots.add(annot.getIndirectReference()); if (!annot.isUsed()) { PdfRectangle rect = (PdfRectangle)annot.get(PdfName.RECT); if (rect != null && (rect.left() != 0 || rect.right() != 0 || rect.top() != 0 || rect.bottom() != 0)) { int rotation = reader.getPageRotation(pageN);
PdfDictionary getMK() { PdfDictionary mk = (PdfDictionary)get(PdfName.MK); if (mk == null) { mk = new PdfDictionary(); put(PdfName.MK, mk); } return mk; }
PdfObject subtype = annot.get(PdfName.SUBTYPE); if (subtype == null) { throw new PdfAConformanceException(obj1, MessageLocalization.getComposedMessage("annotation.type.1.not.allowed", "null")); PdfDictionary ap = getDirectDictionary(annot.get(PdfName.AP)); if (ap != null) { if (ap.contains(PdfName.R) || ap.contains(PdfName.D)) {
public void setAppearance(PdfName ap, PdfTemplate template) { PdfDictionary dic = (PdfDictionary)get(PdfName.AP); if (dic == null) dic = new PdfDictionary(); dic.put(ap, template.getIndirectReference()); put(PdfName.AP, dic); if (!form) return; if (templates == null) templates = new HashSet<PdfTemplate>(); templates.add(template); }
public void setAppearance(PdfName ap, PdfTemplate template) { PdfDictionary dic = (PdfDictionary)get(PdfName.AP); if (dic == null) dic = new PdfDictionary(); dic.put(ap, template.getIndirectReference()); put(PdfName.AP, dic); if (!form) return; if (templates == null) templates = new HashSet<PdfTemplate>(); templates.add(template); }
public void setAdditionalActions(PdfName key, PdfAction action) { PdfDictionary dic; PdfObject obj = get(PdfName.AA); if (obj != null && obj.isDictionary()) dic = (PdfDictionary)obj; else dic = new PdfDictionary(); dic.put(key, action); put(PdfName.AA, dic); }
public void setAdditionalActions(PdfName key, PdfAction action) { PdfDictionary dic; PdfObject obj = get(PdfName.AA); if (obj != null && obj.isDictionary()) dic = (PdfDictionary)obj; else dic = new PdfDictionary(); dic.put(key, action); put(PdfName.AA, dic); }
public static PdfAnnotation shallowDuplicate(PdfAnnotation annot) { PdfAnnotation dup; if (annot.isForm()) { dup = new PdfFormField(annot.writer); PdfFormField dupField = (PdfFormField)dup; PdfFormField srcField = (PdfFormField)annot; dupField.parent = srcField.parent; dupField.kids = srcField.kids; } else dup = annot.writer.createAnnotation(null, (PdfName)annot.get(PdfName.SUBTYPE)); dup.merge(annot); dup.form = annot.form; dup.annotation = annot.annotation; dup.templates = annot.templates; return dup; } }
public static PdfAnnotation shallowDuplicate(PdfAnnotation annot) { PdfAnnotation dup; if (annot.isForm()) { dup = new PdfFormField(annot.writer); PdfFormField dupField = (PdfFormField)dup; PdfFormField srcField = (PdfFormField)annot; dupField.parent = srcField.parent; dupField.kids = srcField.kids; } else dup = annot.writer.createAnnotation(null, (PdfName)annot.get(PdfName.SUBTYPE)); dup.merge(annot); dup.form = annot.form; dup.annotation = annot.annotation; dup.templates = annot.templates; return dup; } }
public void setAppearance(PdfName ap, String state, PdfTemplate template) { PdfDictionary dicAp = (PdfDictionary)get(PdfName.AP); if (dicAp == null) dicAp = new PdfDictionary(); PdfDictionary dic; PdfObject obj = dicAp.get(ap); if (obj != null && obj.isDictionary()) dic = (PdfDictionary)obj; else dic = new PdfDictionary(); dic.put(new PdfName(state), template.getIndirectReference()); dicAp.put(ap, dic); put(PdfName.AP, dicAp); if (!form) return; if (templates == null) templates = new HashSet<PdfTemplate>(); templates.add(template); }
public void setAppearance(PdfName ap, String state, PdfTemplate template) { PdfDictionary dicAp = (PdfDictionary)get(PdfName.AP); if (dicAp == null) dicAp = new PdfDictionary(); PdfDictionary dic; PdfObject obj = dicAp.get(ap); if (obj != null && obj.isDictionary()) dic = (PdfDictionary)obj; else dic = new PdfDictionary(); dic.put(new PdfName(state), template.getIndirectReference()); dicAp.put(ap, dic); put(PdfName.AP, dicAp); if (!form) return; if (templates == null) templates = new HashSet<PdfTemplate>(); templates.add(template); }