I have an HTLML page which contains from:
- title
- page content
- topics (those are subpages, links to other HTML pages)
We have a button "Print to PDF" which was implemented by some vendor who doesn't provide support any more. Everything is converted to PDF (title, and all other subpges, topics) except content (text) from the first page.
The original code is following:
<p class="mt-script-comment">Chapter-level PDF - button right</p>
<pre class="script">
var pageidlist = '';
foreach(var nextpage in page.subpages) {
pageidlist = pageidlist..','..nextpage.id;
foreach(var nextpagesub in nextpage.subpages) {
pageidlist = pageidlist..','..nextpagesub.id;
}
}`
`var pdflink = 'https://company.url.com/@api/deki/pages/book?stylesheet=default&pageids='..pageidlist..'&showtoc=true&title='..uri.encode(page.title)..'&filename='..uri.encode(page.title);
<p>
<a href=(pdflink) target='_blank' title=(pdflink)><span class="fcm-button">'Print Guide'</span></a>
</p></p></pre>
I tried to modify this line by adding:
var pageidlist = page.id;
but it didn't help. After that we are getting info: This page was not added to the PDF due to the following tag(s): article:topic-guide
Can you please assist how I can add content from the first page to the output as well? We are using some MindTouch app: https://success.mindtouch.com/Manage/Author/DekiScript/Page_objects Thank you very much!