Skip to content

Commit e52df22

Browse files
authored
DOC-3243: Add new exportpdf v2 converter documentation. (#4005)
* DOC-3243: TinyMCE 8.4.0 Release Documentation and Community Changelog. * DOC-3243: Add new exportpdf v2 converter documentation. * DOC-3243: Add release notes. * DOC-3243: Consolidate Export to PDF docs, improve clarity - Merge exportpdf and exportpdf-v2 into single plugin page - Add backwards compatibility and conversion section - Add exportpdf_converter_options_combined partial (flat + nested formats) - Side-by-side demos (flat vs nested) in single exportpdf demo - Update JWT guides: remove v2 branding, add 8.4.0+ note, link to v1 for pre-8.4.0 - Add v1 JWT guides to nav (pre-8.4.0) - Rename HTML to PDF Converter API v2 to HTML to PDF Converter API - Fix exportpdf_converter_style example (invalid header structure) - Remove orphaned exportpdf_converter_options and exportpdf_converter_options_v2 partials * DOC-3243: Add on-premises Docker v2 API upgrade notes - exportpdf_service_url: IMPORTANT note about v2-compatible Docker image - export-to-pdf-overview: IMPORTANT note with changelog link - exportpdf_converter_options_combined: Expand NOTE for on-premises * Set image width to 100% in exportpdf demos * Update antora.yml
1 parent 45b2f8c commit e52df22

15 files changed

Lines changed: 645 additions & 64 deletions
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<textarea id="exportpdf-v2">
2+
<h1>Streamline - The Next-Gen Learning Management System (LMS)</h1>
3+
<p>This document provides a comprehensive overview of the Streamline Learning Management System (LMS) project.</p>
4+
5+
<figure class="image">
6+
<img src="https://images.unsplash.com/photo-1522199755839-a2bacb67c546?q=80&amp;w=2072&amp;auto=format&amp;fit=crop&amp;ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
7+
alt="A laptop on a polished wood table with a bronze cup, creating a warm workspace ambiance" width="573" height="429">
8+
<figcaption>An elegant workspace featuring a laptop on a polished wood table, accompanied by a bronze cup, creating a warm and productive atmosphere.</figcaption>
9+
</figure>
10+
11+
<p>Photo by <a href="https://unsplash.com/@anete_lusina">Anete Lūsiņa</a> on <a href="https://unsplash.com">Unsplash</a></p>
12+
13+
<h2>Project Goals</h2>
14+
<p>Streamline aims to revolutionize online learning by offering a robust and user-friendly platform for educators and learners. The primary goals include:</p>
15+
<ul>
16+
<li><strong>Empowering educators</strong> with intuitive tools for content creation, course management, and student assessment.</li>
17+
<li><strong>Enhancing the learning experience for students</strong> through engaging content delivery, interactive features, and personalized learning paths.</li>
18+
<li><strong>Increasing accessibility and scalability</strong> to cater to diverse learning needs and support a growing user base.</li>
19+
</ul>
20+
21+
<h2>System Features</h2>
22+
<p>Streamline is designed to enrich the learning process through a comprehensive set of features:</p>
23+
<ul>
24+
<li><strong>Content Management System (CMS)</strong>: An intuitive interface enabling educators to create and upload various learning materials, including videos, documents, presentations, and quizzes.</li>
25+
<li><strong>Course Management Tools</strong>: Structure courses with clear objectives, organize content modules, and manage student enrollments effectively.</li>
26+
<li><strong>Interactive Learning Activities</strong>: Includes gamification, discussion forums, collaborative assignments, and more to maintain student engagement.</li>
27+
<li><strong>Assessment & Analytics</strong>: Tools for creating quizzes, tracking student progress, generating reports, and identifying improvement areas.</li>
28+
<li><strong>Personalized Learning Paths</strong>: Machine learning algorithms provide tailored content recommendations based on student progress and needs.</li>
29+
</ul>
30+
31+
<h3>Table 1: Streamline - Target User Groups</h3>
32+
<table style="border-collapse: collapse; width: 100%;" border="1">
33+
<thead>
34+
<tr>
35+
<th style="text-align: left;">User Group</th>
36+
<th style="text-align: left;">Benefits</th>
37+
</tr>
38+
</thead>
39+
<tbody>
40+
<tr>
41+
<td><strong>Educators</strong></td>
42+
<td>Easy content creation, efficient course management, and valuable student insights.</td>
43+
</tr>
44+
<tr>
45+
<td><strong>Learners</strong></td>
46+
<td>Engaging learning experience, personalized learning paths, and interactive collaboration.</td>
47+
</tr>
48+
<tr>
49+
<td><strong>Administrators</strong></td>
50+
<td>Scalable platform management, user access control, and comprehensive reporting tools.</td>
51+
</tr>
52+
</tbody>
53+
</table>
54+
55+
<h2>Technology Stack</h2>
56+
<p>Streamline will leverage a robust technology stack to ensure performance, scalability, and security:</p>
57+
<ul>
58+
<li><strong>Front-End</strong>: ReactJS for a responsive and user-friendly interface.</li>
59+
<li><strong>Back-End</strong>: Node.js for efficient server-side operations.</li>
60+
<li><strong>Database</strong>: MongoDB for flexible and scalable data storage.</li>
61+
<li><strong>Cloud Platform</strong>: Amazon Web Services (AWS) for reliable hosting and infrastructure.</li>
62+
</ul>
63+
64+
<h2>Project Timeline</h2>
65+
<ul>
66+
<li><strong>Phase 1 (2 Months)</strong>: System design, core functionalities development, and front-end prototype creation.</li>
67+
<li><strong>Phase 2 (3 Months)</strong>: Integration of advanced features like personalized learning and assessment tools.</li>
68+
<li><strong>Phase 3 (1 Month)</strong>: Rigorous testing, bug fixing, and UI refinement.</li>
69+
<li><strong>Phase 4 (Ongoing)</strong>: Deployment, user feedback collection, and continuous iterative development.</li>
70+
</ul>
71+
72+
<blockquote>
73+
<p><em>This timeline is preliminary and may be subject to change.</em></p>
74+
</blockquote>
75+
76+
<h2>Conclusion</h2>
77+
<p>Streamline LMS is poised to become a game-changer in online education. By empowering educators and enhancing student experiences, it aims to make effective and accessible learning available to all.</p>
78+
</textarea>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
tinymce.init({
2+
selector: 'textarea#exportpdf-v2',
3+
height: '800px',
4+
plugins: [
5+
"exportpdf", "advlist", "anchor", "autolink", "charmap", "code", "codesample", "fullscreen",
6+
"help", "image", "insertdatetime", "link", "lists", "media",
7+
"preview", "searchreplace", "table", "visualblocks",
8+
],
9+
toolbar: "undo redo | exportpdf | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
10+
image_caption: true,
11+
exportpdf_converter_options: {
12+
version: '2',
13+
document: {
14+
size: 'A4',
15+
orientation: 'portrait',
16+
margins: {
17+
top: '1in',
18+
right: '1in',
19+
bottom: '1in',
20+
left: '1in',
21+
enable_mirror_margins: true
22+
}
23+
},
24+
metadata: {
25+
title: 'Streamline LMS Overview',
26+
author: 'TinyMCE',
27+
subject: 'Learning Management System',
28+
keywords: [ 'LMS', 'education', 'Streamline' ]
29+
}
30+
}
31+
});

modules/ROOT/examples/live-demos/exportpdf/index.html

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
<textarea id="exportpdf">
1+
<div style="display: flex; gap: 20px; width: 100%;">
2+
<div style="flex: 1; min-width: 0;">
3+
<h2>Flat format (backwards compatible)</h2>
4+
<textarea class="exportpdf-flat" style="width: 100%;">
25
<h1>Streamline - The Next-Gen Learning Management System (LMS)</h1>
36
<p>This document provides a comprehensive overview of the Streamline Learning Management System (LMS) project.</p>
47

58
<figure class="image">
69
<img src="https://images.unsplash.com/photo-1522199755839-a2bacb67c546?q=80&amp;w=2072&amp;auto=format&amp;fit=crop&amp;ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
7-
alt="A laptop on a polished wood table with a bronze cup, creating a warm workspace ambiance" width="573" height="429">
10+
alt="A laptop on a polished wood table with a bronze cup, creating a warm workspace ambiance" style="width: 100%; height: auto;">
811
<figcaption>An elegant workspace featuring a laptop on a polished wood table, accompanied by a bronze cup, creating a warm and productive atmosphere.</figcaption>
912
</figure>
1013

@@ -75,4 +78,87 @@ <h2>Project Timeline</h2>
7578

7679
<h2>Conclusion</h2>
7780
<p>Streamline LMS is poised to become a game-changer in online education. By empowering educators and enhancing student experiences, it aims to make effective and accessible learning available to all.</p>
78-
</textarea>
81+
</textarea>
82+
</div>
83+
<div style="flex: 1; min-width: 0;">
84+
<h2>Nested format (v2)</h2>
85+
<textarea class="exportpdf-nested" style="width: 100%;">
86+
<h1>Streamline - The Next-Gen Learning Management System (LMS)</h1>
87+
<p>This document provides a comprehensive overview of the Streamline Learning Management System (LMS) project.</p>
88+
89+
<figure class="image">
90+
<img src="https://images.unsplash.com/photo-1522199755839-a2bacb67c546?q=80&amp;w=2072&amp;auto=format&amp;fit=crop&amp;ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
91+
alt="A laptop on a polished wood table with a bronze cup, creating a warm workspace ambiance" style="width: 100%; height: auto;">
92+
<figcaption>An elegant workspace featuring a laptop on a polished wood table, accompanied by a bronze cup, creating a warm and productive atmosphere.</figcaption>
93+
</figure>
94+
95+
<p>Photo by <a href="https://unsplash.com/@anete_lusina">Anete Lūsiņa</a> on <a href="https://unsplash.com">Unsplash</a></p>
96+
97+
<h2>Project Goals</h2>
98+
<p>Streamline aims to revolutionize online learning by offering a robust and user-friendly platform for educators and learners. The primary goals include:</p>
99+
<ul>
100+
<li><strong>Empowering educators</strong> with intuitive tools for content creation, course management, and student assessment.</li>
101+
<li><strong>Enhancing the learning experience for students</strong> through engaging content delivery, interactive features, and personalized learning paths.</li>
102+
<li><strong>Increasing accessibility and scalability</strong> to cater to diverse learning needs and support a growing user base.</li>
103+
</ul>
104+
105+
<h2>System Features</h2>
106+
<p>Streamline is designed to enrich the learning process through a comprehensive set of features:</p>
107+
<ul>
108+
<li><strong>Content Management System (CMS)</strong>: An intuitive interface enabling educators to create and upload various learning materials, including videos, documents, presentations, and quizzes.</li>
109+
<li><strong>Course Management Tools</strong>: Structure courses with clear objectives, organize content modules, and manage student enrollments effectively.</li>
110+
<li><strong>Interactive Learning Activities</strong>: Includes gamification, discussion forums, collaborative assignments, and more to maintain student engagement.</li>
111+
<li><strong>Assessment & Analytics</strong>: Tools for creating quizzes, tracking student progress, generating reports, and identifying improvement areas.</li>
112+
<li><strong>Personalized Learning Paths</strong>: Machine learning algorithms provide tailored content recommendations based on student progress and needs.</li>
113+
</ul>
114+
115+
<h3>Table 1: Streamline - Target User Groups</h3>
116+
<table style="border-collapse: collapse; width: 100%;" border="1">
117+
<thead>
118+
<tr>
119+
<th style="text-align: left;">User Group</th>
120+
<th style="text-align: left;">Benefits</th>
121+
</tr>
122+
</thead>
123+
<tbody>
124+
<tr>
125+
<td><strong>Educators</strong></td>
126+
<td>Easy content creation, efficient course management, and valuable student insights.</td>
127+
</tr>
128+
<tr>
129+
<td><strong>Learners</strong></td>
130+
<td>Engaging learning experience, personalized learning paths, and interactive collaboration.</td>
131+
</tr>
132+
<tr>
133+
<td><strong>Administrators</strong></td>
134+
<td>Scalable platform management, user access control, and comprehensive reporting tools.</td>
135+
</tr>
136+
</tbody>
137+
</table>
138+
139+
<h2>Technology Stack</h2>
140+
<p>Streamline will leverage a robust technology stack to ensure performance, scalability, and security:</p>
141+
<ul>
142+
<li><strong>Front-End</strong>: ReactJS for a responsive and user-friendly interface.</li>
143+
<li><strong>Back-End</strong>: Node.js for efficient server-side operations.</li>
144+
<li><strong>Database</strong>: MongoDB for flexible and scalable data storage.</li>
145+
<li><strong>Cloud Platform</strong>: Amazon Web Services (AWS) for reliable hosting and infrastructure.</li>
146+
</ul>
147+
148+
<h2>Project Timeline</h2>
149+
<ul>
150+
<li><strong>Phase 1 (2 Months)</strong>: System design, core functionalities development, and front-end prototype creation.</li>
151+
<li><strong>Phase 2 (3 Months)</strong>: Integration of advanced features like personalized learning and assessment tools.</li>
152+
<li><strong>Phase 3 (1 Month)</strong>: Rigorous testing, bug fixing, and UI refinement.</li>
153+
<li><strong>Phase 4 (Ongoing)</strong>: Deployment, user feedback collection, and continuous iterative development.</li>
154+
</ul>
155+
156+
<blockquote>
157+
<p><em>This timeline is preliminary and may be subject to change.</em></p>
158+
</blockquote>
159+
160+
<h2>Conclusion</h2>
161+
<p>Streamline LMS is poised to become a game-changer in online education. By empowering educators and enhancing student experiences, it aims to make effective and accessible learning available to all.</p>
162+
</textarea>
163+
</div>
164+
</div>

modules/ROOT/examples/live-demos/exportpdf/index.js

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tinymce.init({
2-
selector: 'textarea#exportpdf',
2+
selector: 'textarea.exportpdf-flat',
33
height: '800px',
44
plugins: [
55
"exportpdf", "advlist", "anchor", "autolink", "charmap", "code", "codesample", "fullscreen",
@@ -16,3 +16,35 @@ tinymce.init({
1616
margin_left: '1in'
1717
}
1818
});
19+
20+
tinymce.init({
21+
selector: 'textarea.exportpdf-nested',
22+
height: '800px',
23+
plugins: [
24+
"exportpdf", "advlist", "anchor", "autolink", "charmap", "code", "codesample", "fullscreen",
25+
"help", "image", "insertdatetime", "link", "lists", "media",
26+
"preview", "searchreplace", "table", "visualblocks",
27+
],
28+
toolbar: "undo redo | exportpdf | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
29+
image_caption: true,
30+
exportpdf_converter_options: {
31+
version: '2',
32+
document: {
33+
size: 'A4',
34+
orientation: 'portrait',
35+
margins: {
36+
top: '1in',
37+
right: '1in',
38+
bottom: '1in',
39+
left: '1in',
40+
enable_mirror_margins: true
41+
}
42+
},
43+
metadata: {
44+
title: 'Streamline LMS Overview',
45+
author: 'TinyMCE',
46+
subject: 'Learning Management System',
47+
keywords: [ 'LMS', 'education', 'Streamline' ]
48+
}
49+
}
50+
});

modules/ROOT/nav.adoc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,14 @@
277277
**** xref:mediaembed-server-config.adoc[Configure Enhanced Media Embed Server]
278278
**** xref:mediaembed-server-integration.adoc[Integrate Enhanced Media Embed Server]
279279
*** xref:advtable.adoc[Enhanced Tables]
280-
*** xref:exportpdf.adoc[Export to PDF]
281-
**** xref:html-to-pdf-converter-api.adoc[HTML to PDF Converter API]
282-
**** JWT Authentication
283-
***** xref:export-to-pdf-with-jwt-authentication-nodejs.adoc[Node.js]
284-
***** xref:export-to-pdf-with-jwt-authentication-php.adoc[PHP]
280+
*** Export to PDF
281+
**** xref:exportpdf.adoc[Export to PDF]
282+
***** xref:html-to-pdf-converter-api-v2.adoc[HTML to PDF Converter API]
283+
***** JWT Authentication
284+
****** xref:export-to-pdf-v2-with-jwt-authentication-nodejs.adoc[Node.js (8.4.0+)]
285+
****** xref:export-to-pdf-v2-with-jwt-authentication-php.adoc[PHP (8.4.0+)]
286+
****** xref:export-to-pdf-with-jwt-authentication-nodejs.adoc[Node.js (pre-8.4.0)]
287+
****** xref:export-to-pdf-with-jwt-authentication-php.adoc[PHP (pre-8.4.0)]
285288
*** xref:exportword.adoc[Export to Word]
286289
**** xref:html-to-docx-converter-api.adoc[HTML to DOCX Converter API]
287290
**** JWT Authentication

modules/ROOT/pages/8.4.0-release-notes.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ For information on the **<Open source plugin name>** plugin, see xref:<plugincod
5757

5858
The following premium plugin updates were released alongside {productname} {release-version}.
5959

60+
=== Export to PDF
61+
62+
The {productname} {release-version} release includes an accompanying release of the **Export to PDF** premium plugin.
63+
64+
**Export to PDF** includes the following addition.
65+
66+
==== exportpdf supports API version 2 converter options
67+
// #TINY-13700
68+
69+
`{productname}` `{release-version}` adds support for version `2` of the `exportpdf` API through `exportpdf_converter_options`. Version `1` remains the default for backward compatibility. The new nested structure organizes options under `document`, `headers`, `footers`, `metadata`, `security`, and `signature`, enabling per-page headers and footers, PDF metadata, password protection, and certificate-based signing.
70+
71+
For information on the **Export to PDF** plugin, see xref:exportpdf.adoc[Export to PDF].
72+
6073
=== Media Optimizer
6174

6275
The {productname} {release-version} release includes an accompanying release of the **Media Optimizer** premium plugin.
@@ -199,6 +212,7 @@ In {productname} {release-version}, a new xref:non-editable-content-options.adoc
199212

200213
In {productname} {release-version}, the new xref:custom-view.adoc#view_show[`+view_show+`] option allows specifying which view to display when the editor is initialized. The option behaves similarly to `+sidebar_show+` but takes precedence for views; both sidebars and views can be configured to show on init.
201214

215+
202216
[[changes]]
203217
== Changes
204218

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
= {pluginname} with JWT authentication (Node.js) Guide
2+
:plugincode: exportpdf
3+
:pluginname: Export to PDF
4+
:navtitle: JWT Authentication setup for {pluginname}
5+
:description: Guide on how to set up JWT authentication for exporting PDF files with {pluginname} using Node.js
6+
:keywords: jwt, authentication, exportpdf, pdf, node.js
7+
8+
9+
include::partial$auth/document-converters/nodejs/intro-and-prerequisites.adoc[]
10+
11+
[NOTE]
12+
====
13+
This guide uses the nested format (`version: '2'`) for `exportpdf_converter_options`. Requires {productname} 8.4.0 or newer. For full option documentation, see xref:exportpdf.adoc[Export to PDF]. For integrators on older versions, see xref:export-to-pdf-with-jwt-authentication-nodejs.adoc[JWT Authentication setup for Export to PDF (Node.js) – flat format].
14+
====
15+
16+
include::partial$auth/document-converters/nodejs/initial-project-setup.adoc[]
17+
18+
== Setup
19+
20+
=== Generate a Public/Private Key Pair
21+
22+
include::partial$auth/document-converters/jwt-setup-document-converters.adoc[leveloffset=+2]
23+
24+
include::partial$auth/document-converters/nodejs/server-setup-jwt.adoc[]
25+
26+
=== Web Page (public/index.html)
27+
28+
Inside the `public` folder where you created the `index.html` file add the HTML setup code.
29+
30+
[source,html]
31+
----
32+
<!DOCTYPE html>
33+
<html>
34+
<head>
35+
<title>TinyMCE with Export to PDF</title>
36+
<script
37+
src="https://cdn.tiny.cloud/1/no-api-key/tinymce/8/tinymce.min.js"
38+
referrerpolicy="origin"
39+
crossorigin="anonymous">
40+
</script>
41+
<script>
42+
tinymce.init({
43+
selector: 'textarea',
44+
plugins: 'exportpdf',
45+
toolbar: 'exportpdf',
46+
exportpdf_converter_options: {
47+
version: '2',
48+
document: {
49+
size: 'Letter',
50+
margins: {
51+
top: '1in',
52+
right: '1in',
53+
bottom: '1in',
54+
left: '1in'
55+
}
56+
}
57+
},
58+
59+
// exportpdf_token_provider fetches a token from the `/jwt` endpoint.
60+
exportpdf_token_provider: () => {
61+
return fetch('http://localhost:3000/jwt', {
62+
method: 'POST',
63+
headers: { 'Content-Type': 'application/json' },
64+
}).then(response => response.json());
65+
},
66+
});
67+
</script>
68+
</head>
69+
<body>
70+
<h1>TinyMCE Export to PDF Demo</h1>
71+
<textarea>
72+
Welcome to TinyMCE! Try the Export to PDF feature.
73+
</textarea>
74+
</body>
75+
</html>
76+
----
77+
78+
include::partial$auth/document-converters/nodejs/configuration-steps.adoc[]
79+
80+
== Further configuration
81+
82+
For additional options such as per-page headers and footers, PDF metadata, and security settings, see the xref:exportpdf.adoc#exportpdf-converter-options[`exportpdf_converter_options`] section on the Export to PDF plugin page.

0 commit comments

Comments
 (0)