/** * Sets the title of this outline * @param title */ public void setTitle(String title) { put(PdfName.TITLE, new PdfString(title, PdfObject.TEXT_UNICODE)); }
/** * Sets the title of this outline * @param title */ public void setTitle(String title) { put(PdfName.TITLE, new PdfString(title, PdfObject.TEXT_UNICODE)); }
/** * Sets the title of this outline * @param title */ public void setTitle(String title) { put(PdfName.TITLE, new PdfString(title, PdfObject.TEXT_UNICODE)); }
put(PdfName.C, new PdfArray(new float[]{color.getRed()/255f,color.getGreen()/255f,color.getBlue()/255f})); flag |= 1; if (flag != 0) put(PdfName.F, new PdfNumber(flag)); if (parent != null) { put(PdfName.PARENT, parent.indirectReference()); put(PdfName.DEST, destination); put(PdfName.A, action); if (count != 0) { put(PdfName.COUNT, new PdfNumber(count));
put(PdfName.C, new PdfArray(new float[]{color.getRed()/255f,color.getGreen()/255f,color.getBlue()/255f})); flag |= 1; if (flag != 0) put(PdfName.F, new PdfNumber(flag)); if (parent != null) { put(PdfName.PARENT, parent.indirectReference()); put(PdfName.DEST, destination); put(PdfName.A, action); if (count != 0) { put(PdfName.COUNT, new PdfNumber(count));
/** * Recursive method used to write outlines. */ void outlineTree(PdfOutline outline) throws IOException { outline.setIndirectReference(writer.getPdfIndirectReference()); if (outline.parent() != null) outline.put(PdfName.PARENT, outline.parent().indirectReference()); java.util.List<PdfOutline> kids = outline.getKids(); int size = kids.size(); for (int k = 0; k < size; ++k) outlineTree(kids.get(k)); for (int k = 0; k < size; ++k) { if (k > 0) kids.get(k).put(PdfName.PREV, kids.get(k - 1).indirectReference()); if (k < size - 1) kids.get(k).put(PdfName.NEXT, kids.get(k + 1).indirectReference()); } if (size > 0) { outline.put(PdfName.FIRST, kids.get(0).indirectReference()); outline.put(PdfName.LAST, kids.get(size - 1).indirectReference()); } for (int k = 0; k < size; ++k) { PdfOutline kid = kids.get(k); writer.addToBody(kid, kid.indirectReference()); } }
/** * Recursive method used to write outlines. */ void outlineTree(PdfOutline outline) throws IOException { outline.setIndirectReference(writer.getPdfIndirectReference()); if (outline.parent() != null) outline.put(PdfName.PARENT, outline.parent().indirectReference()); ArrayList kids = outline.getKids(); int size = kids.size(); for (int k = 0; k < size; ++k) outlineTree((PdfOutline)kids.get(k)); for (int k = 0; k < size; ++k) { if (k > 0) ((PdfOutline)kids.get(k)).put(PdfName.PREV, ((PdfOutline)kids.get(k - 1)).indirectReference()); if (k < size - 1) ((PdfOutline)kids.get(k)).put(PdfName.NEXT, ((PdfOutline)kids.get(k + 1)).indirectReference()); } if (size > 0) { outline.put(PdfName.FIRST, ((PdfOutline)kids.get(0)).indirectReference()); outline.put(PdfName.LAST, ((PdfOutline)kids.get(size - 1)).indirectReference()); } for (int k = 0; k < size; ++k) { PdfOutline kid = (PdfOutline)kids.get(k); writer.addToBody(kid, kid.indirectReference()); } }
put(PdfName.C, new PdfArray(new float[]{color.getRed()/255f,color.getGreen()/255f,color.getBlue()/255f})); flag |= 1; if (flag != 0) put(PdfName.F, new PdfNumber(flag)); if (parent != null) { put(PdfName.PARENT, parent.indirectReference()); put(PdfName.DEST, destination); put(PdfName.A, action); if (count != 0) { put(PdfName.COUNT, new PdfNumber(count));
/** * Recursive method used to write outlines. */ void outlineTree(PdfOutline outline) throws IOException { outline.setIndirectReference(writer.getPdfIndirectReference()); if (outline.parent() != null) outline.put(PdfName.PARENT, outline.parent().indirectReference()); ArrayList kids = outline.getKids(); int size = kids.size(); for (int k = 0; k < size; ++k) outlineTree((PdfOutline)kids.get(k)); for (int k = 0; k < size; ++k) { if (k > 0) ((PdfOutline)kids.get(k)).put(PdfName.PREV, ((PdfOutline)kids.get(k - 1)).indirectReference()); if (k < size - 1) ((PdfOutline)kids.get(k)).put(PdfName.NEXT, ((PdfOutline)kids.get(k + 1)).indirectReference()); } if (size > 0) { outline.put(PdfName.FIRST, ((PdfOutline)kids.get(0)).indirectReference()); outline.put(PdfName.LAST, ((PdfOutline)kids.get(size - 1)).indirectReference()); } for (int k = 0; k < size; ++k) { PdfOutline kid = (PdfOutline)kids.get(k); writer.addToBody(kid, kid.indirectReference()); } }
/** Helper for the constructors. * @param parent the parent outline * @param title the title for this outline * @param open <CODE>true</CODE> if the children are visible */ void initOutline(PdfOutline parent, String title, boolean open) { this.open = open; this.parent = parent; writer = parent.writer; put(PdfName.TITLE, new PdfString(title, PdfObject.TEXT_UNICODE)); parent.addKid(this); if (destination != null && !destination.hasPage()) // bugfix Finn Bock setDestinationPage(writer.getCurrentPage()); }
/** Helper for the constructors. * @param parent the parent outline * @param title the title for this outline * @param open <CODE>true</CODE> if the children are visible */ void initOutline(PdfOutline parent, String title, boolean open) { this.open = open; this.parent = parent; writer = parent.writer; put(PdfName.TITLE, new PdfString(title, PdfObject.TEXT_UNICODE)); parent.addKid(this); if (destination != null && !destination.hasPage()) // bugfix Finn Bock setDestinationPage(writer.getCurrentPage()); }
/** Helper for the constructors. * @param parent the parent outline * @param title the title for this outline * @param open <CODE>true</CODE> if the children are visible */ void initOutline(PdfOutline parent, String title, boolean open) { this.open = open; this.parent = parent; writer = parent.writer; put(PdfName.TITLE, new PdfString(title, PdfObject.TEXT_UNICODE)); parent.addKid(this); if (destination != null && !destination.hasPage()) // bugfix Finn Bock setDestinationPage(writer.getCurrentPage()); }