Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. PdfReader reader = new PdfReader(src);
  2. PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(targetPdf));
  3. stamper.setRotateContents(false);
  4. List<PdfCleanUpLocation> cleanUpLocations = new ArrayList<PdfCleanUpLocation>();
  5. Rectangle rectangle = new Rectangle(400, 600, 500, 650);
  6. cleanUpLocations.add(new PdfCleanUpLocation(1, rectangle, BaseColor.BLACK));
  7. PdfCleanUpProcessor cleaner = new PdfCleanUpProcessor(cleanUpLocations, stamper);
  8. cleaner.cleanUp();
  9. stamper.close();
  10. reader.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement