Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26365

    HTML:
    <br /> <script><br /> window.attachEvent("onload", function(){<br /> // replace id='Text1' innerHTML to "AAA"<br /> })<br /> </script><br /> ...<br /> <span id="Text1" > </span><br />

    IE6 is workable, include print,
    I tested Acrobat in the IE’s toolbar to transfer page, Text1 printed “AAA” in the PDF, but PDF printed nothing in the Text1 with PD4ML.

    #27949

    PD4ML does not support JavaScript

    #27950

    Is this still true? No javascript support?

    #27951

    We do not plan to natively support JavaScript in PD4ML. Originally PD4ML is not intended for web sites capture; it is to allow you to define PDF layouts with simple well-known languages – HTML/CSS.

    In PD4ML use cases JavaScript could be only used to generate some portions of HTML content, as the most of JavaScript “power” (interactivity, animation etc) is not applicable or direct convertible to its target PDF format.

    As a drawback JavaScript support would turn PD4ML into a bulky construct (adding JavaScript runtime, DOM structures) and requires quite a serious refactoring of the existing code.

    There is a tricky workaround JavaScript-enabled pages. It work only in web scenarios to implement “convert to PDF” button for current page. After JavaScript is evaluated in a web browser and the layout is rendered, the actual dynamic HTML can be captured from the browser and passed to PD4ML.

    I’ve attached a draft, which illustrates it. The form “action” attribute should point to a Java servlet, which takes “source” parameter value (HTML code) and converts it to PDF.

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.