/** * The local destination to where a local goto with the same * name will jump to. * @param name the name of this local destination * @param destination the <CODE>PdfDestination</CODE> with the jump coordinates * @return <CODE>true</CODE> if the local destination was added, * <CODE>false</CODE> if a local destination with the same name * already existed */ boolean localDestination(String name, PdfDestination destination) { Object obj[] = (Object[])localDestinations.get(name); if (obj == null) obj = new Object[3]; if (obj[2] != null) return false; obj[2] = destination; localDestinations.put(name, obj); if (!destination.hasPage()) destination.addPage(writer.getCurrentPage()); return true; }
/** * The local destination to where a local goto with the same * name will jump to. * @param name the name of this local destination * @param destination the <CODE>PdfDestination</CODE> with the jump coordinates * @return <CODE>true</CODE> if the local destination was added, * <CODE>false</CODE> if a local destination with the same name * already existed */ boolean localDestination(String name, PdfDestination destination) { Object[] obj = localDestinations.get(name); if (obj == null) obj = new Object[3]; if (obj[2] != null) return false; obj[2] = destination; localDestinations.put(name, obj); if (!destination.hasPage()) destination.addPage(writer.getCurrentPage()); return true; }
/** 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()); }
put(PdfName.PARENT, parent.indirectReference()); if (destination != null && destination.hasPage()) { put(PdfName.DEST, destination);
put(PdfName.PARENT, parent.indirectReference()); if (destination != null && destination.hasPage()) { put(PdfName.DEST, destination);
put(PdfName.PARENT, parent.indirectReference()); if (destination != null && destination.hasPage()) { put(PdfName.DEST, destination);