Win a copy of Production-Ready Serverless (Operational Best Practices) this week in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara
  • Mark post as helpful
  • send pies
  • Report post to moderator
This example shows how to create a document using the Apache PDFBox library. The first page contains text in various styles, fonts and colors. The second page adds an image, draws a couple of lines, and a colored rectangle. While PDFBox can do many things with an existing PDF, its API is somewhat low-level. For example, it's not easily possible to add underline or strikethrough effects to text.

To get started, download the latest pdfbox-app-X.Y.Z.jar file; it contains everything in one convenient file.

The same code example for iText 2 (and its API-compatible replacement OpenPDF) and iText 5 can be found here.




OtherOpenSourceProjectsFaq CategoryCodeSamples CodeBarn
 
Hey! Wanna see my flashlight? It looks like this tiny ad:
global solutions you can do at home or in your backyard
https://www.kickstarter.com/projects/paulwheaton/better-world-boo
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!