@Test public void reorderInheritedResourcesTest() throws IOException, InterruptedException { PdfDocument pdfDoc = new PdfDocument( new PdfReader(sourceFolder + "inheritedFontResources.pdf"), new PdfWriter(destinationFolder + "reorderInheritedFontResources.pdf") ); pdfDoc.movePage(1, pdfDoc.getNumberOfPages() + 1); pdfDoc.removePage(1); pdfDoc.close(); String compareResult = new CompareTool().compareByContent( destinationFolder + "reorderInheritedFontResources.pdf", sourceFolder + "cmp_reorderInheritedFontResources.pdf", destinationFolder, "diff_reorderInheritedFontResources_"); Assert.assertNull(compareResult); }
public boolean removePage(int pageNum) { if (pageNum < from || pageNum >= from + getCount()) return false; decrementCount(); kids.remove(pageNum - from); return true; }
PdfPages extends PdfObjectWrapper<PdfDictionary> { public boolean removePage(int pageNum) { if (pageNum < from || pageNum >= from + getCount()) return false; decrementCount(); kids.remove(pageNum - from); return true; } }
PdfPages extends PdfObjectWrapper<PdfDictionary> { public boolean removePage(int pageNum) { if (pageNum < from || pageNum >= from + getCount()) return false; decrementCount(); kids.remove(pageNum - from); return true; } PdfPages(int from, PdfDocument pdfDocument, PdfPages parent);  PdfPages(int from, PdfDocument pdfDocument);  PdfPages(int from, int maxCount, PdfDictionary pdfObject, PdfPages parent); }
PdfPages extends PdfObjectWrapper<PdfDictionary> { public boolean removePage(int pageNum) { if (pageNum < from || pageNum >= from + getCount()) return false; decrementCount(); kids.remove(pageNum - from); return true; } PdfPages(int from, PdfDocument pdfDocument, PdfPages parent);  PdfPages(int from, PdfDocument pdfDocument);  PdfPages(int from, int maxCount, PdfDictionary pdfObject, PdfPages parent); void addPage(PdfDictionary page); boolean addPage(int index, PdfPage pdfPage); boolean removePage(int pageNum); void addPages(PdfPages pdfPages); void removeFromParent(); int getFrom(); int getCount(); void correctFrom(int correction); PdfArray getKids(); PdfPages getParent(); void incrementCount(); void decrementCount(); int compareTo(int index); }
PdfPages extends PdfObjectWrapper<PdfDictionary> { public boolean removePage(int pageNum) { if (pageNum < from || pageNum >= from + getCount()) return false; decrementCount(); kids.remove(pageNum - from); return true; } PdfPages(int from, PdfDocument pdfDocument, PdfPages parent);  PdfPages(int from, PdfDocument pdfDocument);  PdfPages(int from, int maxCount, PdfDictionary pdfObject, PdfPages parent); void addPage(PdfDictionary page); boolean addPage(int index, PdfPage pdfPage); boolean removePage(int pageNum); void addPages(PdfPages pdfPages); void removeFromParent(); int getFrom(); int getCount(); void correctFrom(int correction); PdfArray getKids(); PdfPages getParent(); void incrementCount(); void decrementCount(); int compareTo(int index);  }