Forum How do I...?

How to apply styles in iframes?

I am creating a pdf file from a html file using Prince 14.3. This html file contains another html file using an iframe tag. The pdf sohws the iframe content, but no style is applied to the iframe. In the Prince user GUide Help it is said that "However there may be some subtleties required to get the correct size and styling of content within iframe elements." Can it be done?
Thanking you in advance,
princexml command
prince.exe" index.html -o output.pdf

  <h1>iframe test</h1>
  <iframe src="sample.html" style="border: black 1px solid;"></iframe>

  <meta charset="utf-8">
    body {
      background-color: lightblue;


  <p>Esse laboris officia voluptate do proident.</p>

  1. index.html0.2 kB
  2. output.pdf38.5 kB
  3. sample.html0.3 kB
The background seems to work when applied to the h1 within the iframe, just not the body element, whose style is reset for reasons that escape me at the moment.

A temporary workaround would be to add a <div> wrapping all the content within the iframe and apply the relevant styling to that.
We have now fixed this issue in the latest build of Prince.