Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Append HTML content

See original GitHub issue


I would like to append/embed the content of one HTML file to my PDF or HTML. Is this posible through DITA-OT?

I am using this link as a reference:

But I am unable to make it work.

I have tried with below ditamap, but even when scope=local, the content of the HTML is not appended.

    <appendix navtitle="Report">
      <topicref format="html" href="content.html" locktitle="yes" navtitle="Report" scope="peer"/>

Environment: MacOs DITA-OT 3.3

Thank you!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

raducoravucommented, Jul 10, 2019

@cinthyargc thanks for documenting your experience with this. I added a documentation task so that maybe the docs could explain better the limitations of the conversion.

cinthyargccommented, Jul 9, 2019

Hi Radu,

I just wanted to share, that I updated to latest version of DITA-OT, and I am now able to add html content into my HTML and PDF, I was missing the fix for #2947.

Important Note: I had to re-formart my HTML, to match HTML 5, and use article tags, otherwise, HTML body was not being added to PDF or HTML.

To anyone reaching this point, use HTML 5 tags and DITA-OT >= 3.3.2. Below a sample code:

<!DOCTYPE html>
    <title>Report Viewer</title>
      <h1>Placement Report</h1>
      <p>Report will be placed here</p>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Element.append() - Web APIs - MDN Web Docs
The Element.append() method inserts a set of Node objects or string objects after the last child of the Element. String objects are inserted ......
Read more >
How to append HTML code to a div using JavaScript
To append using the innerHTML attribute, first select the element (div) where you want to append the code. Then, add the code enclosed...
Read more >
.append() | jQuery API Documentation
A function that returns an HTML string, DOM element(s), text node(s), or jQuery object to insert at the end of each element in...
Read more >
jQuery append() Method
The append() method inserts specified content at the end of the selected elements. Tip: To insert content at the beginning of the selected...
Read more >
How to append text to a `<div>`? - javascript
If you are using jQuery you can use $('#mydiv').append('html content') and it will keep the existing content.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found