Forum How do I...?

"error: TypeError: value is not an object"

tomjohnson1492
I am using Prince to transform some documents that have code samples, including JavaScript code samples. I also have "--javascript" included in my prince build statement.

The problem, I think, is that Prince tries to execute the JavaScript in my code samples. Anyway, I see this warning a lot when I build the PDF:

error: TypeError: value is not an object


How can I leave in my code samples and also leave in the "--javascript" parameter but not get the warning messages?
mikeday
Are the code samples actual <script> elements? Does the browser run them as well?
tomjohnson1492
Some of the code samples do contain <script> elements, but the code samples are set off with <pre> tags.
mikeday
That is not sufficient, you will need to escape it like this: &lt;script> to make sure that it is not interpreted as an actual tag.