To export every choice in an HTML <select> to PDF, copy the options into a separate HTML list or table, then pass that element to html2pdf.js. Do not rely on capturing the native dropdown: it may show the current selected value, but its popup choices are not a dependable part of the rendered page.
This distinction matters: exporting a select can mean printing its current value or enumerating every available option. The example below does the latter, while optionally marking the selected choice.
Why copying the options works better than capturing the dropdown
html2pdf.js combines html2canvas, which renders an HTML element, with jsPDF, which produces the PDF. Its element-capture workflow is suited to a visible document layout. A native select’s open menu is browser UI, not ordinary page content, so capturing the control should not be treated as a way to print the complete popup list. The html2canvas renderer handles select elements through its form-control rendering path; the reliable approach for a complete inventory is to create normal HTML containing the option labels and export that instead. This is an implementation pattern based on the documented capture workflow and renderer behavior, not a built-in “export all options” method. See the html2pdf.js project and html2canvas project.
The generated PDF will be a static representation of the choices, not an interactive dropdown. If all you need is the current selection, capturing the native control may be sufficient; if you need every choice, build an export-only list or table.
Recommended Free Tools
#1 Best Overall
- BEST FOR SMALL BUSINESSES – Engineered for extraordinary productivity, the Brother DCP-L2640DW Monochrome (Black & White) 3-in-1 combines laser printer, scanner, copier in one compact footprint and delivers high-quality black & white prints
- FAST PRINTER WITH EFFICIENT SCANNING – Produces documents quickly with print speeds up to 36 ppm(2) and scan speeds up to 23.6/7.9 ipm(3) (black/color). A 50-page auto document feeder(4) allows for convenient, time saving multi-page scanning and copying
- FLEXIBLE CONNECTION OPTIONS – Easily navigate the changing demands of your business with secure multi-device connectivity via built-in dual-band wireless (2.4GHz / 5GHz) and Ethernet. Or connect locally to a single computer via USB interface
- BROTHER MOBILE CONNECT APP – Print, scan, and manage your wireless printer anytime, from almost anywhere from your mobile device. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(5)
- CHOOSE BROTHER GENUINE TONER – When it’s time to replace your toner, be sure to choose Brother Genuine TN830 or TN830XL replacement toner. And with Refresh EZ Print Subscription Service, you’ll never worry about running out of toner again and you’ll enjoy savings of up to 50%(6) on Brother Genuine Toner. Get started with Refresh today with a Free Trial(1)
Export every option as a PDF table
This example assumes html2pdf.js has been loaded on the page and that the select has id="country". It creates a separate table, includes the user-facing label and underlying value, and marks the currently selected option. Remove the value column if it is an internal implementation detail that PDF readers do not need.
<label for="country">Country</label>
<select id="country">
<option value="ca">Canada</option>
<option value="mx">Mexico</option>
<option value="us" selected>United States</option>
</select>
<button type="button" id="export-pdf">Export options to PDF</button>
<script>
document.getElementById('export-pdf').addEventListener('click', async () => {
const select = document.getElementById('country');
const exportRoot = document.createElement('section');
exportRoot.id = 'select-options-export';
exportRoot.innerHTML = '<h1>Country choices</h1>';
const table = document.createElement('table');
table.innerHTML =
'<thead><tr><th>Option</th><th>Value</th><th>Selected</th></tr></thead>';
const tbody = document.createElement('tbody');
Array.from(select.options).forEach((option) => {
const row = document.createElement('tr');
const labelCell = document.createElement('td');
const valueCell = document.createElement('td');
const selectedCell = document.createElement('td');
labelCell.textContent = option.text;
valueCell.textContent = option.value;
selectedCell.textContent = option.selected ? 'Yes' : '';
row.append(labelCell, valueCell, selectedCell);
tbody.appendChild(row);
});
table.appendChild(tbody);
exportRoot.appendChild(table);
exportRoot.style.cssText =
'position:fixed;left:-10000px;top:0;width:700px;background:#fff;color:#111;padding:24px;font:14px Arial,sans-serif;';
table.style.cssText = 'width:100%;border-collapse:collapse;';
exportRoot.querySelectorAll('th, td').forEach((cell) => {
cell.style.cssText = 'border:1px solid #999;padding:8px;text-align:left;';
});
document.body.appendChild(exportRoot);
try {
await html2pdf().set({
margin: 0.5,
filename: 'country-options.pdf',
image: { type: 'jpeg', quality: 0.98 },
html2canvas: { scale: 2 },
jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' },
pagebreak: { mode: ['css', 'legacy'] }
}).from(exportRoot).save();
} finally {
exportRoot.remove();
}
});
</script>
Load the html2pdf.js bundle before this handler runs. The example reads select.options at click time, so it uses the current DOM options and selected state rather than a snapshot taken when the page first loaded. It appends the export element to the document before capture so the browser can lay it out, then removes it whether PDF generation succeeds or throws.
Handle placeholders and disabled choices deliberately
A placeholder such as “Choose one” is still an option and will appear in the table. If that row should not be exported, filter it explicitly—for example, skip options with an empty value. Disabled options are included by the example because they remain valid entries in select.options. Decide whether disabled entries belong in the PDF based on what the document is meant to represent.
Rank #2
- BEST FOR HOMES & HOME OFFICES – Engineered for consistent, premium print quality, the Brother HL-L2405W Monochrome (Black & White) Laser Printer delivers sharp, crisp prints at an affordable price. Prints one-sided documents at speeds up to 30ppm(2)
- COMPACT, CONNECTED PRINTER – Flexible connection options make this an ideal printer for home use and at-home offices. Securely connect to multiple devices with built-in dual-band wireless (2.4GHz/5GHz) or locally to a single computer via USB interface
- BROTHER MOBILE CONNECT APP – Manage your printer remotely and print from your mobile device anytime, from almost anywhere. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(3)
- VERSATILE PAPER HANDLING – Enjoy seamless, reliable everyday printing with the 250-sheet paper tray(4) and a manual feed slot that enables printing on envelopes and specialty pape
- BROTHER IS AT YOUR SIDE – Backed by Brother with a 1-year limited warranty and free online, call, or live chat support for the life of your printer
For grouped choices, select.options preserves the options but does not by itself communicate their original <optgroup> headings. If group context matters, iterate through the select’s child groups and add a heading row for each group rather than flattening the options.
Choose the output: current value or the full choice list
| Method | Appropriate when | Trade-off |
|---|---|---|
| Capture the native select | The PDF should show the current selected control value. | Compact, but does not reliably include the full popup menu. |
| Render an export-only list or table | The PDF must enumerate all available choices. | Explicit and predictable content, but requires creating and styling export markup. |
The second method also lets you decide whether to show values, selected state, group labels, descriptions, or other data alongside each choice.
Configure page size, margins, and page breaks
The sample uses US Letter portrait, a half-inch margin, and html2canvas scale 2. Change jsPDF.format and orientation to suit the document: for example, use landscape for a wide table. Margins are passed to html2pdf.js in the configured unit. Its options also support output filename, image settings, page-break behavior, html2canvas options, and jsPDF options; consult the project’s README and options documentation for the options supported by the version you install.
Rank #3
- FAST PRINT SPEEDS: Print up to 19 pages per minute.
- COMPACT DESIGN: Space-saving, compact design fits anywhere in your home, school or small office.
- WIRELESS CONNECTIVITY: Print from almost anywhere in your workspace using your compatible mobile device.
- PAPER CAPACITY: Up to 150 sheets.
- SUSTAINABILITY: Uses less than 2 watts in Energy Saver mode.
Long lists can span several pages. Give rows sensible padding and avoid styling that forces a very tall table into one unbroken block. The example enables CSS and legacy page-break handling; check the resulting PDF because a break may still split a row or leave an awkward gap depending on the markup and styles. For intentional breaks, add a class and a print rule such as .page-break { break-before: page; }, then test it in the generated file.
Control what html2canvas captures
html2canvas reconstructs the page from DOM and style information; it is not a native browser screenshot. Unsupported or incompletely supported CSS and form behavior can change the result, so do not promise pixel-identical output. Keep the export element simple, use explicit colors and borders, and inspect the PDF in the browsers you support. The html2canvas documentation explains its rendering approach and caveats.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
If an element on the page should not appear in the capture, html2canvas supports ignoring elements through configuration or the data-html2canvas-ignore attribute. Its configuration also provides onclone for changes to the cloned document used for rendering. These controls are useful when capturing an existing page; with a dedicated export-only table, it is usually simpler to include only the content intended for the PDF. See the configuration reference.
Rank #4
- BEST FOR HOME OFFICES & SMALL TEAMS – Engineered for consistent, premium print quality, the Brother HL-L2460DW Monochrome (Black & White) Laser Printer produces documents that are clear, crisp, and easy to review and share, all at an affordable price
- COMPACT, CONNECTED, EXCEPTIONALLY EFFICIENT– Connect with built-in dual-band wireless (2.4GHz/5GHz), Ethernet, or to a single computer via USB interface. Prints at speeds up to 36ppm(2), plus automatic duplex printing saves time and reduces paper waste
- BROTHER MOBILE CONNECT APP – Manage your wireless printer remotely and print from your mobile device anytime, from almost anywhere. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(3)
- VERSATILE PAPER HANDLING – Tackle high-volume black & white printing with the 250-sheet capacity paper tray.(4) The manual feed slot enables printing on envelopes and specialty paper
- BROTHER IS AT YOUR SIDE – Backed by Brother with a 1-year limited warranty and free online, call, or live chat support for the life of your printer
Common problems and fixes
- The PDF contains only the selected value. The native control was captured instead of a list of options. Build markup from
select.optionsand pass that export element to html2pdf.js. - The PDF is blank or the export markup is missing. Ensure the element is attached to the document and laid out before calling
.from(element). Avoid settingdisplay:noneon the capture element; off-screen positioning keeps it in layout while moving it out of view. - Recent selection changes are not reflected. Read the options and selection immediately before export, as in the example, rather than building the table once at page load. A dated issue report describes stale changed form data with html2canvas 1.4.1 in Firefox 124 and Safari on iOS 17; that is a specific report, not proof that every current browser or version behaves the same. Reproduce suspected stale values with the exact versions you ship. See html2canvas issue #3166.
- Text, colors, or spacing differ from the page. The renderer reconstructs content from DOM and supported styles. Simplify the export CSS, specify text and background colors explicitly, and check html2canvas’s documented property support.
- Rows are clipped or unreadable. Reduce cell padding or font size, use landscape for wide content, or choose a larger supported page format. Preview every page, including the last one.
- The PDF takes too long or uses too much memory. A high canvas scale increases rendering work and output size. Reduce the scale or export fewer rows per document; avoid capturing unrelated page content.
Or skip the browser setup
If your actual task is capturing a website page as an image or PDF—not specifically converting a select’s option data—ScreenshotNeo provides a screenshot API and MCP server. It cannot replace the option-table logic above: that data still needs to be rendered as page content. For a page screenshot, one GET request can return PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.
Compatibility and verification
Test the exported file in the browser and library versions you intend to support, especially if options are changed dynamically, styles are complex, or the table spans pages. Check that labels and values are correct, selected state is current, no row is cut off, and links or other content behave as expected in the final PDF. The generated PDF is a static document; interactive PDF form fields would require separate implementation.
Best Value
- HP LaserJet M209dw Wireless Printer, Print, Fast speeds, Easy setup, Mobile printing, Best-for-small teams, Instant Ink eligible
- Perfect for small teams printing black & white documents and reports, plus auto two-sided printing. Perfect for 1-5 people
- FASTEST TWO-SIDED PRINTING IN ITS CLASS – Up to 30 black-and-white pages per minute single-sided, u up to 19 black-and-white images per minute two-sided printing
- DUAL-BAND WI-FI WITH SELF-RESET – Automatically detects and resolves connectivity issues
- STRONG SECURITY – Built-in security features help protect your printer from potential attacks
Frequently Asked Questions
Does the PDF contain an interactive HTML dropdown?
No. This approach produces a static table of option data. Interactive PDF form fields require separate implementation.
Can I export only the selected option?
Yes. Build the export element from the selected option alone, or capture the native control if a rendering of its current state is sufficient.
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.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems

