/** * Constructs a PDF Collection. */ public PdfCollection() { this(new PdfDictionary()); }
/** * Creates a new PdfSignatureApp */ public PdfSignatureApp() { super(new PdfDictionary()); }
/** * Creates a new PdfOCProperties instance. * * @param document the document the optional content belongs to */ public PdfOCProperties(PdfDocument document) { this((PdfDictionary) new PdfDictionary().makeIndirect(document)); }
/** * {@inheritDoc} */ public void invoke(PdfCanvasProcessor processor, PdfLiteral operator, List<PdfObject> operands) { processor.beginMarkedContent((PdfName) operands.get(0), new PdfDictionary()); }
/** * Creates a new {@link PdfTarget} object given its type. The type must be either * {@link PdfName#P}, or {@link PdfName#C}. If it is {@link PdfName#C}, additional entries must be specified * according to the spec. * * @param r the relationship between the current document and the target */ private static PdfTarget create(PdfName r) { PdfTarget pdfTarget = new PdfTarget(new PdfDictionary()); pdfTarget.put(PdfName.R, r); return pdfTarget; }
public TagReference addProperty(PdfName name, PdfObject value) { if (properties == null) { properties = new PdfDictionary(); } properties.put(name, value); return this; }
public PdfUserProperty(String name, boolean value) { super(new PdfDictionary()); setName(name); setValue(value); }
/** * Constructs a namespace defined by the given namespace name. * @param namespaceName a {@link PdfString} defining the namespace name (conventionally a uniform * resource identifier, or URI). */ public PdfNamespace(PdfString namespaceName) { this(new PdfDictionary()); put(PdfName.Type, PdfName.Namespace); put(PdfName.NS, namespaceName); }
/** * Constructs a PDF Collection Sort Dictionary. * * @param keys the keys of the fields that will be used to sort entries */ public PdfCollectionSort(String[] keys) { this(new PdfDictionary()); getPdfObject().put(PdfName.S, new PdfArray(Arrays.asList(keys), true)); }
public PdfEncryptedPayload(String subtype) { this(new PdfDictionary()); getPdfObject().put(PdfName.Type, PdfName.EncryptedPayload); setSubtype(subtype); }
private PdfDictionary getNamespaceRoleMap(boolean createIfNotExist) { PdfDictionary roleMapNs = getPdfObject().getAsDictionary(PdfName.RoleMapNS); if (createIfNotExist && roleMapNs == null) { roleMapNs = new PdfDictionary(); put(PdfName.RoleMapNS, roleMapNs); } return roleMapNs; }
/** * Constructs a PDF Collection Sort Dictionary. * * @param key the key of the field that will be used to sort entries */ public PdfCollectionSort(String key) { this(new PdfDictionary()); getPdfObject().put(PdfName.S, new PdfName(key)); }
public PdfUserPropertiesAttributes() { super(new PdfDictionary()); getPdfObject().put(PdfName.O, PdfName.UserProperties); getPdfObject().put(PdfName.P, new PdfArray()); }
public PdfStructElem(PdfDocument document, PdfName role) { this((PdfDictionary) new PdfDictionary().makeIndirect(document)); getPdfObject().put(PdfName.Type, PdfName.StructElem); getPdfObject().put(PdfName.S, role); }
public PdfStructureAttributes(PdfNamespace namespace) { super(new PdfDictionary()); getPdfObject().put(PdfName.O, PdfName.NSO); getPdfObject().put(PdfName.NS, namespace.getPdfObject()); }
/** * Indicates that the group contains a pagination artifact. * @param pe one of the following names: "HF" (Header Footer), * "FG" (Foreground), "BG" (Background), or "L" (Logo). */ public void setPageElement(String pe) { PdfDictionary usage = getUsage(); PdfDictionary dic = new PdfDictionary(); dic.put(PdfName.Subtype, new PdfName(pe)); usage.put(PdfName.PageElement, dic); usage.setModified(); }
private void updateValueInMarkInfoDict(PdfName key, PdfObject value) { PdfDictionary markInfo = catalog.getPdfObject().getAsDictionary(PdfName.MarkInfo); if (markInfo == null) { markInfo = new PdfDictionary(); catalog.getPdfObject().put(PdfName.MarkInfo, markInfo); } markInfo.put(key, value); }
public PdfMcrDictionary(PdfPage page, PdfStructElem parent) { super(new PdfDictionary(), parent); PdfDictionary dict = (PdfDictionary) getPdfObject(); dict.put(PdfName.Type, PdfName.MCR); dict.put(PdfName.Pg, page.getPdfObject()); dict.put(PdfName.MCID, new PdfNumber(page.getNextMcid())); }
public PdfObjRef(PdfAnnotation annot, PdfStructElem parent, int nextStructParentIndex) { super(new PdfDictionary(), parent); annot.getPdfObject().put(PdfName.StructParent, new PdfNumber(nextStructParentIndex)); annot.setModified(); PdfDictionary dict = (PdfDictionary) getPdfObject(); dict.put(PdfName.Type, PdfName.OBJR); dict.put(PdfName.Obj, annot.getPdfObject()); }
public Shading(com.itextpdf.kernel.pdf.colorspace.PdfShading shading) { super(new PdfDictionary()); getPdfObject().put(PdfName.Type, PdfName.Pattern); getPdfObject().put(PdfName.PatternType, new PdfNumber(2)); getPdfObject().put(PdfName.Shading, shading.getPdfObject()); }