PlantUML Newpage Not Working? Rendering and Output Fixes

··Updated ·7 min read
plantumlplantuml-newpagepage-breaktroubleshooting

If PlantUML newpage appears not to work in OnUML, the reason is the current preview model: each PlantUML diagram tab displays one rendered image. OnUML does not currently provide next-page controls or download a group of images from one newpage source.

The PlantUML language can use newpage to split supported sequence diagrams, but that does not automatically make every online editor a multipage viewer. In OnUML, the reliable approach is to place each reader-facing page or scenario in its own diagram tab.

Key Takeaways

  • OnUML currently previews and exports one rendered image per PlantUML diagram tab.
  • newpage does not create page navigation in the OnUML preview.
  • PNG and SVG actions export the image currently exposed by the preview, not a multipage package.
  • Use multiple diagram tabs when every section must be visible, editable, shareable, and downloadable in OnUML.
  • Keep one sequence diagram focused on one reader task whenever possible.

Quick Diagnosis

What you see in OnUMLWhy it happensRecommended action
Only the first section is visibleThe preview exposes one rendered imageSplit the source into multiple diagram tabs
PNG or SVG contains only one sectionExport follows the current single-image previewExport each tab separately
Adding newpage does not add controlsOnUML has no PlantUML page navigatorUse tabs with clear titles
One diagram is too tallThe source contains too many scenariosSeparate scenarios or use ref blocks
You need one PDF documentOnUML exports PNG and SVG, not PDFExport each tab as SVG and assemble the document elsewhere

What newpage Means

In PlantUML sequence-diagram syntax, newpage marks a split between sections. A minimal source looks like this:

@startuml
title Sign-in flow
actor User
participant App

User -> App: Submit credentials
App --> User: Authentication result

newpage Recovery flow

User -> App: Request password reset
App --> User: Send reset instructions
@enduml

This syntax describes multiple rendered pages at the PlantUML language level. It does not define how an editor must display, navigate, name, or download those pages.

OnUML's PlantUML preview requests and displays a single image for each diagram tab. As a result, later newpage sections are not exposed through the current interface.

Instead of keeping both scenarios behind one newpage, create two PlantUML diagram tabs in the full OnUML editor. The two previews below are the sources to paste into those tabs; the blog renders them separately and does not reproduce the editor's tab bar.

  1. Open the full editor and choose PlantUML mode.
  2. In the diagram tab bar below the preview, double-click the current tab and rename it Sign-in flow.
  3. Replace its code with the Tab 1 source below.
  4. Click the + button at the right end of the tab bar. Its tooltip reads Add diagram.
  5. Double-click the new tab, rename it Recovery flow, and paste the Tab 2 source into it.
  6. Click each tab to switch between the two diagrams and verify its preview.
OnUML diagram tabSource to paste
Sign-in flowTab 1 code block
Recovery flowTab 2 code block
OnUML editor showing separate Sign-in flow and Recovery flow diagram tabs with the Add diagram button
Separate diagrams in OnUML tabs Each tab keeps one rendered diagram, and the plus button creates another diagram tab in the same project.

Tab 1: Sign-in flow

@startuml
title Sign-in flow
actor User
participant App

User -> App: Submit credentials
App --> User: Authentication result
@enduml

Tab 2: Recovery flow

@startuml
title Recovery flow
actor User
participant App

User -> App: Request password reset
App --> User: Send reset instructions
@enduml

This structure works better in OnUML because each diagram can be:

  • Previewed directly
  • Renamed with a clear tab title
  • Edited independently
  • Downloaded as PNG or SVG
  • Included in a saved project
  • Shared as part of the project workflow

It also makes each image easier to embed in documentation because its purpose is clear without relying on page order.

Step-by-Step Fix in OnUML

  1. Open the source in the full OnUML editor.
  2. Choose PlantUML mode.
  3. Double-click the current tab in the tab bar below the preview, then enter a descriptive diagram name.
  4. Copy the content before the first newpage into that tab and give it its own @startuml and @enduml.
  5. Click the + (Add diagram) button at the right end of the tab bar.
  6. Double-click the new tab to rename it, then move the next section into it.
  7. Repeat for any remaining sections.
  8. Click each tab to switch diagrams and verify every preview.
  9. Download PNG or SVG from each tab as needed.
  10. Sign in and select Save if the group should remain as an OnUML project.

Do not keep newpage inside the separated tabs unless another PlantUML environment also consumes the same source and requires it.

When to Keep One Diagram

Splitting is not always necessary. Keep one sequence diagram when the messages form one short, continuous interaction that readers should understand as a single timeline.

If the diagram is long but still represents one scenario, try these options before splitting:

  • Remove implementation details that do not affect the reader's decision.
  • Use ref to summarize a secondary interaction.
  • Replace repeated low-level messages with one meaningful message.
  • Move error recovery into a separate diagram.
  • Keep participant labels short and consistent.

Example with a reference:

@startuml
actor User
participant App
participant Identity

User -> App: Sign in
App -> Identity: Verify credentials

ref over App, Identity
Token validation and account checks
end ref

Identity --> App: Authentication result
App --> User: Open dashboard
@enduml

The ref block preserves context without requiring another rendered page.

Exporting the Result

After splitting the source into tabs:

  1. Open the first tab and verify its preview.
  2. Select PNG for a conventional image or SVG for scalable documentation.
  3. Repeat for every tab.
  4. Rename the downloaded files so their order is clear, for example:
    • 01-sign-in-flow.svg
    • 02-recovery-flow.svg

The PlantUML export guide explains the difference between OnUML projects, browser drafts, PNG/SVG downloads, and public sharing.

Common Mistakes

Expecting newpage to add UI controls

PlantUML syntax cannot add next/previous buttons to the OnUML interface. Navigation is an editor feature.

Exporting before checking every tab

Each tab has its own current preview. Open and verify each one before downloading.

Splitting in the middle of a required interaction

Keep messages together when readers need the complete order to understand the behavior. Split by scenario or responsibility, not simply by line count.

A share link provides browser access to the shared diagram content. It does not assemble PlantUML pages into a PDF.

Keeping important work only as an unsaved draft

Browser-local drafts are convenient but not permanent backups. Save the OnUML project and retain the source separately when the diagram matters.

Frequently Asked Questions

Does OnUML support PlantUML newpage navigation?

Not currently. The PlantUML preview displays one rendered image per diagram tab and does not expose next/previous page controls.

Why do I only see the first page?

The source may describe multiple PlantUML pages, but OnUML's current preview exposes one image. Split the sections into separate diagram tabs.

Will PNG or SVG download every newpage section?

No. The current export action downloads the image available in the active preview. Export each separated tab individually.

Can I keep the pages together in one OnUML project?

Yes. Put each section in its own diagram tab, then save the project. This preserves the relationship between the diagrams without hiding sections behind newpage.

Can OnUML export the pages as one PDF?

Not directly. Export the tabs as SVG or PNG and assemble them in the document tool that will produce the PDF.

Next Steps

In OnUML, multiple diagram tabs are the practical replacement for a newpage workflow: every section remains visible, editable, downloadable, and easier to maintain.