PDFreactor interactive PDF <Select> box inactive?

823 Views Asked by At

I am creating an interactive PDF, the PDF is generated with HTML and CSS, which are built up with a string builder in C#, then passed to a method which Generates the PDF using PDF-Reactor.

Most of the PDF's generation is returned fine, i have two sections of the PDF report that require a drop down list to provide the user with options to apply to the PDF before it is printed, and for this i am using boxes with some options within them.

The problem i have is that when the PDF is generated, it returns the PDF and the boxes just look like non-editable text boxes, the first option is displayed, but not the value, and there is no way to select the options and let the box drop down.

I have added form tags surrounding the form elements, and regular text boxes appear as editable and work fine, it is just the boxes causing the issue. As per the instructions in the PDFreactor manual, i have included the required CSS to make the form interactive.

Anyone who has had this issue/a similar issue, i would appreciate any advice you might have.

2

There are 2 best solutions below

0
On BEST ANSWER

Problem solved, added the CSS styles outlined within the manual to the individual elements in their style tags, rather than with the rest of the CSS grouped in the style section in the document head.

e.g-<select style='width: 621px; margin-left: 0px; text-align: left; -ro-pdf-format: pdf '>

the -ro-pdf-format: pdf was the part added to the end of the style attribute.

0
On

It is hard to say why the combo boxes are non-interactive in your case without knowing the source document.

You actually only have to make sure to set the style "-ro-pdf-format: pdf" to all form elements that should be interactive, like in this minimal sample:

<html>
  <head>
    <style>
      select { -ro-pdf-format: pdf; }
    </style>
  </head>
   <body>
    <form>
      <select>
        <option>blue</option>
        <option>green</option>
        <option>red</option>
      </select>
    </form>
  </body>
</html>

If converted with PDFreactor, the resulting PDF should consist of one interactive combo box. There is also a more complex "Styled Forms" sample included in the PDFreactor package available at http://www.pdfreactor.com/download/ To further analyze the problem it would be helpful if you could post your input document (HTML and CSS).