mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 08:32:16 +01:00
1277 lines
101 KiB
HTML
Executable File
1277 lines
101 KiB
HTML
Executable File
<!DOCTYPE html><html><head>
|
||
|
||
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-10196481-9"></script>
|
||
<script>
|
||
window.dataLayer = window.dataLayer || [];
|
||
function gtag(){dataLayer.push(arguments);}
|
||
gtag('js', new Date());
|
||
|
||
gtag('config', 'UA-10196481-9');
|
||
</script>
|
||
<meta charset="utf-8"/>
|
||
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||
<title>Gotenberg · A Docker-powered stateless API for converting HTML, Markdown and Office documents to PDF.</title>
|
||
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="theme/gotenberg/img/apple-touch-icon-57x57.png"/>
|
||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="theme/gotenberg/img/apple-touch-icon-114x114.png"/>
|
||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="theme/gotenberg/img/apple-touch-icon-72x72.png"/>
|
||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="theme/gotenberg/img/apple-touch-icon-144x144.png"/>
|
||
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="theme/gotenberg/img/apple-touch-icon-60x60.png"/>
|
||
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="theme/gotenberg/img/apple-touch-icon-120x120.png"/>
|
||
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="theme/gotenberg/img/apple-touch-icon-76x76.png"/>
|
||
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="theme/gotenberg/img/apple-touch-icon-152x152.png"/>
|
||
<link rel="icon" type="image/png" href="theme/gotenberg/img/favicon-196x196.png" sizes="196x196"/>
|
||
<link rel="icon" type="image/png" href="theme/gotenberg/img/favicon-96x96.png" sizes="96x96"/>
|
||
<link rel="icon" type="image/png" href="theme/gotenberg/img/favicon-32x32.png" sizes="32x32"/>
|
||
<link rel="icon" type="image/png" href="theme/gotenberg/img/favicon-16x16.png" sizes="16x16"/>
|
||
<link rel="icon" type="image/png" href="theme/gotenberg/img/favicon-128.png" sizes="128x128"/>
|
||
<link rel="stylesheet" href="theme/gotenberg/css/index.css"/>
|
||
</head>
|
||
<body>
|
||
<div class="Wrapper">
|
||
<div class="Container">
|
||
<div class="Header">
|
||
<div class="Title center">
|
||
<img src="https://user-images.githubusercontent.com/8983173/50009948-84b01e00-ffb8-11e8-850b-fc240382c626.png" alt="Gotenberg logo" width="250" height="250"/>
|
||
<span class="text">Gotenberg</span>
|
||
<span class="subtext">A Docker-powered stateless API for converting HTML, Markdown and Office documents to PDF.</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="Content-wrapper">
|
||
<div class="Sidebar">
|
||
<div class="Menu">
|
||
|
||
<div class="item">
|
||
<a href="#introduction">Introduction</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#install">Install</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#clients">Clients</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#environment_variables">Environment variables</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#html">HTML</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#url">URL</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#markdown">Markdown</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#office">Office</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#merge">Merge</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#timeout">Timeout</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#webhook">Webhook</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#result_filename">Result filename</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#scalability">Scalability</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#ping">Ping</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#fonts">Fonts</a>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<a href="#links">Links</a>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="Content">
|
||
|
||
<div class="Page" id="introduction">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="introduction" href="#introduction">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Introduction</h1>
|
||
<p><a href="https://github.com/thecodingmachine/gotenberg/">Gotenberg</a> is a Docker-powered stateless API for converting HTML, Markdown and Office documents to PDF.</p>
|
||
|
||
<ul>
|
||
<li>HTML and Markdown conversions using Google Chrome headless</li>
|
||
<li>Office conversions (.txt, .rtf, .docx, .doc, .odt, .pptx, .ppt, .odp and so on) using <a href="https://github.com/dagwieers/unoconv">unoconv</a></li>
|
||
<li>Performance: Google Chrome and LibreOffice (unoconv) started once in the background thanks to PM2</li>
|
||
<li>Failure prevention: PM2 automatically restarts previous processes if they fail</li>
|
||
<li>Assets: send your header, footer, images, fonts, stylesheets and so on for converting your HTML and Markdown to beaufitul PDFs!</li>
|
||
<li>Easily interact with the API using our <a href="https://github.com/thecodingmachine/gotenberg-go-client">Go</a> and <a href="https://github.com/thecodingmachine/gotenberg-php-client">PHP</a> libraries</li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="install">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="install" href="#install">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Install</h1>
|
||
<p>Gotenberg is shipped within a Docker image.</p>
|
||
|
||
<p>You may start it with:</p>
|
||
|
||
<pre class="chroma">$ docker run --rm -p <span class="m">3000</span>:3000 thecodingmachine/gotenberg:5
|
||
</pre>
|
||
|
||
<p>All processes in the Docker container runs as a dedicated non-root user called <code>gotenberg</code> with user id <code>1001</code> from the working dir <code>/gotenberg</code>.</p>
|
||
|
||
<blockquote>
|
||
<p>The API will be available at <a href="http://localhost:3000">http://localhost:3000</a>.</p>
|
||
</blockquote>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="install.docker_compose" href="#install.docker_compose">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Docker Compose</h2>
|
||
|
||
<p>You may also add it in your Docker Compose stack:</p>
|
||
|
||
<pre class="chroma">version<span class="p">:</span><span class="w"> </span><span class="s1">'3'</span><span class="w">
|
||
</span><span class="w">
|
||
</span><span class="w"></span>services<span class="p">:</span><span class="w">
|
||
</span><span class="w">
|
||
</span><span class="w"> </span><span class="c"># your others services</span><span class="w">
|
||
</span><span class="w">
|
||
</span><span class="w"> </span>gotenberg<span class="p">:</span><span class="w">
|
||
</span><span class="w"> </span>image<span class="p">:</span><span class="w"> </span>thecodingmachine/gotenberg<span class="p">:</span><span class="m">5</span><span class="w">
|
||
</span></pre>
|
||
|
||
<blockquote>
|
||
<p>The API will be available under <code>gotenberg:3000</code> in your Docker Compose network.</p>
|
||
</blockquote>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="install.kubernetes" href="#install.kubernetes">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Kubernetes</h2>
|
||
|
||
<p>It may also be deployed with Kubernetes.</p>
|
||
|
||
<p>Make sure to provide enough memory and CPU requests (for instance <code>512Mi</code> and <code>0.2</code> CPU).
|
||
Otherwise the API will not be able to launch Google Chrome and LibreOffice (unoconv).</p>
|
||
|
||
<blockquote>
|
||
<p>The more resources are granted, the quicker will be the conversions.</p>
|
||
</blockquote>
|
||
|
||
<p>Also, in the deployment spec of the pod, specify the uid <code>1001</code> of the user <code>gotenberg</code>:</p>
|
||
|
||
<pre class="chroma">securityContext:
|
||
privileged: false
|
||
runAsUser: 1001
|
||
</pre>
|
||
|
||
<p>In the following examples, we will assume your
|
||
Gotenberg API is available at <a href="http://localhost:3000">http://localhost:3000</a>.</p>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="clients">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="clients" href="#clients">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Clients</h1>
|
||
<p>We provide clients in various languages for easing the interactions with the API.</p>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="clients.go_client" href="#clients.go_client">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go client</h2>
|
||
|
||
<pre class="chroma">$ go get -u github.com/thecodingmachine/gotenberg-go-client/v5
|
||
</pre>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="clients.php_client" href="#clients.php_client">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP client</h2>
|
||
|
||
<p>Unless your project already has a PSR7 <code>HttpClient</code>, install <code>php-http/guzzle6-adapter</code>:</p>
|
||
|
||
<pre class="chroma">$ composer require php-http/guzzle6-adapter
|
||
</pre>
|
||
|
||
<p>Then the PHP client:</p>
|
||
|
||
<pre class="chroma">$ composer require thecodingmachine/gotenberg-php-client
|
||
</pre>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="environment_variables">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="environment_variables" href="#environment_variables">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Environment variables</h1>
|
||
<p>You may customize the API behaviour thanks to environment variables.</p>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="environment_variables.disable_google_chrome" href="#environment_variables.disable_google_chrome">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Disable Google Chrome</h2>
|
||
|
||
<p>In order to save some resources, the Gotenberg image accepts the environment variable <code>DISABLE_GOOGLE_CHROME</code>.</p>
|
||
|
||
<p>It takes the strings <code>"0"</code> or <code>"1"</code> as value where <code>1</code> means <code>true</code></p>
|
||
|
||
<blockquote>
|
||
<p>If Google Chrome is disabled, the following conversions will <strong>not</strong> be available anymore:
|
||
<a href="#html">HTML</a>, <a href="#url">URL</a> and <a href="#markdown">Markdown</a></p>
|
||
</blockquote>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="environment_variables.disable_libre_office_unoconv" href="#environment_variables.disable_libre_office_unoconv">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Disable LibreOffice (unoconv)</h2>
|
||
|
||
<p>You may also disable LibreOffice (unoconv) with <code>DISABLE_UNOCONV</code>.</p>
|
||
|
||
<blockquote>
|
||
<p>If LibreOffice (unoconv) is disabled, the following conversion will <strong>not</strong> be available anymore:
|
||
<a href="#office">Office</a></p>
|
||
</blockquote>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="environment_variables.default_wait_timeout" href="#environment_variables.default_wait_timeout">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Default wait timeout</h2>
|
||
|
||
<p>By default, the API will wait 10 seconds before it considers the conversion to be unsuccessful.</p>
|
||
|
||
<p>You may customize this timeout thanks to the environment variable <code>DEFAULT_WAIT_TIMEOUT</code>.</p>
|
||
|
||
<p>It takes a string representation of a float as value (e.g <code>"2.5"</code> for 2.5 seconds).</p>
|
||
|
||
<blockquote>
|
||
<p>The default timeout may also be overridden per request thanks to the form field <code>waitTimeout</code>.
|
||
See the <a href="#timeout">timeout section</a>.</p>
|
||
</blockquote>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="environment_variables.disable_logging_on_healthcheck" href="#environment_variables.disable_logging_on_healthcheck">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Disable logging on healthcheck</h2>
|
||
|
||
<p>By default, the API will add a log entry when the <a href="#ping">healthcheck endpoint</a> is called.</p>
|
||
|
||
<p>You may turn off this logging so as to avoid unnecessary entries in your logs with the environment variable <code>DISABLE_HEALTHCHECK_LOGGING</code>.</p>
|
||
|
||
<p>This environment variable operates in the same manner as the <code>DISABLE_GOOGLE_CHROME</code> and <code>DISABLE_UNOCONV</code> variables operate in that it accepts the strings <code>"0"</code> or <code>"1"</code> as values, where <code>1</code> is enabled.</p>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="environment_variables.default_listen_port" href="#environment_variables.default_listen_port">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Default listen port</h2>
|
||
|
||
<p>By default, the API will listen on port <code>3000</code>. For most use cases this is perfectly fine, but at times there may be cases where you need to change this due to port conflicts.</p>
|
||
|
||
<p>You may customize this port location with the environment variable <code>DEFAULT_LISTEN_PORT</code>.</p>
|
||
|
||
<p>This environment variable accepts any string that can be turned into a port number (e.g., the string <code>"0"</code> up to the string <code>"65535"</code>).</p>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="environment_variables.debug_logging_of_process_startup" href="#environment_variables.debug_logging_of_process_startup">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Debug logging of process startup</h2>
|
||
|
||
<p>By default, <code>stdout</code> and <code>stderr</code> messages from the started processes are disabled.</p>
|
||
|
||
<p>You may enable some debug logging from starting the process by setting the environment variable <code>DEBUG_PROCESS_STARTUP</code>.</p>
|
||
|
||
<p>This environment variable operates in the same manner as the <code>DISABLE_GOOGLE_CHROME</code> and <code>DISABLE_UNOCONV</code> variables operate in that it accepts the strings <code>"0"</code> or <code>"1"</code> as values, where <code>1</code> means <code>true</code>.</p>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="html">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="html" href="#html">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>HTML</h1>
|
||
<p>Gotenberg provides the endpoint <code>/convert/html</code> for HTML conversions.</p>
|
||
|
||
<p>It accepts <code>POST</code> requests with a <code>multipart/form-data</code> Content-Type.</p>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="html.basic" href="#html.basic">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Basic</h2>
|
||
|
||
<p>The only requirement is to send a file named <code>index.html</code>: it is the file
|
||
which will be converted to PDF.</p>
|
||
|
||
<p>For instance:</p>
|
||
|
||
<pre class="chroma"><span class="cp"><!doctype html></span>
|
||
<span class="p"><</span><span class="nt">html</span> <span class="na">lang</span><span class="o">=</span><span class="s">"en"</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">head</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">meta</span> <span class="na">charset</span><span class="o">=</span><span class="s">"utf-8"</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">title</span><span class="p">></span>My PDF<span class="p"></</span><span class="nt">title</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">head</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">body</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">h1</span><span class="p">></span>Hello world!<span class="p"></</span><span class="nt">h1</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">body</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">html</span><span class="p">></span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.basic.c_url" href="#html.basic.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/html <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@index.html <span class="se">\
|
||
</span><span class="se"></span> -o result.pdf
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.basic.go" href="#html.basic.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewHTMLRequest</span><span class="p">(</span><span class="s">"index.html"</span><span class="p">)</span>
|
||
<span class="nx">dest</span> <span class="o">:=</span> <span class="s">"result.pdf"</span>
|
||
<span class="nx">c</span><span class="p">.</span><span class="nf">Store</span><span class="p">(</span><span class="nx">req</span><span class="p">,</span> <span class="nx">dest</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.basic.php" href="#html.basic.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\HTMLRequest;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$index = DocumentFactory::makeFromPath('index.html', 'index.html');
|
||
$request = new HTMLRequest($index);
|
||
$dirPath = "/foo";
|
||
$filename = $client->store($request, $dirPath);
|
||
</pre>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="html.header_and_footer" href="#html.header_and_footer">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Header and footer</h2>
|
||
|
||
<p>You may also add a header and/or a footer in the resulting PDF.
|
||
Respectively, a file named <code>header.html</code> and <code>footer.html</code>.</p>
|
||
|
||
<p>Each of them <strong>has to be a complete HTML document</strong>:</p>
|
||
|
||
<pre class="chroma"><span class="p"><</span><span class="nt">html</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">head</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">style</span><span class="p">></span>
|
||
<span class="nt">body</span> <span class="p">{</span>
|
||
<span class="k">font-size</span><span class="p">:</span> <span class="mi">8</span><span class="kt">rem</span><span class="p">;</span>
|
||
<span class="k">margin</span><span class="p">:</span> <span class="mi">4</span><span class="kt">rem</span> <span class="kc">auto</span><span class="p">;</span>
|
||
<span class="p">}</span>
|
||
<span class="p"></</span><span class="nt">style</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">head</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">body</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">p</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">"pageNumber"</span><span class="p">></</span><span class="nt">span</span><span class="p">></span> of <span class="p"><</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">"totalPages"</span><span class="p">></</span><span class="nt">span</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">p</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">body</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">html</span><span class="p">></span>
|
||
</pre>
|
||
|
||
<p>The following classes allow you to inject printing values:</p>
|
||
|
||
<ul>
|
||
<li><code>date</code>: formatted print date</li>
|
||
<li><code>title</code>: document title</li>
|
||
<li><code>pageNumber</code>: current page number</li>
|
||
<li><code>totalPage</code>: total pages in the document</li>
|
||
</ul>
|
||
|
||
<blockquote>
|
||
<p><strong>Attention:</strong> the CSS properties are independant of the ones used in the <code>index.html</code> file.
|
||
Also, <code>footer.html</code> CSS properties override the ones from <code>header.html</code>.</p>
|
||
</blockquote>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.header_and_footer.c_url" href="#html.header_and_footer.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/html <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@index.html <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@header.html <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@footer.html <span class="se">\
|
||
</span><span class="se"></span> -o result.pdf
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.header_and_footer.go" href="#html.header_and_footer.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewHTMLRequest</span><span class="p">(</span><span class="s">"index.html"</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">Header</span><span class="p">(</span><span class="s">"header.html"</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">Footer</span><span class="p">(</span><span class="s">"footer.html"</span><span class="p">)</span>
|
||
<span class="nx">dest</span> <span class="o">:=</span> <span class="s">"result.pdf"</span>
|
||
<span class="nx">c</span><span class="p">.</span><span class="nf">Store</span><span class="p">(</span><span class="nx">req</span><span class="p">,</span> <span class="nx">dest</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.header_and_footer.php" href="#html.header_and_footer.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\HTMLRequest;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$index = DocumentFactory::makeFromPath('index.html', 'index.html');
|
||
$header = DocumentFactory::makeFromPath('header.html', 'header.html');
|
||
$footer = DocumentFactory::makeFromPath('footer.html', 'footer.html');
|
||
$request = new HTMLRequest($index);
|
||
$request->setHeader($header);
|
||
$request->setFooter($footer);
|
||
$dirPath = "/foo";
|
||
$filename = $client->store($request, $dirPath);
|
||
</pre>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="html.assets" href="#html.assets">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Assets</h2>
|
||
|
||
<p>You may also send additional files. For instance: images, fonts, stylesheets and so on.</p>
|
||
|
||
<p>The only requirement is to make sure that their paths
|
||
are on the same level as the <code>index.html</code> file.</p>
|
||
|
||
<p>In others words, this will work:</p>
|
||
|
||
<pre class="chroma"><span class="cp"><!doctype html></span>
|
||
<span class="p"><</span><span class="nt">html</span> <span class="na">lang</span><span class="o">=</span><span class="s">"en"</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">head</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">meta</span> <span class="na">charset</span><span class="o">=</span><span class="s">"utf-8"</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">title</span><span class="p">></span>My PDF<span class="p"></</span><span class="nt">title</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">head</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">body</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">h1</span><span class="p">></span>Hello world!<span class="p"></</span><span class="nt">h1</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">"img.png"</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">body</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">html</span><span class="p">></span>
|
||
</pre>
|
||
|
||
<p>But this won’t:</p>
|
||
|
||
<pre class="chroma"><span class="cp"><!doctype html></span>
|
||
<span class="p"><</span><span class="nt">html</span> <span class="na">lang</span><span class="o">=</span><span class="s">"en"</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">head</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">meta</span> <span class="na">charset</span><span class="o">=</span><span class="s">"utf-8"</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">title</span><span class="p">></span>My PDF<span class="p"></</span><span class="nt">title</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">head</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">body</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">h1</span><span class="p">></span>Hello world!<span class="p"></</span><span class="nt">h1</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">"/foo/img.png"</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">body</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">html</span><span class="p">></span>
|
||
</pre>
|
||
|
||
<p>You may also use <em>remote</em> paths for Google fonts, images and so on.</p>
|
||
|
||
<blockquote>
|
||
<p>If you want to install fonts directly in the Gotenberg Docker image,
|
||
see to the <a href="#fonts">fonts section</a>.</p>
|
||
</blockquote>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.assets.c_url" href="#html.assets.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/html <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@index.html <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@style.css <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@img.png <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@font.woff <span class="se">\
|
||
</span><span class="se"></span> -o result.pdf
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.assets.go" href="#html.assets.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewHTMLRequest</span><span class="p">(</span><span class="s">"index.html"</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">Assets</span><span class="p">(</span><span class="s">"font.woff"</span><span class="p">,</span> <span class="s">"img.gif"</span><span class="p">,</span> <span class="s">"style.css"</span><span class="p">)</span>
|
||
<span class="nx">dest</span> <span class="o">:=</span> <span class="s">"result.pdf"</span>
|
||
<span class="nx">c</span><span class="p">.</span><span class="nf">Store</span><span class="p">(</span><span class="nx">req</span><span class="p">,</span> <span class="nx">dest</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.assets.php" href="#html.assets.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\HTMLRequest;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$index = DocumentFactory::makeFromPath('index.html', 'index.html');
|
||
$assets = [
|
||
DocumentFactory::makeFromPath('style.css', 'style.css'),
|
||
DocumentFactory::makeFromPath('img.png', 'img.png'),
|
||
DocumentFactory::makeFromPath('font.woff', 'font.woff'),
|
||
];
|
||
$request = new HTMLRequest($index);
|
||
$request->setAssets($assets);
|
||
$dest = "result.pdf";
|
||
$client->store($request, $dest);
|
||
</pre>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="html.paper_size_margins_orientation" href="#html.paper_size_margins_orientation">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Paper size, margins, orientation</h2>
|
||
|
||
<p>You may also customize the resulting PDF format.</p>
|
||
|
||
<p>By default, it will be rendered with <code>A4</code> size, <code>1 inch</code> margins and <code>portrait</code> orientation.</p>
|
||
|
||
<blockquote>
|
||
<p>Paper size and margins have to be provided in <code>inches</code>. Same for margins.</p>
|
||
</blockquote>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.paper_size_margins_orientation.c_url" href="#html.paper_size_margins_orientation.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/html <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@index.html <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">paperWidth</span><span class="o">=</span><span class="m">8</span>.27 <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">paperHeight</span><span class="o">=</span><span class="m">11</span>.27 <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">marginTop</span><span class="o">=</span><span class="m">0</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">marginBottom</span><span class="o">=</span><span class="m">0</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">marginLeft</span><span class="o">=</span><span class="m">0</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">marginRight</span><span class="o">=</span><span class="m">0</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">landscape</span><span class="o">=</span><span class="nb">true</span> <span class="se">\
|
||
</span><span class="se"></span> -o result.pdf
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.paper_size_margins_orientation.go" href="#html.paper_size_margins_orientation.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewHTMLRequest</span><span class="p">(</span><span class="s">"index.html"</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">PaperSize</span><span class="p">(</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">A4</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">Margins</span><span class="p">(</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">NoMargins</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">Landscape</span><span class="p">(</span><span class="kc">true</span><span class="p">)</span>
|
||
<span class="nx">dest</span> <span class="o">:=</span> <span class="s">"result.pdf"</span>
|
||
<span class="nx">c</span><span class="p">.</span><span class="nf">Store</span><span class="p">(</span><span class="nx">req</span><span class="p">,</span> <span class="nx">dest</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.paper_size_margins_orientation.php" href="#html.paper_size_margins_orientation.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\HTMLRequest;
|
||
use TheCodingMachine\Gotenberg\Request;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$index = DocumentFactory::makeFromPath('index.html', 'index.html');
|
||
$request = new HTMLRequest($index);
|
||
$request->setPaperSize(Request::A4);
|
||
$request->setMargins(Request::NO_MARGINS);
|
||
$request->setLandscape(true);
|
||
$dest = "result.pdf";
|
||
$client->store($request, $dest);
|
||
</pre>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="html.wait_delay" href="#html.wait_delay">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Wait delay</h2>
|
||
|
||
<p>In some cases, you may want to wait a certain amount of time to make sure the
|
||
page you’re trying to generate is fully rendered.</p>
|
||
|
||
<blockquote>
|
||
<p>The wait delay is a duration in <strong>seconds</strong> (e.g <code>2.5</code> for 2.5 seconds).</p>
|
||
</blockquote>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.wait_delay.c_url" href="#html.wait_delay.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/html <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@index.html <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">waitDelay</span><span class="o">=</span><span class="m">5</span>.5 <span class="se">\
|
||
</span><span class="se"></span> -o result.pdf
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.wait_delay.go" href="#html.wait_delay.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewHTMLRequest</span><span class="p">(</span><span class="s">"index.html"</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">WaitDelay</span><span class="p">(</span><span class="mf">5.5</span><span class="p">)</span>
|
||
<span class="nx">dest</span> <span class="o">:=</span> <span class="s">"result.pdf"</span>
|
||
<span class="nx">c</span><span class="p">.</span><span class="nf">Store</span><span class="p">(</span><span class="nx">req</span><span class="p">,</span> <span class="nx">dest</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="html.wait_delay.php" href="#html.wait_delay.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\HTMLRequest;
|
||
use TheCodingMachine\Gotenberg\Request;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$index = DocumentFactory::makeFromPath('index.html', 'index.html');
|
||
$request = new HTMLRequest($index);
|
||
$request->setWaitDelay(5.5);
|
||
$dest = "result.pdf";
|
||
$client->store($request, $dest);
|
||
</pre>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="url">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="url" href="#url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>URL</h1>
|
||
<p>Gotenberg provides the endpoint <code>/convert/url</code> for remote URL conversions.</p>
|
||
|
||
<p>It accepts <code>POST</code> requests with a <code>multipart/form-data</code> Content-Type.</p>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="url.basic" href="#url.basic">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Basic</h2>
|
||
|
||
<p>This endpoint does not accept an <code>index.html</code> file nor assets files but a form field
|
||
named <code>remoteURL</code> instead. Otherwise, URL conversions work the same as HTML conversions.</p>
|
||
|
||
<blockquote>
|
||
<p><strong>Attention:</strong> when converting a website to PDF, you should remove all margins.
|
||
If not, some of the content of the page might be hidden.</p>
|
||
</blockquote>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="url.basic.c_url" href="#url.basic.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/url <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">remoteURL</span><span class="o">=</span>https://google.com <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">marginTop</span><span class="o">=</span><span class="m">0</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">marginBottom</span><span class="o">=</span><span class="m">0</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">marginLeft</span><span class="o">=</span><span class="m">0</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">marginRight</span><span class="o">=</span><span class="m">0</span> <span class="se">\
|
||
</span><span class="se"></span> -o result.pdf
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="url.basic.go" href="#url.basic.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewURLRequest</span><span class="p">(</span><span class="s">"https://google.com"</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">Margins</span><span class="p">(</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">NoMargins</span><span class="p">)</span>
|
||
<span class="nx">dest</span> <span class="o">:=</span> <span class="s">"result.pdf"</span>
|
||
<span class="nx">c</span><span class="p">.</span><span class="nf">Store</span><span class="p">(</span><span class="nx">req</span><span class="p">,</span> <span class="nx">dest</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="url.basic.php" href="#url.basic.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\URLRequest;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$request = new URLRequest('https://google.com');
|
||
$request->setMargins(Request::NO_MARGINS);
|
||
$dest = "result.pdf";
|
||
$client->store($request, $dest);
|
||
</pre>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="markdown">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="markdown" href="#markdown">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Markdown</h1>
|
||
<p>Gotenberg provides the endpoint <code>/convert/markdown</code> for Markdown conversions.</p>
|
||
|
||
<p>It accepts <code>POST</code> requests with a <code>multipart/form-data</code> Content-Type.</p>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="markdown.basic" href="#markdown.basic">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Basic</h2>
|
||
|
||
<p>Markdown conversions work the same as HTML conversions.</p>
|
||
|
||
<p>Only difference is that you have access to the Go template function <code>toHTML</code>
|
||
in the file <code>index.html</code>. This function will convert a given markdown file to HTML.</p>
|
||
|
||
<p>For instance:</p>
|
||
|
||
<pre class="chroma"><span class="cp"><!doctype html></span>
|
||
<span class="p"><</span><span class="nt">html</span> <span class="na">lang</span><span class="o">=</span><span class="s">"en"</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">head</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">meta</span> <span class="na">charset</span><span class="o">=</span><span class="s">"utf-8"</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">title</span><span class="p">></span>My PDF<span class="p"></</span><span class="nt">title</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">head</span><span class="p">></span>
|
||
<span class="p"><</span><span class="nt">body</span><span class="p">></span>
|
||
{{ toHTML .DirPath "file.md" }}
|
||
<span class="p"></</span><span class="nt">body</span><span class="p">></span>
|
||
<span class="p"></</span><span class="nt">html</span><span class="p">></span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="markdown.basic.c_url" href="#markdown.basic.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/markdown <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@index.html <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@file.md <span class="se">\
|
||
</span><span class="se"></span> -o result.pdf
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="markdown.basic.go" href="#markdown.basic.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewMarkdownRequest</span><span class="p">(</span><span class="s">"index.html"</span><span class="p">,</span> <span class="s">"file.md"</span><span class="p">)</span>
|
||
<span class="nx">dest</span> <span class="o">:=</span> <span class="s">"result.pdf"</span>
|
||
<span class="nx">c</span><span class="p">.</span><span class="nf">Store</span><span class="p">(</span><span class="nx">req</span><span class="p">,</span> <span class="nx">dest</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="markdown.basic.php" href="#markdown.basic.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\MarkdownRequest;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$index = DocumentFactory::makeFromPath('index.html', 'index.html');
|
||
$markdowns = [
|
||
DocumentFactory::makeFromPath('file.md', 'file.md'),
|
||
];
|
||
$request = new MarkdownRequest($index, $markdowns);
|
||
$dest = "result.pdf";
|
||
$client->store($request, $dest);
|
||
</pre>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="office">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="office" href="#office">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Office</h1>
|
||
<p>Gotenberg provides the endpoint <code>/convert/office</code> for Office document conversions.</p>
|
||
|
||
<p>It accepts <code>POST</code> requests with a <code>multipart/form-data</code> Content-Type.</p>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="office.basic" href="#office.basic">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Basic</h2>
|
||
|
||
<p>You may send one or more Office documents. Following file extensions are accepted:</p>
|
||
|
||
<ul>
|
||
<li><code>.txt</code></li>
|
||
<li><code>.rtf</code></li>
|
||
<li><code>.fodt</code></li>
|
||
<li><code>.doc</code></li>
|
||
<li><code>.docx</code></li>
|
||
<li><code>.odt</code></li>
|
||
<li><code>.xls</code></li>
|
||
<li><code>.xlsx</code></li>
|
||
<li><code>.ods</code></li>
|
||
<li><code>.ppt</code></li>
|
||
<li><code>.pptx</code></li>
|
||
<li><code>.odp</code></li>
|
||
</ul>
|
||
|
||
<p>All files will be merged into a single resulting PDF.</p>
|
||
|
||
<blockquote>
|
||
<p><strong>Attention:</strong> currently, <code>unoconv</code> cannot perform concurrent conversions.
|
||
That’s why for Office conversions, the API does only one conversion at a time.
|
||
See the <a href="#scalability">scalability section</a> to find how to mitigate this issue.</p>
|
||
</blockquote>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="office.basic.c_url" href="#office.basic.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/office <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@document.docx <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@document2.docx <span class="se">\
|
||
</span><span class="se"></span> -o result.pdf
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="office.basic.go" href="#office.basic.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewOfficeRequest</span><span class="p">(</span><span class="s">"document.docx"</span><span class="p">,</span> <span class="s">"document2.docx"</span><span class="p">)</span>
|
||
<span class="nx">dest</span> <span class="o">:=</span> <span class="s">"result.pdf"</span>
|
||
<span class="nx">c</span><span class="p">.</span><span class="nf">Store</span><span class="p">(</span><span class="nx">req</span><span class="p">,</span> <span class="nx">dest</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="office.basic.php" href="#office.basic.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\OfficeRequest;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$files = [
|
||
DocumentFactory::makeFromPath('document.docx', 'document.docx'),
|
||
DocumentFactory::makeFromPath('document2.docx', 'document2.docx'),
|
||
];
|
||
$request = new OfficeRequest($files);
|
||
$dest = "result.pdf";
|
||
$client->store($request, $dest);
|
||
</pre>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="office.orientation" href="#office.orientation">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Orientation</h2>
|
||
|
||
<p>You may also customize the resulting PDF format.</p>
|
||
|
||
<p>By default, it will be rendered with <code>portrait</code> orientation.</p>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="office.orientation.c_url" href="#office.orientation.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/office <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@document.docx <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">landscape</span><span class="o">=</span><span class="nb">true</span> <span class="se">\
|
||
</span><span class="se"></span> -o result.pdf
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="office.orientation.go" href="#office.orientation.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewOfficeRequest</span><span class="p">(</span><span class="s">"document.docx"</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">Landscape</span><span class="p">(</span><span class="kc">true</span><span class="p">)</span>
|
||
<span class="nx">dest</span> <span class="o">:=</span> <span class="s">"result.pdf"</span>
|
||
<span class="nx">c</span><span class="p">.</span><span class="nf">Store</span><span class="p">(</span><span class="nx">req</span><span class="p">,</span> <span class="nx">dest</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="office.orientation.php" href="#office.orientation.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\OfficeRequest;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$files = [
|
||
DocumentFactory::makeFromPath('document.docx', 'document.docx'),
|
||
];
|
||
$request = new OfficeRequest($files);
|
||
$request->setLandscape(true);
|
||
$dest = "result.pdf";
|
||
$client->store($request, $dest);
|
||
</pre>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="merge">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="merge" href="#merge">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Merge</h1>
|
||
<p>Gotenberg provides the endpoint <code>/convert/merge</code> for merging PDFs.</p>
|
||
|
||
<p>It accepts <code>POST</code> requests with a <code>multipart/form-data</code> Content-Type.</p>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="merge.basic" href="#merge.basic">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Basic</h2>
|
||
|
||
<p>Nothing fancy here: you may send one or more PDF files and the API
|
||
will merge them and return the resulting PDF file.</p>
|
||
|
||
<blockquote>
|
||
<p><strong>Attention:</strong> Gotenberg merges the PDF files alphabetically.</p>
|
||
</blockquote>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="merge.basic.c_url" href="#merge.basic.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/merge <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@file.pdf <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@file2.pdf <span class="se">\
|
||
</span><span class="se"></span> -o result.pdf
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="merge.basic.go" href="#merge.basic.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewMergeRequest</span><span class="p">(</span><span class="s">"file.pdf"</span><span class="p">,</span> <span class="s">"file2.pdf"</span><span class="p">)</span>
|
||
<span class="nx">dest</span> <span class="o">:=</span> <span class="s">"result.pdf"</span>
|
||
<span class="nx">c</span><span class="p">.</span><span class="nf">Store</span><span class="p">(</span><span class="nx">req</span><span class="p">,</span> <span class="nx">dest</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="merge.basic.php" href="#merge.basic.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\MergeRequest;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$files = [
|
||
DocumentFactory::makeFromPath('file.pdf', 'file.pdf'),
|
||
DocumentFactory::makeFromPath('file2.pdf', 'file2.pdf'),
|
||
];
|
||
$request = new MergeRequest($files);
|
||
$dest = "result.pdf";
|
||
$client->store($request, $dest);
|
||
</pre>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="timeout">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="timeout" href="#timeout">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Timeout</h1>
|
||
<p>All endpoints accept a form field named <code>waitTimeout</code>.</p>
|
||
|
||
<p>The API will wait the given <strong>seconds</strong> before it considers the conversion to be unsucessful.</p>
|
||
|
||
<p>It takes a float as value (e.g <code>2.5</code> for 2.5 seconds).</p>
|
||
|
||
<blockquote>
|
||
<p>You may also define this value globally: see the <a href="#environment_variables.default_wait_timeout">environment variables</a> section.</p>
|
||
</blockquote>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="timeout.examples" href="#timeout.examples">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Examples</h2>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="timeout.examples.c_url" href="#timeout.examples.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/html <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@index.html <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">waitTimeout</span><span class="o">=</span><span class="m">2</span>.5
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="timeout.examples.go" href="#timeout.examples.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewHTMLRequest</span><span class="p">(</span><span class="s">"index.html"</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">WaitTimeout</span><span class="p">(</span><span class="mf">2.5</span><span class="p">)</span>
|
||
<span class="nx">resp</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">c</span><span class="p">.</span><span class="nf">Post</span><span class="p">(</span><span class="nx">req</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="timeout.examples.php" href="#timeout.examples.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\HTMLRequest;
|
||
use TheCodingMachine\Gotenberg\Request;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$index = DocumentFactory::makeFromPath('index.html', 'index.html');
|
||
$request = new HTMLRequest($index);
|
||
$request->setWaitTimeout(2.5);
|
||
$dest = "result.pdf";
|
||
$client->store($request, $dest);
|
||
</pre>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="webhook">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="webhook" href="#webhook">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Webhook</h1>
|
||
<p>All endpoints accept a form field named <code>webhookURL</code>.</p>
|
||
|
||
<p>If provided, the API will send the resulting PDF file in a <code>POST</code> request with the <code>application/pdf</code> Content-Type
|
||
to given URL.</p>
|
||
|
||
<p>By doing so, your requests to the API will be over before the conversions are actually done!</p>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="webhook.examples" href="#webhook.examples">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Examples</h2>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="webhook.examples.c_url" href="#webhook.examples.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/html <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@index.html <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">webhookURL</span><span class="o">=</span><span class="s1">'http://myapp.com/webhook/'</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="webhook.examples.go" href="#webhook.examples.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewHTMLRequest</span><span class="p">(</span><span class="s">"index.html"</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">WebhookURL</span><span class="p">(</span><span class="s">"http://myapp.com/webhook/"</span><span class="p">)</span>
|
||
<span class="nx">resp</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">c</span><span class="p">.</span><span class="nf">Post</span><span class="p">(</span><span class="nx">req</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="webhook.examples.php" href="#webhook.examples.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\HTMLRequest;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$index = DocumentFactory::makeFromPath('index.html', 'index.html');
|
||
$request = new HTMLRequest($index);
|
||
$request->setWebhookURL('http://myapp.com/webhook/');
|
||
$resp = $client->post($request);
|
||
</pre>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="result_filename">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="result_filename" href="#result_filename">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Result filename</h1>
|
||
<p>All endpoints accept a form field named <code>resultFilename</code>.</p>
|
||
|
||
<p>If provided, the API will return the resulting PDF file with the given filename.
|
||
Otherwise a random filename is used.</p>
|
||
|
||
<blockquote>
|
||
<p><strong>Attention:</strong> this feature does not work if the form field <code>webhookURL</code> is given.</p>
|
||
</blockquote>
|
||
|
||
<h2 class="Heading"><a class="Anchor" aria-hidden="true" id="result_filename.examples" href="#result_filename.examples">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Examples</h2>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="result_filename.examples.c_url" href="#result_filename.examples.c_url">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>cURL</h3>
|
||
|
||
<pre class="chroma">$ curl --request POST <span class="se">\
|
||
</span><span class="se"></span> --url http://localhost:3000/convert/html <span class="se">\
|
||
</span><span class="se"></span> --header <span class="s1">'Content-Type: multipart/form-data'</span> <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">files</span><span class="o">=</span>@index.html <span class="se">\
|
||
</span><span class="se"></span> --form <span class="nv">resultFilename</span><span class="o">=</span><span class="s1">'foo.pdf'</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="result_filename.examples.go" href="#result_filename.examples.go">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Go</h3>
|
||
|
||
<pre class="chroma"><span class="kn">import</span> <span class="s">"github.com/thecodingmachine/gotenberg-go-client/v5"</span>
|
||
|
||
<span class="kd">func</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
|
||
<span class="nx">c</span> <span class="o">:=</span> <span class="o">&</span><span class="nx">gotenberg</span><span class="p">.</span><span class="nx">Client</span><span class="p">{</span><span class="nx">Hostname</span><span class="p">:</span> <span class="s">"http://localhost:3000"</span><span class="p">}</span>
|
||
<span class="nx">req</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">gotenberg</span><span class="p">.</span><span class="nf">NewHTMLRequest</span><span class="p">(</span><span class="s">"index.html"</span><span class="p">)</span>
|
||
<span class="nx">req</span><span class="p">.</span><span class="nf">ResultFilename</span><span class="p">(</span><span class="s">"foo.pdf"</span><span class="p">)</span>
|
||
<span class="nx">resp</span><span class="p">,</span> <span class="nx">_</span> <span class="o">:=</span> <span class="nx">c</span><span class="p">.</span><span class="nf">Post</span><span class="p">(</span><span class="nx">req</span><span class="p">)</span>
|
||
<span class="p">}</span>
|
||
</pre>
|
||
|
||
<h3 class="Heading"><a class="Anchor" aria-hidden="true" id="result_filename.examples.php" href="#result_filename.examples.php">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>PHP</h3>
|
||
|
||
<pre class="chroma">use TheCodingMachine\Gotenberg\Client;
|
||
use TheCodingMachine\Gotenberg\DocumentFactory;
|
||
use TheCodingMachine\Gotenberg\HTMLRequest;
|
||
use TheCodingMachine\Gotenberg\Request;
|
||
|
||
$client = new Client('http://localhost:3000', new \Http\Adapter\Guzzle6\Client());
|
||
$index = DocumentFactory::makeFromPath('index.html', 'index.html');
|
||
$request = new HTMLRequest($index);
|
||
$request->setResultFilename('foo.pdf');
|
||
$resp = $client->post($request);
|
||
</pre>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="scalability">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="scalability" href="#scalability">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Scalability</h1>
|
||
<p>The API being stateless, you may scale it as much as you want.</p>
|
||
|
||
<p>For instance, using the following Docker Compose file:</p>
|
||
|
||
<pre class="chroma">version<span class="p">:</span><span class="w"> </span><span class="s1">'3'</span><span class="w">
|
||
</span><span class="w">
|
||
</span><span class="w"></span>services<span class="p">:</span><span class="w">
|
||
</span><span class="w">
|
||
</span><span class="w"> </span><span class="c"># your others services</span><span class="w">
|
||
</span><span class="w">
|
||
</span><span class="w"> </span>gotenberg<span class="p">:</span><span class="w">
|
||
</span><span class="w"> </span>image<span class="p">:</span><span class="w"> </span>thecodingmachine/gotenberg<span class="p">:</span><span class="m">5</span><span class="w">
|
||
</span></pre>
|
||
|
||
<p>You may now launch your services using:</p>
|
||
|
||
<pre class="chroma">$ docker-compose up --scale <span class="nv">gotenberg</span><span class="o">=</span>your_number_of_instances
|
||
</pre>
|
||
|
||
<p>When requesting the Gotenberg service with your client(s), Docker will automatically
|
||
redirect a request to a Gotenberg container according to the round-robin strategy.</p>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="ping">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="ping" href="#ping">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Ping</h1>
|
||
<p>Gotenberg provides the endpoint <code>/ping</code> for checking the API availability with
|
||
a simple <code>GET</code> request.</p>
|
||
|
||
<p>This feature is especially useful for liveness/readiness probes in Kubernetes:</p>
|
||
|
||
<ul>
|
||
<li><a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes">Pod lifecycle</a></li>
|
||
<li><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/">Configure Liveness and Readiness Probes</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="fonts">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="fonts" href="#fonts">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Fonts</h1>
|
||
<p>By default, a handful of fonts are installed. Asian characters are also supported out of the box.</p>
|
||
|
||
<p>If you wish to use more fonts, you will have to create your own image:</p>
|
||
|
||
<pre class="chroma"><span class="k">FROM</span><span class="s"> thecodingmachine/gotenberg:5</span><span class="err">
|
||
</span><span class="err">
|
||
</span><span class="err"></span><span class="k">RUN</span> apt-get -y install yourfonts<span class="err">
|
||
</span></pre>
|
||
|
||
</div>
|
||
|
||
<div class="Page" id="links">
|
||
<h1 class="Heading"><a class="Anchor" aria-hidden="true" id="links" href="#links">
|
||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
|
||
</a>Links</h1>
|
||
<ul>
|
||
<li>Follow the progress on the <a href="https://github.com/thecodingmachine/gotenberg">GitHub repository</a></li>
|
||
<li>Follow <a href="https://twitter.com/gulnap">@gulnap</a> on Twitter</li>
|
||
</ul>
|
||
|
||
<p>Psst: TheCodingMachine is always looking for <a href="https://coders.thecodingmachine.com">talented coders</a>.</p>
|
||
|
||
</div>
|
||
|
||
<div class="Footer"></div>
|
||
<script src="theme/gotenberg/js/index.js"></script>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div></body></html> |