Forum How do I...?

Why don't select tags (drop-down lists) appear in the PDF?

Mowen
I can only see a dot where the control should be. Is this by design? Surely it would make more sense to show the control in a way that resembles what you see on screen, like all the other Html to Pdf modules?

How do I show the selected option?

Thanks.
mikeday
Looking at the default HTML style sheet, the select should be given a border, but only the first <option> in the <select> will be shown. Try adding these rule to your style sheet:
option:first-of-type { display: none }
option["selected"] { display: inline !important }
jamsheer
In my HTML, we have an html select element (dropdownlist) with large text. While converting this html into pdf by using Prince, the element text wraps automatically and the height of the element increases than what we gave.

How can we disable word-wrapping for a DropDownList?

Is there any method to disable word-wrapping for a DropDownList? We need DropDownList as in the “Expected PDF ” (please see the attached image).

Also, I’m attaching an HTML file to investigate the issue.
  1. dropdownWrappingIssue.html0.8 kB
  2. image_2023_01_02T13_24_26_743Z.png50.1 kB

Edited by jamsheer

howcome
In your code, you force the select element to be quite narrow with this code:

width:193px !important;


In order to honor the declared width, Prince must split the line. Try removing the quoted code.