Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9081973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:26:43+00:00 2026-06-16T20:26:43+00:00

I have an Java/Java EE based application wherein I have a requirement to create

  • 0

I have an Java/Java EE based application wherein I have a requirement to create PDF certificates for various services that will be provided to the users. I am looking for a way to create PDF (no need for digital certificates for now).

What is the easiest and convenient way of doing that? I have tried

  1. XSL to pdf conversion
  2. HTML to PDF conversion using itext.
  3. crude java way (using PDFWriter, PdfPCell etc.)

What is the best way out of these or is there any other way which is easier and convenient?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:26:44+00:00Added an answer on June 16, 2026 at 8:26 pm

    When you talk about Certificates, I think of standard sheets that look identical for every receiver of the certificate, except for:

    • the name of the receiver
    • the course that was followed by the receiver
    • a date

    If this is the case, I would use any tool that allows you to create a fancy certificate (Acrobat, Open Office, Adobe InDesign,…) and create a static form (sometimes referred to as an AcroForm) containing three fields: name, course, date.

    I would then use iText to fill in the fields like this:

    PdfReader reader = new PdfReader(pathToCertificateTemplate);
    PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(pathToCertificate));
    AcroFields form = stamper.getAcroFields();
    form.setField("name", name);
    form.setField("course", course);
    form.setField("date", date);
    stamper.setFormFlattening(true);
    stamper.close();
    reader.close();
    

    Creating such a certificate from code is “the hard way”; creating such a certificate from XML is “a pain” (because XML isn’t well-suited for defining a layout), creating a certificate from (HTML + CSS) is possible with iText’s XML Worker, but all of these solutions have the disadvantage that it’s hard work to position every item correctly, to make sure everything fits on the same page, etc…

    It’s much easier to maintain a template with fixed fields. This way, you only have to code once. If for some reason you want to move the fields to another place, you only have to change the template, you don’t have to worry about messing around in code, XML, HTML or CSS.

    See http://www.manning.com/lowagie2/samplechapter6.pdf for some more info (section 6.3.5).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have inherited an application (Java-based, running on WebLogic 10.3.5) that makes extensive use
I have a java based application that manipulates a mysql database. I would like
I have Java based Spring MVC application that also uses Spring security. I am
Context: The Cloud We have a java-based web application that we normally host on
I have a SWT based Java application that works on Windows, Mac OS and
I have a java based web application(struts 1.2). I have a requirement to display
I have a typical Flex-based application that was written to use a Java/Hibernate/MySQL backend.
I have a Windows application based on Java, that I should like to install
I have a Java GUI-based application that writes some diagnostic messages to System.out and
I have a processing based Java application that runs fine in Eclipse but the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.