How to print PDF pages with a 180 degrees orientation with jPDFPrint

This Java sample shows how to use jPDFPrint printable to implements your own Printable interface which can be useful when you need a finer control over the printing of PDF pages. In this sample, we’re changing the rotation of the page printouts by -180 degrees. package jPDFPrintSamples;   import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.print.PageFormat; import […]

Read More

Rotate Pages in a PDF document using Java

This Java sample code will open a PDF and rotate each page of the document by a 180 degrees. It then prints and saved the rotated PDF document to a different file. This sample uses jPDFProcess, Qoppa’s Java PDF library to manipulate PDF documents. package jPDFProcessSamples;   import com.qoppa.pdf.PrintSettings; import com.qoppa.pdfProcess.PDFDocument; import com.qoppa.pdfProcess.PDFPage;   public […]

Read More

Add text content to a PDF document with Java

Here is a sample code to add text to a PDF document content using Qoppa’s Java PDF Library, jPDFProcess. import java.awt.Color; import java.awt.Font; import com.qoppa.pdfProcess.PDFDocument; import com.qoppa.pdfProcess.PDFGraphics; import com.qoppa.pdfProcess.PDFPage;   public class AddText { public static void main (String [] args) { try { // load PDF document PDFDocument pdfDoc = new PDFDocument ("C:\\myfolder\\input.pdf", null); […]

Read More