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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
    Bookmark Topic Watch Topic
  • New Topic