/** * Selects the pages to keep in the document. The pages are described as a * <CODE>List</CODE> of <CODE>Integer</CODE>. The page ordering can be changed * but no page repetitions are allowed. Note that it may be very slow in * partial mode. * * @param pagesToKeep * the pages to keep in the document */ public void selectPages(List pagesToKeep) { pageRefs.selectPages(pagesToKeep); removeUnusedObjects(); }
/** * Selects the pages to keep in the document. The pages are described as a * <CODE>List</CODE> of <CODE>Integer</CODE>. The page ordering can be changed but * no page repetitions are allowed. Note that it may be very slow in partial mode. * @param pagesToKeep the pages to keep in the document */ public void selectPages(List pagesToKeep) { pageRefs.selectPages(pagesToKeep); removeUnusedObjects(); }
/** * Selects the pages to keep in the document. The pages are described as a * <CODE>List</CODE> of <CODE>Integer</CODE>. The page ordering can be changed but * no page repetitions are allowed. Note that it may be very slow in partial mode. * @param pagesToKeep the pages to keep in the document */ public void selectPages(List pagesToKeep) { pageRefs.selectPages(pagesToKeep); removeUnusedObjects(); }
public PdfReader open(PdfURLSource source) throws TaskIOException { PdfReader reader; try { reader = makeUnethicalIfRequired(openSource(source)); } catch (BadPasswordException bpe) { throw new TaskWrongPasswordException("Unable to open the document due to a wrong password.", bpe); } catch (IOException e) { throw new TaskIOException("An error occurred opening the reader.", e); } reader.removeUnusedObjects(); reader.consolidateNamedDestinations(); return reader; }
public PdfReader open(PdfFileSource source) throws TaskIOException { PdfReader reader; try { reader = makeUnethicalIfRequired(openSource(source)); } catch (BadPasswordException bpe) { throw new TaskWrongPasswordException("Unable to open the document due to a wrong password.", bpe); } catch (IOException e) { throw new TaskIOException("An error occurred opening the reader.", e); } reader.removeUnusedObjects(); reader.consolidateNamedDestinations(); return reader; }
public PdfReader open(PdfStreamSource source) throws TaskIOException { PdfReader reader; try { reader = makeUnethicalIfRequired(openSource(source)); } catch (BadPasswordException bpe) { throw new TaskWrongPasswordException("Unable to open the document due to a wrong password.", bpe); } catch (IOException e) { throw new TaskIOException("An error occurred opening the reader.", e); } reader.removeUnusedObjects(); reader.consolidateNamedDestinations(); return reader; }
stream.put(PdfName.COLORSPACE, PdfName.DEVICERGB); reader.removeUnusedObjects();
readPages(); eliminateSharedStreams(); removeUnusedObjects();
readPages(); eliminateSharedStreams(); removeUnusedObjects(); } finally { try {
readPages(); eliminateSharedStreams(); removeUnusedObjects();