Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PdfReader reader = new PdfReader(src);
- PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(targetPdf));
- stamper.setRotateContents(false);
- List<PdfCleanUpLocation> cleanUpLocations = new ArrayList<PdfCleanUpLocation>();
- Rectangle rectangle = new Rectangle(400, 600, 500, 650);
- cleanUpLocations.add(new PdfCleanUpLocation(1, rectangle, BaseColor.BLACK));
- PdfCleanUpProcessor cleaner = new PdfCleanUpProcessor(cleanUpLocations, stamper);
- cleaner.cleanUp();
- stamper.close();
- reader.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement