Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<PDPage> pages = pdDoc.getDocumentCatalog().getAllPages();
- if(pages.size() > 0){
- PDJpeg img = new PDJpeg(pdDoc, in);
- PDPageContentStream stream = new PDPageContentStream(pdDoc,pages.get(0));
- stream.drawImage(img, 60, 60);
- stream.close();
- }
- PDPageContentStream stream = new PDPageContentStream( pdDoc, pages.get(0));
- PDPageContentStream stream = new PDPageContentStream( pdDoc, pages.get(0), true, true);
- doc = PDDocument.load( inputFileName );
- PDXObjectImage ximage = null;
- ximage = new PDJpeg(doc, new FileInputStream( image )
- PDPage page = (PDPage)doc.getDocumentCatalog().getAllPages().get(0);
- PDPageContentStream contentStream = new PDPageContentStream(doc, page, true, true);
- contentStream.drawImage( ximage, 425, 675 );
- contentStream.close();
- PDPage page = new PDPage();
- outputdocument.addPage(page);
- PDPageContentStream contentStream = new PDPageContentStream(outputdocument, page, AppendMode.APPEND, true);
- PDImageXObject pdImageXObject = JPEGFactory.createFromImage(outputdocument, out);
- contentStream.drawImage(pdImageXObject, 5, 2, 600, 750);
- contentStream.close();
Add Comment
Please, Sign In to add comment