Editra documentation

Export & print

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

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

Use the File menu to import HTML or a Word document, then review the normalized result before export.

Open editor-to-PDF demo → · Open export demo → · Open Classic custom-print demo →