Wiris

Documentation / MathType

  • Demos
  • Visit our website
  • Downloads
  • Contact us
  • MathType

    • WirisQuizzes

      • Nubric

        • CalcMe

          • MathPlayer

            • Store FAQ

              • MathFlow

                • BF FAQ

                  • Miscellaneous

                    • Wiris Integrations

                      • Home
                      • MathType
                      • Technical documentation
                      • MathType for HTML editors
                      • Reference
                      • API services

                      Rendering service reference

                      Reading time: 2min

                      Reference for the MathType rendering services used to generate visual representations of mathematical expressions.

                      Summary

                      The MathType rendering services generate visual representations of mathematical expressions in a variety of output formats. Rendering services accept Presentation MathML, Content MathML, or LaTeX as input and return the rendered formula in the requested format. Depending on the interface, they may also return metadata describing the generated output.

                      Supported services

                      Service Description
                      render Automatically generates the configured default output format.
                      render.svg Generates SVG output.
                      render.png Generates PNG output.
                      render.pdf Generates PDF output.
                      render.eps Generates EPS output.
                      render.swf Generates SWF output (legacy).

                      When using the generic render endpoint, specify the desired output format with the format parameter. The format-specific endpoints always return their corresponding format.

                      Legacy endpoint

                      render.swf generates Adobe Flash (SWF) output and is retained for backward compatibility. It is not recommended for new integrations.

                       

                      Available interfaces

                      Rendering services are available via the following interfaces.

                      Interface Availability
                      HTTP endpoints Cloud and self-hosted deployments
                      Java API Self-hosted Java deployments
                      .NET API Self-hosted .NET deployments

                      HTTP endpoint

                      The endpoint URL depends on your deployment.

                      Deployment Endpoint
                      Java /pluginwiris_engine/app/render
                      PHP /integration/render.php

                      Both GET and POST requests are supported. POST is recommended for large MathML expressions.

                      Request parameters

                      The rendering services accept the following request parameters.

                      Parameter Required Description
                      mml No* Presentation MathML or Content MathML to render.
                      latex No* LaTeX expression to render.
                      format No Output format when using the generic render endpoint. Supported values are png, svg, pdf, eps, and swf.
                      lang No Language used for accessible text when applicable.
                      dpi No Image resolution for raster formats.
                      httpstatus No Returns HTTP 5xx status codes when rendering fails instead of embedding the error in a successful (200 OK) response.

                      * Provide either mml or latex.

                      Example request

                      Render a LaTeX expression as SVG:

                      GET /render?format=svg&latex=2-x

                      Render a MathML expression with a custom background color:

                      GET /render?mml=<math><mn>2</mn><mo>-</mo><mi>x</mi></math>&backgroundColor=%23f00

                      Use POST when sending large MathML expressions.

                       

                      Response

                      The service returns the rendered formula in the requested output format. Supported output formats are:

                      Output Description
                      SVG Vector image (recommended).
                      PNG Raster image.
                      PDF Portable Document Format.
                      EPS Encapsulated PostScript.
                      SWF Adobe Flash format (legacy).

                      See Supported rendering formats for format-specific considerations.

                       

                      Response metadata

                      The Java and .NET APIs also return metadata describing the generated output.

                      Property Description
                      width Width of the generated image.
                      height Height of the generated image.
                      baseline Distance from the top of the image to the mathematical baseline.

                      Error handling

                      Rendering may fail if:

                      • The supplied MathML or LaTeX is not valid.
                      • The requested output format is not supported.
                      • The request exceeds server limits.

                      When httpstatus=true is specified, the service returns an appropriate HTTP 5xx status code instead of embedding the error in a successful (200 OK) response.

                      Notes

                      • Both Presentation MathML and Content MathML are accepted as input.
                      • LaTeX expressions can be rendered directly using the latex parameter.
                      • The rendering behavior depends on the configuration of your MathType Integration Services deployment.
                      • Format-specific endpoints (render.svg, render.png, etc.) ignore the format parameter.
                      • SWF output is provided for legacy compatibility and is not recommended for new integrations.

                      Java and .NET APIs

                      The services described in this article are also available through the Java and .NET APIs. For complete method signatures, return types, and implementation details, see:

                      • Java API reference.
                      • .NET API reference.

                      Related articles

                      • MathType API services.
                      • Configure rendering output.
                      • Supported rendering formats.
                      • MathType Editor parameters.
                      • MathType Integration Services parameters.

                      Was this article helpful?

                      Give feedback about this article

                      Related Articles

                      • Understand MathType deployments
                      • Deploy MathType services with .NET
                      • Deploy Integration Services with Java

                      Rendering service reference

                      Summary Supported services Legacy endpoint Available interfaces HTTP endpoint Request parameters Example request Response Response metadata Error handling Notes Java and .NET APIs Related articles

                      Empowering STEM education

                      MathType

                      • Office Tools
                      • LMS
                      • XML
                      • HTML

                      WirisQuizzes

                      Nubric

                      Integrations

                      Solutions

                      • Education
                      • Publishing houses – platforms and interactive
                      • Publishing houses – Print and digital
                      • Technical writers

                      Pricing

                      Downloads

                      Blog

                      • Success stories

                      About us

                      • Careers
                      • Partnership

                      Contact Us

                      Contact Sales

                      European union (European Regional Development Fund) and 1EdTech (TrustEd Apps Certified)
                      • Cookie Policy
                      • Terms of Use
                      • Privacy Policy / GDPR
                      • Student Data Privacy
                      • Compliance
                      • Cookie Settings

                      © Wiris 2026

                      Expand