Here is a sample java program showing how to open a PDF, add a company logo image at the top of each page, then save the document using Qoppa’s PDF library jPDFProcess. // Load document PDFDocument pdfDoc = new PDFDocument ("C:\\myfolder\\input.pdf", null); // Load foreground image BufferedImage logoImage = ImageIO.read(new File("C:\\myfolder\\logo.jpg")); for (int […]
Articles Tagged: add image
Create a PDF with text and image using Free Java jPDFWriter library
This sample java program uses jPDFWriter to create a new PDF file, add a page to it and draw an image and text on the page. // create document PDFDocument pdfDoc = new PDFDocument (); // create a PageFormat of standard letter size // with no margins Paper p = new Paper (); p.setSize(8.5 […]
Adding a background or foreground image to a PDF page
Here is a sample Java program showing how to add background and foreground images to pages of a PDF document while still keeping all original page content as vector, i.e, the page still contain text, images and any vector drawing commands. This sample uses Qoppa’s PDF library jPDFProcess. This sample program opens a source PDF, […]