Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use static XHTML/CSS content—not an HTML checkbox control—when the checkbox only needs to appear on a printed PDF page. Flying Saucer lays out XHTML and CSS as document content. Its historical R8 guide (April 2009) says an <input> element was treated as regular content and that AcroForm support had been prototyped but was incomplete. That is useful historical evidence, not proof of behavior in every current release. If recipients must click the box after downloading, verify the exact Flying Saucer artifact and version by inspecting the generated PDF for real form fields.

First decide which kind of checkbox you need

“Print a checkbox” can describe two different outputs:

Requirement What to render What to verify
Paper form or a fixed visual mark in a PDF A bordered square, glyph, or image placed in XHTML/CSS The square appears at the intended size and position in the PDF
Recipient can click and change the value in a PDF viewer An AcroForm checkbox field The PDF contains a form field, not merely a drawn square

Do not infer the second result from the first. A square that looks like a checkbox is only page artwork. The current project material identifies org.xhtmlrenderer:flying-saucer-pdf as the PDF module and describes the ITextRenderer PDF renderer, but it does not establish that HTML <input type="checkbox"> becomes an AcroForm field in current releases.

What Flying Saucer’s documentation actually establishes

Historical PDF behavior

The Flying Saucer Project’s R8 User’s Guide, dated April 2009, states: “At this point, an <input> element will be treated like regular content.” The same answer says AcroForm support had been prototyped but was not completed at that point. Therefore, this example is not a promise that an input will create a native PDF checkbox.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Epson EcoTank ET-2800 Wireless Color All-in-One Supertank Printer - Black
  • INNOVATIVE CARTRIDGE-FREE PRINTING — No more dealing with lots of tiny ink cartridges; With this wireless document and photo printer each ink bottle set is equivalent to about 90 individual cartridges²
  • LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; When you choose this combination printer, scanner and copier you can print up to 4,500 pages black/7,500 color³
  • COLOR PRINTING — Up to 2 years of ink in the box4 (and with every replacement ink set) for fewer out-of-ink frustrations
  • ZERO CARTRIDGE WASTE — By using an Epson EcoTank printer you can help reduce the amount of cartridge waste ending up in landfills
  • HOME PRINTER DESIGNED FOR RELIABILITY — The Epson EcoTank ET-2800 All-in-One Supertank Color Printer creates vivid, detailed prints and documents thanks to Micro Piezo Heat-Free Technology; Fire off 10 ISO pages per minute1 to easily finish large jobs

Current version boundaries

The current README says version 9.5.0 and later require Java 11, 9.6.0 and later require Java 17, and 10.0.0 and later require Java 21. Select a dependency version that matches the JDK running your service. The changelog lists 10.4.0 on July 16, 2026 and a 10.5.0 heading with an unspecified August 2026 date; the material does not say either release added checkbox-field support.

Do not confuse Swing forms with PDF forms

The FAQ describes Swing form handling through SwingReplacedElementFactory with XHTMLPanel. That is a GUI rendering path and should not be treated as evidence that PDF output contains AcroForm widgets.

Reliable method for a printable (static) checkbox

Represent the state directly in the document. Use a bordered element for maximum font independence, an embedded glyph when you control fonts, or a supplied image when the artwork must be exact.

Option 1: CSS-drawn square

This approach does not depend on a checkbox form control. The checked and unchecked states are ordinary XHTML elements:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <style type="text/css">
      @page { size: A4; margin: 18mm; }
      body { font-family: sans-serif; font-size: 11pt; }
      .choice { margin: 4pt 0; }
      .box {
        display: inline-block;
        width: 10pt;
        height: 10pt;
        border: 1pt solid #000;
        margin-right: 5pt;
        vertical-align: -1pt;
      }
      .box.checked:after { content: "X"; font-weight: bold; margin-left: 1pt; }
    </style>
  </head>
  <body>
    <p class="choice"><span class="box checked"></span>Subscribed</p>
    <p class="choice"><span class="box"></span>Not subscribed</p>
  </body>
</html>

The CSS is ordinary page styling. Keep the XHTML well formed: close every element, use quoted attributes, and include the XHTML namespace. If a particular CSS feature is not handled by your selected Flying Saucer release, replace the pseudo-element with literal text or an image.

Option 2: a checkbox glyph

A Unicode ballot box can be compact, but the glyph exists only if the PDF renderer can access a font containing it. Embed or otherwise make that font available to the renderer and test the PDF on the machines that generate it. A missing glyph can appear as an empty square or another fallback character, so this option needs a font check.

Rank #2
Sale
Epson EcoTank Photo ET-8550 Wireless Wide-Format All-in-One Tank Printer
  • CARTRIDGE-FREE PRINTING — Print lab-quality photos, graphics and creative projects; Get vibrant colors and sharp text with Epson's high-accuracy printhead and Claria ET Premium 6-color inks
  • INK BOTTLES — Save on photos1 and creative projects with affordable in-house printing; All-in-one printer allows you to print 4" x 6" photos for about 4 cents each vs. 40 cents with traditional ink cartridges1
  • LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; Printer, scanner and copier lets you print up to 6,200 color pages³
  • PRINT FOR LONGER — Up to 2 years of ink in the box² (and with every replacement ink set) for fewer out-of-ink frustrations with this wireless printer
  • ZERO CARTRIDGE WASTE — Epson EcoTank printer helps reduce the amount of cartridge waste ending up in landfills; Cartridge-free printer uses high-yield ink bottles; Each replacement ink bottle set is equivalent to about 100 individual ink cartridges⁴
<p class="choice">☒ Subscribed</p>
<p class="choice">☐ Not subscribed</p>

Option 3: an image asset

Use two small PNG or SVG-compatible assets—one checked and one unchecked—when the visual design must not vary with fonts. Resolve the image URL through Flying Saucer’s resource mechanism and confirm that the process can read it. A missing or inaccessible asset produces a blank area rather than a usable mark.

Render the XHTML with Java

Add the project’s org.xhtmlrenderer:flying-saucer-pdf artifact using a version compatible with your Java runtime, then render a complete XHTML document through ITextRenderer. The source below writes a PDF file and leaves checkbox state in the XHTML, where it can be selected by your application before rendering.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import java.io.FileOutputStream;
import java.io.OutputStream;
import org.xhtmlrenderer.pdf.ITextRenderer;

public final class CheckboxPdf {
    public static void main(String[] args) throws Exception {
        String xhtml = """
            <?xml version="1.0" encoding="UTF-8"?>
            <html xmlns="http://www.w3.org/1999/xhtml">
              <head>
                <style type="text/css">
                  @page { size: A4; margin: 18mm; }
                  body { font-family: sans-serif; font-size: 11pt; }
                  .box { display:inline-block; width:10pt; height:10pt;
                         border:1pt solid #000; margin-right:5pt; }
                  .checked:after { content:"X"; font-weight:bold; }
                </style>
              </head>
              <body>
                <p><span class="box checked"></span>Subscribed</p>
                <p><span class="box"></span>Not subscribed</p>
              </body>
            </html>
            """;

        ITextRenderer renderer = new ITextRenderer();
        renderer.setDocumentFromString(xhtml);
        renderer.layout();
        try (OutputStream out = new FileOutputStream("checkboxes.pdf")) {
            renderer.createPDF(out);
        }
    }
}

If your XHTML refers to local images, stylesheets, or fonts, configure a base URL or resolver appropriate to your application so those resources can be found. Validate the resulting PDF visually and, when interactivity matters, with a PDF viewer’s form inspection tools.

Making the checked state data-driven

Generate the class or image choice from your model before calling setDocumentFromString. Escape user-provided text as XML; an unescaped ampersand or less-than sign can make the document invalid and stop rendering.

String boxClass = subscribed ? "box checked" : "box";
String safeLabel = escapeXml(label); // use your XML-escaping utility
String fragment = "<p><span class="" + boxClass +
                 ""></span>" + safeLabel + "</p>";
  • Keep the visual state deterministic: checked, unchecked, or an explicitly defined third state.
  • Use stable physical units such as pt or mm for print layouts.
  • Test long labels and page breaks; an inline box can separate from its label if the surrounding layout is allowed to wrap.

If you need an interactive PDF checkbox

Do not ship an interactive requirement based solely on an HTML <input>. Generate a sample with the exact Flying Saucer version, open it in more than one PDF viewer, and inspect whether a named AcroForm field exists. A drawn square will print correctly but will not accept clicks, keyboard focus, or saved form values.

If the sample lacks fields, keep Flying Saucer for page layout and add form fields in a separate PDF-processing step that your team has verified, or choose a renderer whose documented output explicitly creates AcroForm controls. The available Flying Saucer materials do not identify a current, supported HTML-to-AcroForm checkbox recipe.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
HP Smart Tank 5000 Wireless All-in-One Ink Tank Printer, Scanner, Copier with 2 Years of Ink Included, Best-for-Home, Cartridge-Free, Refillable and AI-Enabled. (5D1B6A)
  • SET IT UP ONCE AND PRINT WITH CONFIDENCE. No complicated maintenance. Just easy, reliable printing you can count on.
  • INK FOR YEARS. NOT MONTHS. Up to 2 years of ink included. Get thousands of pages of cartridge-free printing. More pages, less hassle
  • KEEPS PRINTING WELL AFTER COMPETITORS HAVE QUIT. No complex maintenance. Sharper text, richer colors.[2] Only with HP Smart Tank
  • PREMIUM SUPPORT - Strong technical expertise to solve issues faster
  • THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.

Dependency and compatibility checklist

  • Use org.xhtmlrenderer:flying-saucer-pdf for PDF output.
  • Match Java to the selected release: 9.5.x requires Java 11 or newer; 9.6.x requires Java 17 or newer; 10.x requires Java 21 or newer, according to the current README.
  • Keep XHTML XML-well-formed and provide the namespace.
  • Make fonts, images, CSS, and remote resources available to the renderer process.
  • Inspect the PDF generated by the precise artifact version; do not generalize the 2009 R8 forms statement to an unverified current release.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting common failures

The checkbox is invisible

Check that the element has a border and dimensions, that the stylesheet was loaded, and that the box is not white on a white background. If you used a glyph, verify the selected font contains that character.

An input appears as text or an unexpected control

That is consistent with the R8 documentation’s “regular content” behavior. Replace the input with a static box, glyph, or image when the output is for printing.

The PDF has a square but it cannot be clicked

It is page artwork, not a form field. Inspect the PDF’s form structure and test with the exact renderer version before promising interactivity.

Images or fonts are missing

Use resolvable URLs or a configured base path, confirm file permissions, and check the renderer logs. A browser’s ability to load an asset does not guarantee the server-side renderer can load it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Rendering fails before a PDF is written

Look for malformed XML, unescaped user data, unsupported CSS, and a Java/dependency mismatch. Reduce the document to a minimal XHTML sample, then add styles and assets back one at a time.

The layout changes after a library upgrade

Pin and test the exact Flying Saucer artifact and JDK combination. Keep a representative PDF fixture containing checked and unchecked states, long labels, images, and a page break, then compare output during upgrades.

Rank #4
NDYIN Portable Printers Wireless for Travel, N80 Bluetooth Thermal Printer
  • Wireless Bluetooth Printer: Portable thermal printer compatible with iPhone, Android phones, iPad and tablet computers via Bluetooth. For smartphones, please download the "Nada Print" App. You can also connect to laptops and computers for printing using a USB-C cable. (Note: Laptops and computers can only be connected via USB and require the installation of a driver first. Bluetooth connection is not supported.)
  • No-ink printing: Only supports US Letter and A4 size thermal paper.(Doesn't support regular paper) The no-ink portable thermal printer uses direct thermal technology, requiring no ink, toner or ribbons, making it environmentally friendly, cost-effective and time-saving. The thermal printer package comes with a roll of US Letter thermal printing paper. Note: When installing the paper, remember to switch the paper size switch on APP
  • Clear Print: NDYIN N80 portable thermal printer adopts high-definition printing technology, with a 203DPI resolution to provide you with clear printing results. This mobile printer is compatible with roll paper, folded paper and tattoo transfer paper, supporting printing from your mobile phone PDF, Word, pictures and web pages anytime and anywhere. It is recommended to use our NDYIN thermal paper to achieve good printing quality
  • Portable wireless printer for travel: The thermal printer is equipped with a built-in 1500mAh rechargeable battery, which can print 160 sheets of 8.5" x 11" thermal paper after being fully charged. It weighs only 1.5 pounds and is compact in size. This ink-free portable printer can be easily carried in a backpack or briefcase! It is perfect for business travel, cars, small offices, construction sites, schools and homes. You can print documents, contracts, invoices and boarding passes anytime and anywhere
  • The N80 thermal printer has a wide range of uses. The package includes the N80 printer, a roll of US Letter paper(7m/roll), a user manual, a guide card, a type-C soft cable and a type C adapter. Note: The charging adapter is not included. Special thermal paper is required for use; ordinary paper cannot be used. This ink-free portable thermal printer is suitable for various scenarios such as home, school, travel, office, and outdoor, meeting the printing needs of different groups of people. This tattoo template printer is also compatible with tattoo transfer paper, making it an ideal choice for tattoo art

Or skip the browser setup

ScreenshotNeo is a website screenshot API, not a replacement for Flying Saucer’s XHTML-to-PDF renderer. It is useful when your input is already a public web page and you need a clean image of that page rather than an interactive PDF form. Before capture it accepts the cookie or consent banner and removes more than 60 known consent platforms, newsletter popups, and chat widgets; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

One GET request returns PNG, JPEG, WebP, or PDF output. See the ScreenshotNeo documentation for all options, including full-page capture, CSS-selector element capture, device presets, custom CSS and JavaScript, waits, request blocking, cookies, headers, geolocation, caching, signed links, asynchronous jobs, bulk capture, and usage reporting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/form -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com/form"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com/form' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan, and yearly billing gives two months free. Create a free ScreenshotNeo account to try it.

Final verification before delivery

  1. Open the generated PDF and confirm every box is visible at print scale.
  2. Print a physical page if alignment and stroke weight matter.
  3. If interactivity is required, verify actual AcroForm fields rather than appearance alone.
  4. Repeat the check after changing the Flying Saucer version, Java runtime, fonts, or asset-loading configuration.

Frequently Asked Questions

Does Flying Saucer support HTML checkbox inputs in PDF output?

The R8 guide says inputs were treated as regular content, and current project materials do not establish native checkbox-field conversion. Verify the exact version and inspect its PDF.

What is the safest way to print an unchecked box?

Use a CSS-bordered XHTML element or a tested image asset. Both produce ordinary page content and do not depend on form-field support.

Can a static checkbox become interactive later?

No. A drawn square is artwork. Interactive behavior requires a real PDF form field, which must be verified separately.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which Java version should I use?

Match the selected Flying Saucer release: 9.5.x requires Java 11, 9.6.x requires Java 17, and 10.x requires Java 21 according to the current README.

Quick Recap

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.