Editra documentation

Export & print

Carry the same physical page boundaries from the editor into Get HTML, browser print, and PDF output.

Open full example

Export commands

await editor.executeCommand("exportPDF");
await editor.executeCommand("exportWord");
await editor.executeCommand("exportHTML");
await editor.executeCommand("exportMarkdown");

Get HTML uses Editra's paginated export snapshot. It preserves the selected physical paper size, orientation, margins, calculated automatic page assignments, header/footer regions, and explicit page breaks while the application's stored HTML stays clean.

Print

Print the downloaded HTML from the browser at 100% scale with browser-added headers and footers disabled. The editor and generated document use the same page geometry, so a line assigned to Page 2 does not move back to Page 1 in the PDF. Content-only printing remains available in the Classic theme for flexible layouts.

await editor.executeCommand("exportHTML", {
  fileName: "editra-document.html"
});

Import before export

Word and HTML files use the same secure document pipeline before export. Read the import guide →

Open paginated Word demo → · Open Classic export demo → · Open Classic custom-print demo →