<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="atom.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://www.dynamicpdf.com/blog/</id>
    <title>DynamicPDF Blog</title>
    <updated>2026-05-18T00:00:00.000Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <link rel="alternate" href="https://www.dynamicpdf.com/blog/"/>
    <subtitle>DynamicPDF Blog</subtitle>
    <icon>https://www.dynamicpdf.com/blog/img/DynamicPDF.svg</icon>
    <entry>
        <title type="html"><![CDATA[Parallel Processing Using DynamicPDF HTML Converter]]></title>
        <id>https://www.dynamicpdf.com/blog/htmconverter-parallel-processing-example/</id>
        <link href="https://www.dynamicpdf.com/blog/htmconverter-parallel-processing-example/"/>
        <updated>2026-05-18T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Learn how to make your applications perform better by using parallel processing when using DynamicPDF HTML Converter for .NET to convert HTML to PDF.]]></summary>
        <content type="html"><![CDATA[<p>DynamicPDF HTML Converter for .NET often takes between 1 and 5 seconds to convert a single HTML document to PDF, depending on factors such as network download time, page complexity, and overall processing requirements. This is expected because the HTML Converter uses the Chromium rendering engine to fully process HTML documents before generating the PDF output.</p>
<p>When processing large numbers of HTML documents, total conversion time can quickly grow if documents are converted sequentially. For example, converting thousands of HTML files one at a time could easily require hours of processing time. In these scenarios, using parallel processing and batch execution can significantly improve overall throughput and reduce total conversion time.</p>
<p>.NET applications often need to process large workloads efficiently, especially when performing operations such as file conversion, rendering, or data processing. This is true when processing large groups of HTML documents to PDFs as well. One of the most effective ways to improve throughput is through parallel processing. Instead of converting documents one at a time in a strictly sequential workflow, .NET allows multiple operations to execute concurrently using the <a href="https://learn.microsoft.com/en-us/dotnet/standard/parallel-programming/task-parallel-library-tpl" target="_blank" rel="noopener noreferrer" class="">Task Parallel Library (TPL)</a> and asynchronous programming features such as <code>async</code> and <code>await</code>.</p>
<p>In the following example, each HTML-to-PDF conversion is started as a separate task by calling <code>Task.Run</code> together with <code>Converter.ConvertAsync</code>. This allows several conversions to run at the same time rather than waiting for one conversion to finish before starting the next. Because HTML conversion can involve browser rendering, resource loading, JavaScript execution, and PDF generation, this example illustrates how running conversions in parallel can significantly reduce the total processing time when handling many documents.</p>
<p>The code also demonstrates using batching with scalable parallel processing. Rather than starting every conversion simultaneously, the workload is divided into smaller groups called batches. Each batch is processed independently, and the application waits for all tasks in the current batch to finish. Once the batch completes, the next batch begins processing.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Batching helps control resource usage. Even though .NET can manage many concurrent tasks, starting too many conversions at once can place unnecessary pressure on CPU resources, memory usage, temporary file storage, and Chromium rendering processes used internally by the HTML Converter. By limiting the number of active conversions at a given time, batching creates a more balanced and predictable processing workflow.</p></div></div>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="example-code">Example Code<a href="https://www.dynamicpdf.com/blog/htmconverter-parallel-processing-example/#example-code" class="hash-link" aria-label="Direct link to Example Code" title="Direct link to Example Code" translate="no">​</a></h2>
<p>The example first gets the paths to the HTML documents to process and adds them to a collection. It then divides the collection into batches and processes each batch individually. For all HTML documents in the current batch, the example starts asynchronous conversions in parallel using separate tasks. After all conversions in the batch complete processing, the example moves to the next batch and repeats the process until all documents have been converted.</p>
<p>As each batch completes, the example calls <code>Converter.ReleaseResources()</code> to ensure converter resources are properly released before processing the next batch. This helps manage resource usage more efficiently when processing large numbers of HTML documents.</p>
<div class="theme-admonition theme-admonition-warning admonition_IZjC alert alert--warning"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>warning</div><div class="admonitionContent_bl22"><p>Calling <code>Converter.ReleaseResources()</code> too frequently can significantly increase overall processing time because the HTML Converter must reinitialize its internal Chromium-based processing resources before continuing with additional conversions. For better performance, resources should typically be released only after a batch of conversions has completed rather than after every individual document.</p></div></div>
<div class="theme-tabs-container tabs-container tabList_M0Dn"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_ysIP tabs__item--active">C# (.NET)</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_ysIP">VB.NET</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_OMyP"><div class="language-csharp codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-csharp codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">using ceTe.DynamicPDF.HtmlConverter;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">using System;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">using System.Collections.Generic;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">using System.IO;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">using System.Threading.Tasks;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">namespace html_converter_dotnet_core_cs</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">{</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    internal class ConverterParallelExample</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">       public static async Task Run() {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           // Get the output folder and input HTML resource folder.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           string outputPath = Util.GetPath("Output");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           string inputFolder = Util.GetPath("Resources/html");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           // Get all files from the input folder.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           string[] files = Directory.GetFiles(inputFolder);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           // Create the list of documents to convert.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           List&lt;string&gt; testDocuments = new List&lt;string&gt;();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           // Add each file multiple times to simulate a larger workload.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           foreach (string file in files)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">               testDocuments.Add(file);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">               testDocuments.Add(file);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">               testDocuments.Add(file);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           // Add one extra document to demonstrate remainder batching.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           testDocuments.Add(Util.GetPath("Resources/html/10.html"));</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           Console.WriteLine("====================================");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine("Total documents: " + testDocuments.Count);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            // Divide the workload into three full-sized batches.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            // Any remaining files are processed in a final smaller batch.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            int batchDivisions = 3;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            int batchSize = testDocuments.Count / batchDivisions;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            if (batchSize == 0)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                batchSize = 1;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            int batchNumber = 1;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            // Process each batch.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            for (int batchStart = 0; batchStart &lt; </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                 testDocuments.Count; batchStart += batchSize)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                int batchEnd = batchStart + batchSize;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                if (batchEnd &gt; testDocuments.Count)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                    batchEnd = testDocuments.Count;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                int currentBatchCount = batchEnd - batchStart;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Console.WriteLine();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Console.WriteLine("========");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Console.WriteLine("Starting Batch " + batchNumber);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Console.WriteLine("Docs In Batch: " + currentBatchCount);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Console.WriteLine("========");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                // Store the conversion tasks for the current batch.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                List&lt;Task&gt; tasks = new List&lt;Task&gt;();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                // Start one conversion task for each document in the batch.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                for (int i = batchStart; i &lt; batchEnd; i++)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                    // Capture local copies for use inside the task.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                    int documentNumber = i;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                    string documentPath = testDocuments[i];</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                    tasks.Add(Task.Run(async () =&gt;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                    {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                        try</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                        {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            // Create a URI from the document path.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            Uri inputPath = new Uri(documentPath);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            // Create a unique output file name.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            string outputFile = Path.Combine(</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                outputPath,</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                "output-" + documentNumber + ".pdf");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            Console.WriteLine("Converting " + documentNumber);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            // Convert the HTML document to PDF.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            await Converter.ConvertAsync(inputPath, outputFile);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            Console.WriteLine("Finished " + documentNumber);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                        }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                        catch (Exception ex)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                        {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            // Continue processing even if one document fails.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            Console.WriteLine("Error converting " + documentNumber);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            Console.WriteLine(ex.Message);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                        }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                    }));</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                // Wait until all conversions in the current batch are complete.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                await Task.WhenAll(tasks);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                // Release converter resources only after the whole batch has finished.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Converter.ReleaseResources();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Console.WriteLine();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Console.WriteLine("========");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Console.WriteLine("Completed Batch " + batchNumber);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Console.WriteLine("========");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                batchNumber++;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine("All batches completed.");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">}</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/DynamicPDF/html-converter-dotnet-core/blob/master/html-converter-dotnet-core-cs/ConvertParallelExample.cs">ConvertParallelExample.cs</a></b><div style="display:block;margin-top:0.5rem"></div></span></div><div role="tabpanel" class="tabItem_OMyP" hidden=""><div class="language-visual-basic codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-visual-basic codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">Imports ceTe.DynamicPDF.HtmlConverter</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">Imports System.IO</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">Friend Class ConverterParallelExample</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    Public Shared Async Function Run() As Task</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        ' Get the output folder and input HTML resource folder.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Dim outputPath As String = Util.GetPath("Output")</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Dim inputFolder As String = Util.GetPath("Resources/html")</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        ' Get all files from the input folder.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Dim files As String() = Directory.GetFiles(inputFolder)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        ' Create the list of documents to convert.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Dim testDocuments As New List(Of String)()</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        ' Add each file multiple times to simulate a larger workload.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        For Each file As String In files</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            testDocuments.Add(file)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            testDocuments.Add(file)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            testDocuments.Add(file)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Next</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        ' Add one extra document to demonstrate remainder batching.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        testDocuments.Add(Util.GetPath("Resources/html/10.html"))</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Console.WriteLine("=======================================")</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Console.WriteLine("Total documents: " &amp; testDocuments.Count)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        ' Divide the workload into three full-sized batches.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        ' Any remaining files are processed in a final smaller batch.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Dim batchDivisions As Integer = 3</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Dim batchSize As Integer = testDocuments.Count \ batchDivisions</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        If batchSize = 0 Then</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            batchSize = 1</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        End If</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Dim batchNumber As Integer = 1</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        ' Process each batch.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        For batchStart As Integer = 0 To testDocuments.Count - 1 Step batchSize</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Dim batchEnd As Integer = batchStart + batchSize</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            If batchEnd &gt; testDocuments.Count Then</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                batchEnd = testDocuments.Count</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            End If</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Dim currentBatchCount As Integer = batchEnd - batchStart</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine()</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine("=======================================")</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine("Starting Batch " &amp; batchNumber)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine("Documents In Batch: " &amp; currentBatchCount)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine("=======================================")</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            ' Store the conversion tasks for the current batch.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Dim tasks As New List(Of Task)()</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            ' Start one conversion task for each document in the batch.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            For i As Integer = batchStart To batchEnd - 1</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                ' Capture local copies for use inside the task.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Dim documentNumber As Integer = i</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                Dim documentPath As String = testDocuments(i)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                tasks.Add(Task.Run(</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                        Async Function()</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            Try</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                ' Create a URI from the document path.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                Dim inputPath As New Uri(documentPath)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                ' Create a unique output file name.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                Dim outputFile As String = Path.Combine(</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                    outputPath,</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                    "output-" &amp; documentNumber &amp; ".pdf")</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                Console.WriteLine("Converting " &amp; documentNumber)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                ' Convert the HTML document to PDF.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                Await Converter.ConvertAsync(inputPath, outputFile)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                Console.WriteLine("Finished " &amp; documentNumber)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            Catch ex As Exception</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                ' Continue processing even if one document fails.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                Console.WriteLine("Error converting document " &amp; documentNumber)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                                Console.WriteLine(ex.Message)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                            End Try</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">                        End Function))</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Next</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            ' Wait until all conversions in the current batch are complete.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Await Task.WhenAll(tasks)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            ' Release converter resources only after the whole batch has finished.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Converter.ReleaseResources()</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine()</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine("=======================================")</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine("Completed Batch " &amp; batchNumber)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            Console.WriteLine("=======================================")</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            batchNumber += 1</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Next</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Console.WriteLine()</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        Console.WriteLine("All batches completed.")</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    End Function</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">End Class</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/DynamicPDF/html-converter-dotnet-core/blob/master/html-converter-dotnet-core-vb/ConvertParallelExample.vb">ConvertParallelExample.vb</a></b><div style="display:block;margin-top:0.5rem"></div></span></div></div></div>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="summary">Summary<a href="https://www.dynamicpdf.com/blog/htmconverter-parallel-processing-example/#summary" class="hash-link" aria-label="Direct link to Summary" title="Direct link to Summary" translate="no">​</a></h2>
<p>By combining asynchronous programming, parallel processing, and batching, you can significantly improve efficiency when performing large scale HTML-to-PDF conversion using DynamicPDF HTML Converter for .NET.  Rather than processing documents sequentially, the Task Parallel Library (TPL) and asynchronous conversion methods allow multiple HTML documents to be converted concurrently while still maintaining controlled resource usage through batching.</p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="DynamicPDF HtmlConverter" term="DynamicPDF HtmlConverter"/>
        <category label="HTML" term="HTML"/>
        <category label="PDF" term="PDF"/>
        <category label=".NET" term=".NET"/>
        <category label="C#" term="C#"/>
        <category label="VB.NET" term="VB.NET"/>
        <category label="parallel processing" term="parallel processing"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Using Special Characters in Designer]]></title>
        <id>https://www.dynamicpdf.com/blog/using-special-characters/</id>
        <link href="https://www.dynamicpdf.com/blog/using-special-characters/"/>
        <updated>2026-05-07T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[DynamicPDF API special characters, how to install and use them.]]></summary>
        <content type="html"><![CDATA[<p>Using a special character that is not supported by the APIâ€™s built-in fonts requires installing a font that includes that character. In this post, you will learn how to use the â–¡ (U+25A1, WHITE SQUARE) in Designer and ensure it renders correctly in your generated PDFs.</p>
<p>The character â–¡ (U+25A1, WHITE SQUARE) is part of the Unicode <em>Geometric Shapes</em> block, and most standard Windows fonts already support it, for example, the following fonts - commonly found on Windows systems -  support the character.</p>
<ul>
<li class="">Segoe UI (default UI font â€” safest choice)</li>
<li class="">Arial</li>
<li class="">Calibri</li>
<li class="">Times New Roman</li>
<li class="">Consolas</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="example">Example<a href="https://www.dynamicpdf.com/blog/using-special-characters/#example" class="hash-link" aria-label="Direct link to Example" title="Direct link to Example" translate="no">​</a></h2>
<p>Let's use the Arial font to display the  â–¡ (U+25A1, WHITE SQUARE)  character in a report using the <a href="https://dpdf.io/docs/usersguide/designer/layoutelements/label" target="_blank" rel="noopener noreferrer" class=""><strong>Label</strong></a> control and the <strong><a href="https://dpdf.io/docs/usersguide/designer/layoutelements/symbol" target="_blank" rel="noopener noreferrer" class="">Symbol</a></strong> control.</p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="installing-font-and-sample-project">Installing Font and Sample Project<a href="https://www.dynamicpdf.com/blog/using-special-characters/#installing-font-and-sample-project" class="hash-link" aria-label="Direct link to Installing Font and Sample Project" title="Direct link to Installing Font and Sample Project" translate="no">​</a></h3>
<p>Because the API does not include Arial by default, install it through your DynamicPDF API <strong>Dashboard</strong> before using it in Designer.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Refer to <a href="https://dpdf.io/docs/usersguide/environment-manager/environment-manager-fonts" target="_blank" rel="noopener noreferrer" class="">Global Fonts</a> documentation for more information on installing fonts.</p></div></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig1-0600dab7a23ee86621d67d6e96ffdecd.png" width="1886" height="1032" class="img__Ss2"></p>
<p>After installing the font, ensure that the <strong>Getting Started</strong> sample project is available in your <strong>Samples</strong> folder.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Follow the <a href="https://dpdf.io/docs/tutorials/getting-started/getting-started-designer/getting-started-designer" target="_blank" rel="noopener noreferrer" class="">Designer Quick Tour</a> tutorial to create the sample project, or install it directly using the instructions provided in that tutorial.</p></div></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig2-6e8c48b7e1ddbefa14c8c4913d46b8c6.png" width="1360" height="783" class="img__Ss2"></p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="using-the-character-in-a-label">Using the Character in a Label<a href="https://www.dynamicpdf.com/blog/using-special-characters/#using-the-character-in-a-label" class="hash-link" aria-label="Direct link to Using the Character in a Label" title="Direct link to Using the Character in a Label" translate="no">​</a></h3>
<p>Open <strong>getting-started.dlex</strong> in Designer and add a <strong>Label</strong> control.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig5a-699832a96c7810c875807335a309c7e0.png" width="635" height="562" class="img__Ss2"></p>
<p>Set the font size to 42 and change the font to Arial using the <strong>Font Selector.</strong></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig4-eddc6b462099ab82f916baf0801d1f72.png" width="450" height="495" class="img__Ss2"></p>
<p>Next, open <strong>Character Map</strong> in Windows and locate the â–¡ character. Select Arial as the <strong>Font</strong> (1), enable <strong>Advanced View</strong> (2), set the <strong>Character set</strong> to <strong>Unicode</strong> (3), and set <strong>Group by</strong> to <strong>Unicode subrange</strong> (4), and navigate to <strong>Block Elements &amp; Geometric Shapes</strong> (5).</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Of course, the <strong>Character Map</strong> is only one way to find a special character, you can also find them online or using other tools. For example, the <a href="https://www.alt-codes.net/square-symbols" target="_blank" rel="noopener noreferrer" class="">Alt-Codes website</a> lists Square Symbols that you could use.</p></div></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig3-c7eff4921f9307a8062591a1873ef9b1.png" width="1001" height="765" class="img__Ss2"></p>
<p>Select the character(6 and 7) and copy it to your clipboard.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig6-fe484bcf12e0b913e5f27e06a1025bf6.png" width="477" height="579" class="img__Ss2"></p>
<p>Paste the character into the <strong>Label</strong> controlâ€™s <strong>Text</strong> property and the <strong>Label</strong> should have the following properties.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig7-0743bf13374aa5ed038f590485ba74db.png" width="1469" height="447" class="img__Ss2"></p>
<p>When you preview the report using <strong>Run Report</strong>, the character renders correctly in the generated PDF.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig8-bf04772c71423ba9ddac925e9688e4df.png" width="2130" height="1119" class="img__Ss2"></p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="using-the-character-in-a-symbol">Using the Character in a Symbol<a href="https://www.dynamicpdf.com/blog/using-special-characters/#using-the-character-in-a-symbol" class="hash-link" aria-label="Direct link to Using the Character in a Symbol" title="Direct link to Using the Character in a Symbol" translate="no">​</a></h3>
<p>You can also use special characters in the <strong>Symbol</strong> control. Add the <strong>Symbol</strong> control and change the <strong>symbolType</strong> to <strong>custom</strong>. Choose Arial as the <strong>customFont</strong>, and paste the â–¡ character into the <strong>customCharacter</strong> property.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig10-1f484fd46a96fac025bc78df6ccf0202.png" width="1293" height="496" class="img__Ss2"></p>
<p>Preview the report using <strong>Run Report</strong> to confirm the symbol displays correctly.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig11-e6e7079f5c4c6dad8ffb4502f585b1d9.png" width="2130" height="1119" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="summary">Summary<a href="https://www.dynamicpdf.com/blog/using-special-characters/#summary" class="hash-link" aria-label="Direct link to Summary" title="Direct link to Summary" translate="no">​</a></h2>
<p>When working with special Unicode characters, ensure that the selected font supports the character. Once the font is installed and applied in Designer, all controls in Designer can render the character correctly.</p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="DynamicPDF API Designer" term="DynamicPDF API Designer"/>
        <category label="DynamicPDF API" term="DynamicPDF API"/>
        <category label="DynamicPDF" term="DynamicPDF"/>
        <category label="Label" term="Label"/>
        <category label="Symbol" term="Symbol"/>
        <category label="fonts" term="fonts"/>
        <category label="Arial" term="Arial"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[DynamicPDF API Now Integrates with Zapier, Make, and n8n]]></title>
        <id>https://www.dynamicpdf.com/blog/dynamicpdf-thirdparty-integrations/</id>
        <link href="https://www.dynamicpdf.com/blog/dynamicpdf-thirdparty-integrations/"/>
        <updated>2026-02-25T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[DynamicPDF API Now Integrates with Zapier, Make, and n8n]]></summary>
        <content type="html"><![CDATA[
<p>You can now connect DynamicPDF API to Zapier, Make, and n8n to integrate advanced PDF generation, processing, and data extraction directly into your applications without writing code.</p>
<p>We are excited to announce three powerful workflow integrations for the DynamicPDF API. You can now connect DynamicPDF API to Zapier, Make, and n8n to integrate advanced PDF generation, processing, and data extraction directly into your applications without writing code. These integrations make it easy to embed DynamicPDF capabilities into automated workflows, enabling seamless document creation and processing across your systems.</p>
<div class="cloud-api-image-left"><img src="https://www.dynamicpdf.com/blog/img/cloud-api/integrations/zapier-logo_black-smaller.png" alt=""><div><h2 class="anchor anchorTargetStickyNavbar_SAay" id="integration-with-zapier">Integration with Zapier<a href="https://www.dynamicpdf.com/blog/dynamicpdf-thirdparty-integrations/#integration-with-zapier" class="hash-link" aria-label="Direct link to Integration with Zapier" title="Direct link to Integration with Zapier" translate="no">​</a></h2></div></div>
<p>The DynamicPDF API Zapier app enables building Zaps that generate, merge, modify, secure, rasterize, and extract data from PDFs without writing code. The integration includes the following dedicated actions:</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/zapier-pdf-api-integration#dlex-layout-multi" target="_blank" rel="noopener noreferrer" class=""><strong>Generate PDF From Local DLEX Template (dlex-layout - local resources)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/zapier-pdf-api-integration#dlex-path" target="_blank" rel="noopener noreferrer" class=""><strong>Generate PDF From Remote DLEX Template (dlex-layout - DlexPath)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/zapier-pdf-api-integration#image-info" target="_blank" rel="noopener noreferrer" class=""><strong>Extract Image Metadata (image-info)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/zapier-pdf-api-integration#pdf-image" target="_blank" rel="noopener noreferrer" class=""><strong>Rasterize PDF Pages to Images (pdf-image)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/zapier-pdf-api-integration#pdf-info" target="_blank" rel="noopener noreferrer" class=""><strong>Extract PDF Metadata (pdf-info)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/zapier-pdf-api-integration#pdf-json" target="_blank" rel="noopener noreferrer" class=""><strong>Generate PDF From JSON Instructions (pdf - JSON)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/zapier-pdf-api-integration#pdf-multi" target="_blank" rel="noopener noreferrer" class=""><strong>Generate PDF From Instructions and Resources (pdf - multipart-form)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/zapier-pdf-api-integration#pdf-security" target="_blank" rel="noopener noreferrer" class=""><strong>Extract PDF Security Info (pdf-security-info)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/zapier-pdf-api-integration#pdf-text" target="_blank" rel="noopener noreferrer" class=""><strong>Extract PDF Text (pdf-text)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/zapier-pdf-api-integration#pdf-xmp" target="_blank" rel="noopener noreferrer" class=""><strong>Extract PDF Metadata (pdf-xmp)</strong></a></li>
</ul>
<p>For more information, refer to:</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/zapier-pdf-api-integration" target="_blank" rel="noopener noreferrer" class="">Integration with Zapier</a> documentation</li>
<li class=""><a href="https://dpdf.io/docs/tutorials/external-products/zapier/dynamicpdf-make-dynamicpdf-api-app-tutorial" target="_blank" rel="noopener noreferrer" class="">Using the DynamicPDF API Zapier App</a> tutorial</li>
<li class=""><a href="https://zapier.com/apps/dynamicpdf-api/integrations" target="_blank" rel="noopener noreferrer" class="">Put DynamicPDF API to work with AI and enterprise-grade automation</a> on Zapier</li>
</ul>
<div class="cloud-api-image-left"><img src="https://www.dynamicpdf.com/blog/img/cloud-api/integrations/make-logo-small.png" alt=""><div><h2 class="anchor anchorTargetStickyNavbar_SAay" id="integration-with-make">Integration with Make<a href="https://www.dynamicpdf.com/blog/dynamicpdf-thirdparty-integrations/#integration-with-make" class="hash-link" aria-label="Direct link to Integration with Make" title="Direct link to Integration with Make" translate="no">​</a></h2></div></div>
<p>The DynamicPDF API Make app brings the same core PDF generation and analysis capabilities into Makeâ€™s visual automation environment. Modules include:</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/make-pdf-api-integration#dlex-layout-multi" target="_blank" rel="noopener noreferrer" class=""><strong>dlex-layout (multipart-form)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/make-pdf-api-integration#dlex-path" target="_blank" rel="noopener noreferrer" class=""><strong>dlex-layout (DlexPath)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/make-pdf-api-integration#image-info" target="_blank" rel="noopener noreferrer" class=""><strong>image-info</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/make-pdf-api-integration#pdf-image" target="_blank" rel="noopener noreferrer" class=""><strong>pdf-image</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/make-pdf-api-integration#pdf-info" target="_blank" rel="noopener noreferrer" class=""><strong>pdf-info</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/make-pdf-api-integration#pdf-json" target="_blank" rel="noopener noreferrer" class=""><strong>pdf (json)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/make-pdf-api-integration#pdf-multi" target="_blank" rel="noopener noreferrer" class=""><strong>pdf (multipart-form)</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/make-pdf-api-integration#pdf-security" target="_blank" rel="noopener noreferrer" class=""><strong>pdf-security-info</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/make-pdf-api-integration#pdf-text" target="_blank" rel="noopener noreferrer" class=""><strong>pdf-text</strong></a></li>
<li class=""><a href="https://dpdf.io/docs/make-pdf-api-integration#pdf-xmp" target="_blank" rel="noopener noreferrer" class=""><strong>pdf-xmp</strong></a></li>
</ul>
<p>For more information, refer to:</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/make-pdf-api-integration" target="_blank" rel="noopener noreferrer" class="">Integration with Make</a> documentation</li>
<li class=""><a class="" href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/">Using the DynamicPDF API in Make Scenarios</a> blog post</li>
<li class=""><a href="https://dpdf.io/docs/tutorials/external-products/make/dynamicpdf-make-dynamicpdf-api-app-tutorial" target="_blank" rel="noopener noreferrer" class="">Using the DynamicPDF API Make App</a> tutorial</li>
<li class=""><a href="https://www.make.com/en/integrations/dynamicpdf-api" target="_blank" rel="noopener noreferrer" class="">Connect DynamicPDF API integrations</a> on make</li>
</ul>
<div class="cloud-api-image-left"><img src="https://www.dynamicpdf.com/blog/img/cloud-api/integrations/n8n-icon-small.png" alt=""><div><h2 class="anchor anchorTargetStickyNavbar_SAay" id="integration-with-n8n">Integration with n8n<a href="https://www.dynamicpdf.com/blog/dynamicpdf-thirdparty-integrations/#integration-with-n8n" class="hash-link" aria-label="Direct link to Integration with n8n" title="Direct link to Integration with n8n" translate="no">​</a></h2></div></div>
<p>For teams that prefer open source flexibility or self-hosted environments, the DynamicPDF API integrates seamlessly with n8n using the n8n HTTP Request node.</p>
<p>The n8n HTTP Request node supports all DynamicPDF API request types, including binary file uploads, JSON bodies, and multipart form data Integration. Endpoints such as <code>pdf-info</code>, <code>pdf-text</code>, <code>pdf-security-info</code>, <code>image-info</code>, <code>dlex-layout</code>, and <code>pdf</code> are easily called within a visual workflow. Responses may return PDF binaries, structured JSON metadata, or XML XMP data, which can then be routed to additional nodes for storage, processing, or integration</p>
<p>For more information refer to:</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/n8n-pdf-api-integration" target="_blank" rel="noopener noreferrer" class="">Integration with n8n</a> documentation</li>
<li class=""><a href="https://dpdf.io/docs/tutorials/external-products/n8n/dynamicpdf-n8n-automation-workflow-tutorial" target="_blank" rel="noopener noreferrer" class="">Using n8n Workflows with DynamicPDF API</a> tutorial</li>
<li class=""><a class="" href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/">Using the DynamicPDF API in n8n Workflows</a> blog post</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="bringing-document-automation-into-your-workflow">Bringing Document Automation into Your Workflow<a href="https://www.dynamicpdf.com/blog/dynamicpdf-thirdparty-integrations/#bringing-document-automation-into-your-workflow" class="hash-link" aria-label="Direct link to Bringing Document Automation into Your Workflow" title="Direct link to Bringing Document Automation into Your Workflow" translate="no">​</a></h2>
<p>With these three integrations, DynamicPDF API is now accessible across no-code, low-code, and open source workflow platforms. Whether you are building Zaps in Zapier, visual scenarios in Make, or self-hosted automation in n8n, you can generate PDFs from templates and JSON instructions, merge and process documents, rasterize pages into images, extract metadata and text, and analyze security settings at scale. All with no - or little - coding.</p>
<p>All PDF processing is handled by the DynamicPDF API, allowing you to focus on building workflows while the API manages rendering, merging, extraction, and analysis. These integrations make it easier than ever to embed robust PDF automation directly into your business systems.</p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Using the DynamicPDF API in Make Scenarios]]></title>
        <id>https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/</id>
        <link href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/"/>
        <updated>2026-02-24T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Using the DynamicPDF API in Make Scenarios.]]></summary>
        <content type="html"><![CDATA[
<p>Integrating the DynamicPDF API into a Make scenario is straightforward when using Makeâ€™s built-in <strong>HTTP</strong> module. Here you learn how to configure Make's <strong>HTTP</strong> module to call all eight of the DynamicPDF API's REST endpoints without writing any code.</p>
<div class="theme-admonition theme-admonition-warning admonition_IZjC alert alert--warning"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>warning</div><div class="admonitionContent_bl22"><p>The DynamicPDF API provides a dedicated custom Make app that exposes all endpoint parameters directly in the UI, eliminating the need to use the built-in HTTP module. The custom app is more intuitive, easier to configure, and reduces the likelihood of errors compared to working with the HTTP module. <a href="https://dpdf.io/docs/make-pdf-api-integration" target="_blank" rel="noopener noreferrer" class=""><strong>The DynamicPDF API custom Make app</strong></a></p></div></div>
<p>The <strong>HTTP</strong> module allows you to define authentication, request headers, query parameters, HTTP methods, and request body formats. It is a versatile module, and by using it, you can easily call every DynamicPDF API endpoint without writing any code.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>This blog post illustrates using Make's built-in <strong>HTTP</strong> module. It assumes basic familiarity with using modules to build scenarios using Make.</p></div></div>
<p>Using the HTTP module, you can call the following DynamicPDF API endpoints in your Make scenarios.</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-dlex-layout" target="_blank" rel="noopener noreferrer" class="">dlex-layout</a></li>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-image-info" target="_blank" rel="noopener noreferrer" class="">image-info</a></li>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-image" target="_blank" rel="noopener noreferrer" class="">pdf-image</a></li>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-info" target="_blank" rel="noopener noreferrer" class="">pdf-info</a></li>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-security-info" target="_blank" rel="noopener noreferrer" class="">pdf-security-info</a></li>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-text" target="_blank" rel="noopener noreferrer" class="">pdf-text</a></li>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-xmp" target="_blank" rel="noopener noreferrer" class="">pdf-xmp</a></li>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf" target="_blank" rel="noopener noreferrer" class="">pdf</a></li>
</ul>
<p>There are two distinct ways to call the DynamicPDF API endpoints, depending on how the request body is structured. Some endpoints accept <strong>raw binary data</strong> sent directly in the body of an HTTP POST request, while others require a <strong>multipart/form-data</strong> submission. The <code>pdf-text</code>, <code>pdf-xmp</code>, <code>pdf-info</code>, <code>pdf-security-info</code>, and <code>image-info</code> endpoints accept raw binary payloads, where the file itself is posted as the request body. In contrast, the <code>pdf-image</code>, <code>dlex-layout</code>, and <code>pdf</code> endpoints require multipart form submissions to support multiple inputs and named fields. Makeâ€™s built-in HTTP module supports both request patterns, which is illustrated throughout this blogâ€™s examples.</p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="make">Make<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#make" class="hash-link" aria-label="Direct link to Make" title="Direct link to Make" translate="no">​</a></h2>
<p><a href="https://www.make.com/" target="_blank" rel="noopener noreferrer" class="">Make</a> is a visual automation platform that developers can use to visually define how data moves between systems and APIs. Instead of writing custom integration code, developers assemble scenarios composed of modules that execute in sequence, handle branching logic, transform data, and manage errors. When using the HTTP module with the DynamicPDF API endpoints, the scenario builder provides a clear, repeatable way to define request construction, authentication, payload handling, and response processing, all within a single workflow. This approach lets developers focus on API behavior and document processing logic rather than infrastructure, making it easier to prototype, test, and maintain integrations that combine DynamicPDF operations with other services.</p>
<div class="theme-admonition theme-admonition-danger admonition_IZjC alert alert--danger"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"></path></svg></span>danger</div><div class="admonitionContent_bl22"><p>Because Make.com continuously updates its user interface and modules, occasionally introducing breaking changes, some interface details may differ in future versions. The information in this blog is current as of version 4 of the <strong>HTTP</strong> module.</p></div></div>
<h4 class="anchor anchorTargetStickyNavbar_SAay" id="http-module">HTTP Module<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#http-module" class="hash-link" aria-label="Direct link to HTTP Module" title="Direct link to HTTP Module" translate="no">​</a></h4>
<p>The <strong>HTTP</strong> module in Make is an integration tool for sending custom HTTP requests (GET, POST, PUT, PATCH, DELETE, etc.) to an API, including services that donâ€™t have native Make connectors, by configuring the URL, method, headers, body, and other settings directly in a scenario. It supports multiple authentication schemes (Basic, API Key, OAuth 2.0, client certificates), flexible body types (JSON, raw text, form data, multipart), and enables parsing API responses for use in subsequent modules. With it, you can build workflows that integrate in-house APIs, fetch or manipulate remote data, and orchestrate complex automation without writing code outside of Makeâ€™s visual editor.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Refer to Make's documentation for more details on the HTTP module.</p><ul>
<li class=""><a href="https://apps.make.com/http" target="_blank" rel="noopener noreferrer" class="">https://apps.make.com/http</a></li>
</ul></div></div>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="http-request-credentials">HTTP Request Credentials<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#http-request-credentials" class="hash-link" aria-label="Direct link to HTTP Request Credentials" title="Direct link to HTTP Request Credentials" translate="no">​</a></h2>
<p>You must use an API key to call the DynamicPDF API endpoints (<a href="https://dpdf.io/docs/usersguide/environment-manager/environment-manager-api-api-keys" target="_blank" rel="noopener noreferrer" class="">Apps and API Keys</a>). You use API key authentication when using DynamicPDF API with the HTTP module (<a href="https://apps.make.com/api-key-authentication-type" target="_blank" rel="noopener noreferrer" class="">API key authentication type</a>).</p>
<p>When creating a keychain entry for API key authentication, you first provide a descriptive name to identify the connection in your Make scenario. You then enter the complete API key exactly as required by the service, including any necessary prefix such as Bearer. Next, you choose where the API key is included in the request, typically in the HTTP header. Finally, you specify the parameter name the API uses to read the key, such as Authorization, which tells the remote service how to locate and validate the credential in each request.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>The DynamicPDF API puts the key in the HTTP header. <strong>Authorization: Bearer &lt;your-api-key&gt;</strong></p></div></div>
<p>The first time you use the <strong>HTTP</strong> module, you must create a keychain to place your DynamicPDF API key in the request's header. To create the keychain, create a new scenario (1) and add a new <strong>HTTP</strong> module (2).  Select <strong>Make a request</strong> as the <strong>Action</strong> (3).  In the <strong>HTTP</strong> module assign <strong>API key</strong> as the <strong>Authentication type</strong> (4).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig1a-00b4f3733394e8e0c787341382563963.png" width="900" height="504" class="img__Ss2"></p>
<p>In <strong>Credentials</strong> select <strong>Create a keychain</strong> to take you to a popup allowing you to create the DynamicPDF API key.  Note that if you already have a keychain for a different application, then you are presented with the option to <strong>Add</strong></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig1-7d098f4ef6931da5c0d3ae39b7528022.png" width="336" height="292" class="img__Ss2"></p>
<p>In the <strong>Add new keychain</strong> dialog provide it a <strong>Name</strong> (1), select <strong>In the header</strong> as the <strong>API key placement</strong> (2) and <code>Authorization</code> as the <strong>API Key parameter name</strong> (3).  Add the DynamicPDF API key to <strong>Key</strong> (4) and be certain to prepend <code>Bearer</code> to its value.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig3-906d86dafe4e8ef7e48c08fda3810365.png" width="566" height="461" class="img__Ss2"></p>
<p>After adding the keychain, you can now use the key in subsequent calls to the API using the <strong>HTTP</strong> module.</p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="the-pdf-text--pdf-xmp-pdf-info-and-pdf-security-info-endpoints">The pdf-text,  pdf-xmp, pdf-info, and pdf-security-info Endpoints<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#the-pdf-text--pdf-xmp-pdf-info-and-pdf-security-info-endpoints" class="hash-link" aria-label="Direct link to The pdf-text,  pdf-xmp, pdf-info, and pdf-security-info Endpoints" title="Direct link to The pdf-text,  pdf-xmp, pdf-info, and pdf-security-info Endpoints" translate="no">​</a></h2>
<p>The <code>pdf-text</code>, <code>pdf-xmp</code>, <code>pdf-info</code>, and <code>pdf-security-info</code> endpoints all accept raw binary data as the body of an HTTP POST request. When calling these endpoints from Make, you configure the <strong>HTTP</strong> module to send the file contents directly as binary payload rather than as form data. The following four examples demonstrate how to upload a file as raw binary and process the resulting response from each endpoint.</p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-text">pdf-text<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#pdf-text" class="hash-link" aria-label="Direct link to pdf-text" title="Direct link to pdf-text" translate="no">​</a></h3>
<p>Start by creating a new scenario that calls the <code>pdf-text</code> endpoint. If you already created a scenario in the previous step when setting up your API key, you can reuse it; otherwise, create a new one. In this example, assume the PDF you want to process is stored in Google Drive and contains twelve pages. Add a <strong>Google Drive</strong> module to the scenario and choose <strong>Download a File</strong>, then select <strong>Select from the list</strong> to browse your drive and locate the document, such as <code>twelve-pager.pdf</code>. Once selected, this module will download the PDF and provide the binary file data that you will pass directly to the <code>pdf-text</code> endpoint in the next step.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Refer to Make.com's documentation on the <strong>Google Drive</strong> module for more information (<a href="https://apps.make.com/google-drive" target="_blank" rel="noopener noreferrer" class="">google-drive</a>).</p></div></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig5-ca2625e1244eaa11fe64daf6cf368916.png" width="283" height="200" class="img__Ss2"></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig6-2b212c8cedfaf36f32e8aed8ec6b20d2.png" width="338" height="275" class="img__Ss2"></p>
<div class="theme-admonition theme-admonition-tip admonition_IZjC alert alert--success"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_bl22"><p>How you obtain the PDF is not important for understanding the examples that follow. The file could come from Google Drive, Dropbox, a public URL, an Amazon S3 bucket, or any other source supported by Make. What matters is that the module producing the file provides the required metadata, including the file name, MIME type, and binary content, so it can be sent correctly to the DynamicPDF API endpoints.</p><p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig7-f8492141b7b3bbd426db631a5fb1283d.png" width="412" height="214" class="img__Ss2"></p></div></div>
<p>After adding the <strong>Google Drive</strong> module, add an <strong>HTTP</strong> module and choose <strong>Make a request</strong> from <strong>Actions</strong>.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig8-fe892c06e259b8b1e70be50d83a3c706.png" width="796" height="409" class="img__Ss2"></p>
<p>Select <strong>API key</strong> as the <strong>Authentication type</strong> (1) and select the credentials previously created for the DynamicPDF API key (2). Add the URL to the <code>pdf-text</code> endpoint (3) and select <strong>POST</strong> as the <strong>Method</strong> (4).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig9-a7f9d641e8942e4b1176a1c961db1a38.png" width="600" height="327" class="img__Ss2"></p>
<p>Add two query parameters using <strong>Add a parameter</strong> (1) named <code>startPage</code> (2) and <code>pageCount</code> (3). This ensures the endpoint only gets the text from page three through page six when processing the PDF.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig10-92e414e2705e3e2bff0ab980bf369df4.png" width="587" height="390" class="img__Ss2"></p>
<p>Scroll down to review more of the <strong>HTTP</strong> module's configuration. Select <strong>Custom</strong> as the <strong>Body Content type</strong> (1),  then from the <strong>Google Drive</strong> module select the <strong>Mime Type</strong> as the <strong>Content type value</strong> (2) and <strong>Data</strong> as the <strong>Body content</strong> (3).  Leave the <strong>Parse response</strong> set to <strong>Yes</strong> (4) so that the response returns only the returned JSON.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig11-b684aed30ff2276d67364bc97de0f345.png" width="724" height="478" class="img__Ss2"></p>
<p>After creating the HTTP request, select <strong>Run once</strong> to run the scenario. After successfully running the scenario, open the results and select <strong>Download output bundles</strong> to review the JSON results.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig12-d57c6f1b6e1e65abc0a3dec17027c8e1.png" width="600" height="617" class="img__Ss2"></p>
<p>The endpoint returned the text as JSON, where each page contains its text. Because you told the module to parse the response, the JSON is formatted for easy display.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig13-d579c7d2a5846a543d93a5d8041d94c2.png" width="900" height="661" class="img__Ss2"></p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-xmp">pdf-xmp<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#pdf-xmp" class="hash-link" aria-label="Direct link to pdf-xmp" title="Direct link to pdf-xmp" translate="no">​</a></h3>
<p>The <code>pdf-xmp</code> endpoint, like the <code>pdf-text</code> endpoint, takes a PDF as raw binary. Other than the endpoint URL, the remaining parameters are the same. The body content type is custom, the content type's value is the PDF document's mime type, and the body content is the document's data. Select <strong>No</strong> to prevent Make from parsing the XML response.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig14-d9f61523047eb509428de47d1290e9db.png" width="634" height="714" class="img__Ss2"></p>
<p>After running the application the document's XMP metadata is returned as XML.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig15-d0f885388550b803e25a34c154aa70e5.png" width="800" height="489" class="img__Ss2"></p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>In this case, if you had opted to parse the XML response, Make would have translated the XML to RDF.</p></div></div>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-info">pdf-info<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#pdf-info" class="hash-link" aria-label="Direct link to pdf-info" title="Direct link to pdf-info" translate="no">​</a></h3>
<p>The <code>pdf-info</code> endpoint, like the previous two endpoints discussed, also takes a PDF as raw binary. Like the <code>pdf-text</code> endpoint, it returns JSON containing the requested information describing the examined PDF.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig16-65076d6632f7f98e54091b34e835d8de.png" width="600" height="696" class="img__Ss2"></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig17-696d597058512283f04bd537c405699d.png" width="900" height="671" class="img__Ss2"></p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-security-info">pdf-security-info<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#pdf-security-info" class="hash-link" aria-label="Direct link to pdf-security-info" title="Direct link to pdf-security-info" translate="no">​</a></h3>
<p>The <code>pdf-security-info</code> endpoint, like the previous three endpoints, also takes a PDF as raw binary. The endpoint returns a PDF document's security information as JSON.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig18-2f1b3b82deaf60ed6baafe206c1a516e.png" width="600" height="690" class="img__Ss2"></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig19-9abae25dd64073efd28dccf77e82ba20.png" width="1492" height="1089" class="img__Ss2"></p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="image-info">image-info<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#image-info" class="hash-link" aria-label="Direct link to image-info" title="Direct link to image-info" translate="no">​</a></h3>
<p>The <code>image-info</code> endpoint, like the previous four endpoints, takes an image as raw binary. The endpoint returns an image's information as JSON.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig20-dc7166e0d9cb50500a4675b2919c90ed.png" width="600" height="688" class="img__Ss2"></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig21-3583fa79e3471c46826337ba47294a37.png" width="600" height="440" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-image">pdf-image<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#pdf-image" class="hash-link" aria-label="Direct link to pdf-image" title="Direct link to pdf-image" translate="no">​</a></h2>
<p>The previous five endpoints accept a binary file sent as the raw body of an HTTP POST request and return a JSON document in response. The <code>pdf-image</code> endpoint, in contrast, requires an HTTP POST form submission in which the PDF is sent as <code>multipart/form-data</code>. Its response is also JSON, but instead of simple metadata, each rasterized page image is first converted to Base64 and then embedded directly in the returned JSON payload.</p>
<p>In this example, once again assume you have a twelve-page PDF document named <code>twelve-pager.pdf</code> stored in your Google Drive. Add a <strong>Google Drive</strong> module to the scenario, select <strong>Download a File</strong>, and choose the PDF you want to send to the <code>pdf-image</code> endpoint.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig22-3d3a1601478346e1042435b8f9bf97ce.png" width="600" height="541" class="img__Ss2"></p>
<p>Add a new <strong>HTTP</strong> module, add the <code>pdf-image</code> endpoint URL and change the <strong>Method</strong> to <strong>POST</strong> (1). Add two query parameters so you only rasterize pages three and four by setting <strong>startPage</strong> to <code>3</code> (2) and <strong>pageCount</strong> to <code>2</code> (3).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig24-63680e184d8ea653012761c719e10d32.png" width="600" height="927" class="img__Ss2"></p>
<p>Change the <strong>Body content type</strong> to <strong>multipart/form-data</strong> (1) and then assign <code>pdf</code> to <strong>Name</strong> (2) for <strong>Field 1</strong>. Assign  <strong>File</strong> (3) as the <strong>Field type</strong> and select <strong>Google Drive - Download a File</strong> as the <strong>File</strong> (4). By selecting (4) Make automatically assigns the file's data to the <strong>Google Drive</strong> module's <strong>Data</strong> and file's name to the <strong>Google Drive</strong> module's <strong>Name</strong>.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig25-57a1dcbee6d9a5a60d4369ae0bbd94df.png" width="600" height="928" class="img__Ss2"></p>
<p>Run the application and then select <strong>Download output bundles</strong> to view the returned JSON that contains the two rasterized images as base64 data.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig26-5faf441ef82b9e83bb8dfcc1b0875cb0.png" width="600" height="424" class="img__Ss2"></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig27-5f979cbb7ef5d5f19cdc8c8a65cd14b9.png" width="800" height="621" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="the-dlex-layout-endpoint">The dlex-layout Endpoint<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#the-dlex-layout-endpoint" class="hash-link" aria-label="Direct link to The dlex-layout Endpoint" title="Direct link to The dlex-layout Endpoint" translate="no">​</a></h2>
<p>The <code>dlex-layout</code> endpoint uses a multipart/form-data form submission that combines resources from two different locations. The DLEX template itself resides in your DynamicPDF cloud storage and is referenced by its path, which you submit as plain text using the <code>DlexPath</code> form field. The accompanying layout data is provided as JSON that exists locally within your scenario and is submitted as binary content using the <code>LayoutData</code> form field. Together, these form fields allow the endpoint to merge a stored DLEX template with externally supplied JSON data to generate the resulting PDF.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>If you prefer not to store a DLEX template in DynamicPDF cloud storage, you can instead upload the template directly as part of the request by using the <code>Resource</code> form field rather than the <code>DlexPath</code> field. In this case, the DLEX file itself is sent as binary data in the multipart/form-data submission, eliminating the need to reference a stored path. This alternative approach is demonstrated later in this blog post.</p></div></div>
<p>Refer to the documentation on this endpoint for more information.</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-dlex-layout" target="_blank" rel="noopener noreferrer" class="">dlex-layout</a> endpoint documentation</li>
</ul>
<p>Let's first use <code>DlexPath</code> and <code>LayoutData</code> in an HTTP module to create a PDF report.</p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="dlex-layout-dlexpath-and-layoutdata">dlex-layout (DlexPath and LayoutData)<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#dlex-layout-dlexpath-and-layoutdata" class="hash-link" aria-label="Direct link to dlex-layout (DlexPath and LayoutData)" title="Direct link to dlex-layout (DlexPath and LayoutData)" translate="no">​</a></h3>
<p>To call the <code>dlex-layout</code> endpoint, use the <strong>HTTP</strong> module just as you did for the previous endpoints, but configure the request body as <code>multipart/form-data</code>. Unlike endpoints that accept a single binary payload, <code>dlex-layout</code> requires multiple form fields to be submitted in one request. In this example, the DLEX template is referenced by its path in your DynamicPDF API cloud storage using the <code>DlexPath</code> field, while the JSON data used to populate the template is uploaded as binary using the <code>LayoutData</code> field. Assume the JSON data file, <code>SimpleReportWithCoverPage.json</code>, is stored in your Google Drive; you can retrieve it using a <strong>Google Drive</strong> module and pass its binary output directly into the <strong>HTTP</strong> module as the <code>LayoutData</code> form field.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig29-634ed1fd90296845f3a99deebd38bb2e.png" width="425" height="390" class="img__Ss2"></p>
<p>Add a new <strong>HTTP</strong> module to the scenario and after adding the API key and the URL, assign the <strong>Method</strong> as <strong>POST</strong> and the <strong>Body content type</strong> to <strong>multipart/form-data</strong>.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig30-4285fe01e374e4d7ecde2633c6ef5907.png" width="425" height="636" class="img__Ss2"></p>
<p>Assign <strong>Text</strong> as the first field's <strong>Field type</strong> (1), provide <code>DlexPath</code> as the value in <strong>Name</strong> (2), and assign it the path from cloud storage as the <strong>Value</strong> (3).</p>
<p>Add a new field and assign <code>LayoutData</code> as the <strong>Name</strong> (4), <strong>File</strong> as the <strong>Field type</strong> (5), and select <strong>Google Drive - Download a File</strong> as the <strong>File</strong> (6). This selection automatically links the file to the file from the previous <strong>Google Drive</strong> module you created.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig32-d9fc1bbb4b4702389a54569abb24168b.png" width="300" height="681" class="img__Ss2"></p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Alternatively, you could have selected <strong>Map</strong> and then manually mapped the file to the <strong>Data</strong> and <strong>Name</strong> properties from the previously created <strong>Google Drive</strong> module. You manually map to a Google Drive module's file properties later in this blog post.</p><p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig32c-745d889cae7771171bf432b72dcf8086.png" width="492" height="657" class="img__Ss2"></p></div></div>
<p>To view the PDF returned from the <code>dlex-layout</code> endpoint, add a new <strong>Google Drive</strong> module with the <strong>Action</strong> of <strong>Upload a File</strong>. Assume you have a folder entitled <code>output</code> on your Google Drive to output the created PDF.  Assign the name you wish to save the PDF as to the <strong>File Name</strong> field (1) and map the <strong>Data</strong> to the <strong>Data</strong> from the <strong>HTTP</strong> module (2).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig32b-57956eadc040c0cba8cf0d2077361222.png" width="473" height="600" class="img__Ss2"></p>
<p>Run the scenario to call the endpoint and save the results. Navigate to the file in your Google Drive and open the created PDF in Acrobat.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig34b-35a010c2b4eb3c1796ad0b58726e7779.png" width="2423" height="1308" class="img__Ss2"></p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="dlex-layout-layoutdata-and-resource">dlex-layout (LayoutData and Resource)<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#dlex-layout-layoutdata-and-resource" class="hash-link" aria-label="Direct link to dlex-layout (LayoutData and Resource)" title="Direct link to dlex-layout (LayoutData and Resource)" translate="no">​</a></h3>
<p>In the previous example, you specified the <code>DlexPath</code> as a text form field containing the relative path to a DLEX template stored in DynamicPDF API cloud storage. If instead you want to rely entirely on files from your own environment and avoid using DynamicPDF API storage, you can upload the DLEX template and any supporting assets directly as form files using the <strong>Resource</strong> field. In this situation, the DLEX file, embedded images, and JSON data are all sent as part of the same <code>multipart/form-data</code> request. For example, assume the DLEX template (<code>SimpleReportWithCoverPage.dlex</code>), an embedded image (<code>NorthwindLogo.gif</code>), and the JSON data (<code>SimpleReportWithCoverPage.json</code>) are all stored in your Google Drive. Add a <strong>Google Drive</strong> module that downloads each of these files so they can be included as resources in the HTTP request to the <code>dlex-layout</code> endpoint.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig35-79c572a30ca9b030c8b28a339b7d9186.png" width="700" height="368" class="img__Ss2"></p>
<p>Add an <strong>HTTP</strong> module and after configuring the authentication and URL, set the <strong>Method</strong> as <strong>POST</strong> and the <strong>Body content type</strong> as <strong>multipart/form-data</strong>.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig35b-4df65e60fe6b97124348330ce868cf1f.png" width="600" height="761" class="img__Ss2"></p>
<p>For the <strong>Body content</strong>, add a field named <code>LayoutData</code> (1), set the <strong>Field type</strong> to <strong>File</strong> (2) and then select <strong>Map</strong> (3) to display <strong>Data</strong> and <strong>File name</strong>. Add the <strong>Data</strong> to <strong>Data</strong> (4) and <strong>Name</strong> to the <strong>File name</strong> (5). Be careful to select the correct <strong>Google Drive</strong> module containing the file to download <code>SimpleReportWithCoverPage.json</code> (6).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig36-8820e6e4e61f03d168f9867bf5e0ac23.png" width="900" height="539" class="img__Ss2"></p>
<p>Create two more fields and assign <code>Resource</code> to the name and map the data and file name to the two resource files (<code>SimpleReportWithCoverPage.dlex</code> and <code>NorthwindLogo.gif</code>).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig37-5829543a6bc99be5acea8d52f4585ab5.png" width="600" height="629" class="img__Ss2"></p>
<p>After configuring the <strong>HTTP</strong> module, run the application once.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig37b-066322adc04963a21e3fa44401bb0c7f.png" width="900" height="610" class="img__Ss2"></p>
<p>After running the application, add a new <strong>Google Drive</strong> module and set the <strong>Action</strong> to <strong>Upload a File</strong>.  Configure the output folder, select <strong>Map</strong> (1) and add the file name and map the data to the <strong>HTTP</strong> module's <strong>Data</strong> field (2).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig37c-3fcddf37bdcb6535c48d70a6fb2d760c.png" width="702" height="660" class="img__Ss2"></p>
<p>Run the application and the endpoint is called and the file is then written to your Google Drive folder.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig37d-4114b38f64cfe930274d199c06dfecd5.png" width="600" height="202" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="the-pdf-endpoint">The pdf Endpoint<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#the-pdf-endpoint" class="hash-link" aria-label="Direct link to The pdf Endpoint" title="Direct link to The pdf Endpoint" translate="no">​</a></h2>
<p>The final endpoint you use in a Make scenario is the <code>pdf</code> endpoint. This endpoint is the most versatile endpoint in the DynamicPDF API, as it can be used to create new PDFs as well as merge PDFs, images, documents, HTML, and other resources into a single PDF. The behavior of the endpoint is driven by a JSON file known as the Instructions document, which defines the inputs, processing steps, and output structure for the resulting PDF.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Refer to the DynamicPDF API's <a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf" target="_blank" rel="noopener noreferrer" class="">pdf endpoint documentation</a> for more information.</p></div></div>
<p>Create an <strong>HTTP</strong> module and like the <code>dlex-layout</code> endpoint set it's type to <code>multipart/form-data</code>. Assume five resources and an associated JSON instructions on your Google drive.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig38-a58f3c7d8220752e744fbc85f0f87fec.png" width="500" height="331" class="img__Ss2"></p>
<p>An Instructions JSON document, such as <code>instructions-diff-resources.json</code>, defines the set of input resources, their types, and their names, and the order in which they appear determines how they are merged in the final PDF. During execution, each resource is processed according to its type, with non-PDF inputs first converted into PDFs. All resulting PDFs are then merged sequentially into a single output document. In this example, the Instructions document converts an image and an HTML document to PDFs, includes an existing PDF as-is, and then converts a Word document and an Excel spreadsheet to PDFs before merging everything into one combined PDF.</p>
<div class="language-json codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-json codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token property" style="color:#36acaa">"inputs"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">[</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"type"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"image"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"resourceName"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"temp.png"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"type"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"html"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"resourceName"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"test.html"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"type"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"pdf"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"resourceName"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"DocumentA.pdf"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"type"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"word"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"resourceName"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"sample.doc"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">	</span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"type"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"excel"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"resourceName"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"example.xls"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token punctuation" style="color:#393A34">]</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><br></div></code></pre></div></div>
<p>Rather than downloading each file individually as in the previous examples, you can download all required files in a single step to better demonstrate the versatility of the <strong>Google Drive</strong> module. Start by adding a <strong>Google Drive</strong> module and selecting the <strong>Search for Files/Folders</strong> action. This action returns a list of all files within a specified folder, which you can then use to retrieve multiple resources in one workflow and pass them collectively to subsequent modules in the scenario.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig39-5a527a85e685b829da633b2b1c259e0d.png" width="495" height="405" class="img__Ss2"></p>
<p>Next, connect a <strong>Google Drive</strong> module and set its action to <strong>Download a File</strong>. Connect the <strong>File ID</strong> to the <strong>File ID</strong> property from the previous module's search for files. This ensures each file is also downloaded from the drive's folder.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig40-405c3e708bc3562419dbb73766a064f8.png" width="487" height="356" class="img__Ss2"></p>
<p>Add an <strong>Array Aggregator</strong> and select <strong>Google Drive - Search for Files/Folders</strong> as the <strong>Source Module</strong>.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig41-c4e89f8e1c889a43c0f23dd4e808a195.png" width="527" height="547" class="img__Ss2"></p>
<p>Run the scenario despite receiving a warning. Running the scenario downloads all files and creates a data structure you can use in subsequent modules.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig45-7bb4f132d66056e1d3cc93e5205504c0.png" width="441" height="136" class="img__Ss2"></p>
<p>Open the aggregator's results and expand the input bundle and note each resource and its position in the array.</p>
<ol>
<li class=""><code>DocumentA.pdf</code></li>
<li class=""><code>instructions-dif-resources.json</code></li>
<li class=""><code>example.xls</code></li>
<li class=""><code>test.html</code></li>
<li class=""><code>sample.doc</code></li>
<li class=""><code>temp.png</code></li>
</ol>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig46-9152bebcd3a0bed5477c6e77415f661e.png" width="476" height="832" class="img__Ss2"></p>
<p>Add an <strong>HTTP</strong> module and assign the <strong>Method</strong> as <strong>POST</strong> and the <strong>Body content type</strong> as <strong>multipart/form-data</strong>.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig47-f4b88b0068328678bb5a228b5e186736.png" width="364" height="735" class="img__Ss2"></p>
<p>Assign <code>Instructions</code> as the first field's <strong>Name</strong> (1), assign <strong>File</strong> as the <strong>Field type</strong> (2), and map the <strong>Data</strong> to the <strong>data</strong> property of  the second element of the aggregate's array (3) and the <strong>File Name</strong> to the array's <strong>filename</strong> (4). Create five more fields and assign <strong>Resource</strong> as the name of each and map the data to the remaining elements in the array.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig48-df6ae5a23f3448b6cd2c7edd63afd15b.png" width="719" height="746" class="img__Ss2"></p>
<p>Add a <strong>Google Drive, Upload a File</strong> module and assign the <strong>Data</strong> to the <strong>HTTP</strong> module's <strong>Data</strong>.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig49-4bf3593fa9705ac87ff7eb4e866bafaa.png" width="524" height="628" class="img__Ss2"></p>
<p>Run the application and then view the HTTP module's input to review what was sent to the <code>pdf</code> endpoint. As you can see from the bundle's content, it sent each file as binary to the endpoint in a multipart/form-data post.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig50-fba96d81dbd439552a905ab07a62b038.png" width="903" height="548" class="img__Ss2"></p>
<p>Open the PDF saved to your Google Drive to view the resultant PDF.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig51-38ebdf52086a3e1be6d86eb9ed0e444d.png" width="700" height="343" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="conclusion">Conclusion<a href="https://www.dynamicpdf.com/blog/dynamicpdf-make-pdf-scenarios/#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion" translate="no">​</a></h2>
<p>Integrating the DynamicPDF API into a Make scenario is straightforward if you understand how the HTTP module handles authentication, binary payloads, and multipart form submissions. With a single API key and Makeâ€™s built-in modules, you can work with all eight DynamicPDF API endpoints, whether you need to extract text, retrieve metadata, generate reports from DLEX templates, or combine documents using the <code>pdf</code> endpoint and its Instructions file.
Every endpoint fits into one of two patterns. The <code>pdf-text</code>, <code>pdf-xmp</code>, <code>pdf-info</code>, <code>pdf-security-info</code>, and <code>image-info</code> endpoints accept raw binary in the request body, while the <code>dlex-layout</code>, <code>pdf-image</code>, and <code>pdf</code> endpoints require multipart form submissions.</p>
<p>Although the Make interface changes frequently, the core idea remains stable. With Makeâ€™s modular workflow builder and the flexibility of the DynamicPDF API, you can create automated document solutions that are both powerful and easy to maintain.</p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Using the DynamicPDF API in n8n Workflows]]></title>
        <id>https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/</id>
        <link href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/"/>
        <updated>2025-10-29T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Nine n8n workflows you can integrate into your DynamicPDF API endpoints. Seven REST API endpoints for processing PDFs. Client libraries in C#, Java, PHP, Python, JavaScript, Go, and Ruby. WYSIWYG for easy PDF creation.]]></summary>
        <content type="html"><![CDATA[
<p>By combining <strong>DynamicPDF API</strong>  and its powerful document-processing endpoints with <strong>n8n</strong> automation and scheduling capabilities, you can build end-to-end solutions that dynamically generate reports, combine files, or analyze PDFs. In this blog post we provide nine ready-made example workflows for download.</p>
<p><strong>n8n</strong> is an open-source workflow automation platform that lets developers visually connect APIs, services, and data flows without heavy coding. It supports nodes for HTTP requests, file operations, data transformations, and other operations. You can easily integrate <strong>DynamicPDF API</strong> into your <strong>n8n</strong> workflows throughout <strong>HTTP Request</strong> node, enabling automated PDF generation, merging, conversion, and metadata extraction directly within your workflows.</p>
<div class="theme-admonition theme-admonition-tip admonition_IZjC alert alert--success"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_bl22"><p>See the tutorial <a href="https://dpdf.io/docs/tutorials/external-products/n8n/dynamicpdf-n8n-automation-workflow-tutorial" target="_blank" rel="noopener noreferrer" class="">Using n8n Workflows with the DynamicPDF API</a> for more information on using n8n with the DynamicPDF API.</p></div></div>
<p>This document describes nine example n8n workflows that run locally and integrate with the DynamicPDF API.  All workflows execute in a local n8n installation and write output files to the <code>/temp/n8n-examples/output/</code> directory.</p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="dlex-layout-localjson">dlex-layout-local.json<a href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/#dlex-layout-localjson" class="hash-link" aria-label="Direct link to dlex-layout-local.json" title="Direct link to dlex-layout-local.json" translate="no">​</a></h2>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/dlex-layout-local-0e2c1fea2ebd7ec11bcdf6f3d2b08db3.png" width="1562" height="489" class="img__Ss2"></p>
<p>Generates a PDF with the <code>dlex-layout</code> endpoint by reading a <code>.json</code> layout data file and a <code>.dlex</code> template from disk. Code nodes rename the binary properties to <code>data_json</code> and <code>data_dlex</code>, preparing a multipart form submission. The request posts to DynamicPDF and writes the PDF to <code>/temp/n8n-examples/output/dlex-local-out.pdf</code>.</p>
<ul>
<li class=""><a class="" href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/n8n/dlex-layout-local.json/">dlex-layout-local.json</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-merge-filesjson">pdf-merge-files.json<a href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/#pdf-merge-filesjson" class="hash-link" aria-label="Direct link to pdf-merge-files.json" title="Direct link to pdf-merge-files.json" translate="no">​</a></h2>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/pdf-merge-files-4ddd68659754198df60e51a831c5c9f1.png" width="1516" height="481" class="img__Ss2"></p>
<p>Merges multiple file types into a single PDF using the <code>pdf</code> endpoint. Inputs include two PDFs, a Word document, a PNG image, and an HTML page. Each file is read from disk, renamed (for example <code>data_pdf1</code>, <code>data_word</code>, <code>data_img</code>), combined into multipart form-data, and posted. The merged PDF is saved to <code>/temp/n8n-examples/output/pdf-local-out.pdf</code>.</p>
<ul>
<li class=""><a class="" href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/n8n/pdf-merge-files.json/">pdf-merge-files.json</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-merge-jsonjson">pdf-merge-json.json<a href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/#pdf-merge-jsonjson" class="hash-link" aria-label="Direct link to pdf-merge-json.json" title="Direct link to pdf-merge-json.json" translate="no">​</a></h2>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/pdf-merge-json-d33a562f9fab4c5629234f66ff177b29.png" width="1496" height="330" class="img__Ss2"></p>
<p>Merges two PDFs using base64-encoded JSON rather than multipart form-data. The workflow downloads two IRS forms, converts them to Base64 with a Code node, and sends a JSON body that declares both inputs and resources to the <code>pdf</code> endpoint. The merged output is written to <code>/temp/n8n-examples/output/merged-pdfs-example.pdf</code>.</p>
<ul>
<li class=""><a class="" href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/n8n/pdf-merge-json.json/">pdf-merge-json.json</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-infojson">pdf-info.json<a href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/#pdf-infojson" class="hash-link" aria-label="Direct link to pdf-info.json" title="Direct link to pdf-info.json" translate="no">​</a></h2>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/pdf-info-e0fb0141aeea173740a09f0e8725b2ab.png" width="670" height="196" class="img__Ss2"></p>
<p>Retrieves document information from a local PDF via the <code>pdf-info</code> endpoint. It reads <code>book.pdf</code>, posts it as binary with <code>Content-Type: application/pdf</code>, and returns JSON with properties such as page count, file size, and metadata.</p>
<ul>
<li class=""><a class="" href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/n8n/pdf-info.json/">pdf-info.json</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-security-infojson">pdf-security-info.json<a href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/#pdf-security-infojson" class="hash-link" aria-label="Direct link to pdf-security-info.json" title="Direct link to pdf-security-info.json" translate="no">​</a></h2>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/pdf-security-info-8603ade8b7eb86f844fcc5376dbd80d1.png" width="684" height="203" class="img__Ss2"></p>
<p>Inspects encryption and digital signatures using the <code>pdf-security-info</code> endpoint. It reads <code>aes256-sig.pdf</code>, posts the file as binary, and receives details about encryption type, permissions, and signature information.</p>
<ul>
<li class=""><a class="" href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/n8n/pdf-security-info.json/">pdf-security-info.json</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-textjson">pdf-text.json<a href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/#pdf-textjson" class="hash-link" aria-label="Direct link to pdf-text.json" title="Direct link to pdf-text.json" translate="no">​</a></h2>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/pdf-text-2911a065aeea9971076c9b9a0a0bfdf6.png" width="677" height="205" class="img__Ss2"></p>
<p>Extracts text content from selected pages of a PDF with the <code>pdf-text</code> endpoint. It reads <code>book.pdf</code> and uses query parameters <code>startPage=20</code> and <code>pageCount=10</code> to return JSON text for those pages.</p>
<ul>
<li class=""><a class="" href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/n8n/pdf-text.json/">pdf-text.json</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-xmpjson">pdf-xmp.json<a href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/#pdf-xmpjson" class="hash-link" aria-label="Direct link to pdf-xmp.json" title="Direct link to pdf-xmp.json" translate="no">​</a></h2>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/pdf-xmp-b025f31aae768dac734d64e4f5e4699c.png" width="1088" height="208" class="img__Ss2"></p>
<p>Retrieves XMP metadata (XML-based descriptive metadata) from a PDF using the <code>pdf-xmp</code> endpoint. It reads <code>fw4.pdf</code>, posts it to the API, and writes the resulting XML to <code>/temp/n8n-examples/output/xmp-metadata.xml</code>.</p>
<ul>
<li class=""><a class="" href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/n8n/pdf-xmp.json/">pdf-xmp.json</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="image-infojson">image-info.json<a href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/#image-infojson" class="hash-link" aria-label="Direct link to image-info.json" title="Direct link to image-info.json" translate="no">​</a></h2>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/image-info-a98cfd0bddef119b9d20f6886bf4d3ed.png" width="885" height="177" class="img__Ss2"></p>
<p>Retrieves image metadata using the <code>image-info</code> endpoint. It downloads a PNG (DynamicPDF logo), posts the binary image, and returns JSON describing dimensions, color depth, format, and compression.</p>
<ul>
<li class=""><a class="" href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/n8n/image-info.json/">image-info.json</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="dlex-layout-cloudjson">dlex-layout-cloud.json<a href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/#dlex-layout-cloudjson" class="hash-link" aria-label="Direct link to dlex-layout-cloud.json" title="Direct link to dlex-layout-cloud.json" translate="no">​</a></h2>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/dlex-layout-cloud-5754024934059671028a72d62b72ca0c.png" width="886" height="206" class="img__Ss2"></p>
<p>Combines a local JSON layout with a <code>.dlex</code> template stored in DynamicPDF Cloud Storage using the <code>dlex-layout</code> endpoint. The workflow references <code>samples/dlex-layout/SimpleReportWithCoverPage.dlex</code> and saves the generated PDF to <code>/temp/n8n-examples/output/dlex-layout-cloud-out.pdf</code>.</p>
<ul>
<li class=""><a class="" href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/n8n/dlex-layout-cloud.json/">dlex-layout-cloud.json</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="summary">Summary<a href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/#summary" class="hash-link" aria-label="Direct link to Summary" title="Direct link to Summary" translate="no">​</a></h2>
<p>These nine local workflows demonstrate how to automate PDF creation, merging, inspection, and metadata extraction with the DynamicPDF API from n8n. They cover binary and JSON-based uploads, multipart construction, text and metadata extraction, security inspection, and reading/writing files from disk, providing a solid foundation for integrating DynamicPDF into local n8n automation pipelines.</p>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="ðÿ-related-resources">ðŸ”— Related Resources<a href="https://www.dynamicpdf.com/blog/dynamicpdf-n8n-automation-workflows/#%C3%B0%C3%BF-related-resources" class="hash-link" aria-label="Direct link to ðŸ”— Related Resources" title="Direct link to ðŸ”— Related Resources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://dpdf.io/docs/api" target="_blank" rel="noopener noreferrer" class="">DynamicPDF API Documentation</a></li>
<li class=""><a href="https://n8n.io/" target="_blank" rel="noopener noreferrer" class="">n8n Workflow Automation</a></li>
<li class=""><a href="https://github.com/dynamicpdf-api" target="_blank" rel="noopener noreferrer" class="">DynamicPDF GitHub Samples</a></li>
<li class=""><a href="https://www.dynamicpdf.com/designer" target="_blank" rel="noopener noreferrer" class="">DynamicPDF DLEX Designer</a></li>
</ul>
<hr>
<p><em>Â© 2025 DynamicPDF. All rights reserved.</em></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="DynamicPDF" term="DynamicPDF"/>
        <category label="Cloud API" term="Cloud API"/>
        <category label="n8n" term="n8n"/>
        <category label="Workflow" term="Workflow"/>
        <category label="PDF" term="PDF"/>
        <category label="Automation" term="Automation"/>
        <category label="DLEX" term="DLEX"/>
        <category label="Metadata" term="Metadata"/>
        <category label="pdf" term="pdf"/>
        <category label="pdf-info" term="pdf-info"/>
        <category label="pdf-security-info" term="pdf-security-info"/>
        <category label="image-info" term="image-info"/>
        <category label="pdf-image" term="pdf-image"/>
        <category label="dlex-layout" term="dlex-layout"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Addition of new pdf-security-info Endpoint]]></title>
        <id>https://www.dynamicpdf.com/blog/pdf-security-and-encryption-information/</id>
        <link href="https://www.dynamicpdf.com/blog/pdf-security-and-encryption-information/"/>
        <updated>2025-10-16T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[The DynamicPDF API has an important new endpoint, the pdf-security-info endpoint, that returns a PDF's security and encryption information as a JSON document.]]></summary>
        <content type="html"><![CDATA[
<p>The DynamicPDF API has an important new endpoint, the <code>pdf-security-info</code> endpoint, that returns a PDF's security and encryption information as a JSON document.</p>
<p>The <code>pdf-security-info</code> endpoint takes a PDF as a POST and returns a JSON document containing security and encryption information. For example, the following cURL command uploads a PDF with AES-128 security.</p>
<div class="language-bash codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-bash codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">curl -X POST "https://api.dpdf.io/v1.0/pdf-security-info" </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">-H  "accept:application/json" </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">-H  "Authorization: DP.xxx-your-api-key-xxx"</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">-H  "Content-Type: application/pdf" </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">--data-binary "@C:/temp/security/aes128-sig-out.pdf"</span><br></div></code></pre></div></div>
<p>And returns the following JSON.</p>
<div class="language-json codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-json codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"encryptionType"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"aes-128-cbc"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"hasUserPassword"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">true</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"hasOwnerPassword"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">true</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"allowPrint"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">true</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"allowEdit"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">true</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"allowCopy"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">true</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"allowUpdateAnnotsAndFields"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">true</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"allowFormFilling"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">false</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"allowAccessibility"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">true</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"allowDocumentAssembly"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">false</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"allowHighResolutionPrinting"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">true</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"encryptAllExceptMetadata"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">false</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"encryptOnlyFileAttachments"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token boolean" style="color:#36acaa">false</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><br></div></code></pre></div></div>
<p>When opened in Adobe Acrobat you can view the security information and see that it matches what was returned by the endpoint.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/aes128-06ca27fb70b149e67fadd1d86c3fe9ef.png" width="1454" height="1002" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="more-information">More Information<a href="https://www.dynamicpdf.com/blog/pdf-security-and-encryption-information/#more-information" class="hash-link" aria-label="Direct link to More Information" title="Direct link to More Information" translate="no">​</a></h2>
<p>For more information, refer to the <code>pdf-security-info</code> endpoint's documentation.</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-security-info" target="_blank" rel="noopener noreferrer" class="">pdf-security-info endpoint documentation</a></li>
</ul>
<div class="cloud-api-social-follow"><strong><a href="https://www.linkedin.com/company/dynamicpdf" target="_blank" rel="noreferrer">LinkedIn</a> · <a href="https://www.facebook.com/dynamicpdf" target="_blank" rel="noreferrer">Facebook</a> · <a href="https://twitter.com/dynamicpdf" target="_blank" rel="noreferrer">X</a> · <!-- -->Follow us on social media for the latest news!</strong></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="PDF" term="PDF"/>
        <category label="pdf-security-info" term="pdf-security-info"/>
        <category label="DynamicPDF" term="DynamicPDF"/>
        <category label="REST" term="REST"/>
        <category label="API" term="API"/>
        <category label="ceTe Software" term="ceTe Software"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Changes to the pdf-text Endpoint]]></title>
        <id>https://www.dynamicpdf.com/blog/pdf-text-changes/</id>
        <link href="https://www.dynamicpdf.com/blog/pdf-text-changes/"/>
        <updated>2025-05-21T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[The DynamicPDF API has an important new feature for the pdf-text endpoint. The endpoint now supports extracting text as it appears visually or as it appears visually without truncating extra space. Previously, when extracting text, all text appeared in the order in which it was added to the PDF.]]></summary>
        <content type="html"><![CDATA[
<p>The DynamicPDF API has an important new feature for the <code>pdf-text</code> endpoint. The endpoint now supports extracting text as it appears visually or as it appears visually without truncating extra space. Previously, when extracting text, all text appeared in the order in which it was added to the PDF.</p>
<p>The <code>pdf-text</code> endpoint now allows extracting text as it appears visually in the PDF or as it appears visually without truncating extra space. Previously, when extracting text, all text appeared in the order in which it was added to the PDF.</p>
<p>The endpoint now has the additional <code>textOrder</code> query parameter. The parameter's values are: <code>stream</code>, <code>visible</code>, and <code>visibleExtraSpace</code>.</p>
<p>For example, the following PDF contains a header created when using our product, DynamicPDF Converter, to evaluate creating a PDF.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig0-31dccf2070baa114fe87e162e8fda6f3.png" width="904" height="477" class="img__Ss2"></p>
<p>When extracting text the <code>pdf-text</code> endpoint's JSON response displays the header after the text because this is the order in the PDF document's operators. This is the default behavior or behavior when specifying <code>textOrder=stream</code>.</p>
<div class="language-bash codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-bash codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">curl --location 'https://api.dpdf.io/v1.0/pdf-text?textOrder=stream'</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">--header 'Authorization: Bearer DP.--api-key--'</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">--header 'Content-Type: application/pdf'</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">--data-binary '@/C:/temp/sample.pdf'</span><br></div></code></pre></div></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig1-70a858d24ae2d061c66c7a7e1bbb51c8.png" width="900" height="523" class="img__Ss2"></p>
<p>Specifying <code>textOrder = visible</code> results in the endpoint's JSON response displaying the extracted text in the order visible to the PDF end user with extra space removed from the extracted text.</p>
<div class="language-bash codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-bash codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">curl --location 'https://api.dpdf.io/v1.0/pdf-text?textOrder=visible'</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">--header 'Authorization: Bearer DP.--api-key--'</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">--header 'Content-Type: application/pdf'</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">--data-binary '@/C:/temp/sample.pdf'</span><br></div></code></pre></div></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig2-fa6e642faeeba3b710c2203cf1ebd377.png" width="900" height="449" class="img__Ss2"></p>
<p>Specifying <code>textOrder = visibleExtraSpace</code> results in the endpoint's JSON response displaying the extracted text in the order visible to the PDF end user and it maintains the extra visible space in the PDF.</p>
<div class="language-bash codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-bash codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">curl --location 'https://api.dpdf.io/v1.0/pdf-text?textOrder=visibleExtraSpace'</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">--header 'Authorization: Bearer DP.--api-key--'</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">--header 'Content-Type: application/pdf'</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">--data-binary '@/C:/temp/sample.pdf'</span><br></div></code></pre></div></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig3-d38d78021bfcca3286df8d584464d4ec.png" width="900" height="520" class="img__Ss2"></p>
<p>This parameter allows extra flexibility in how you extract text from PDF documents.  You can now extract text in the natural PDF operator order or the visible order of the PDF text. You can also choose to preserve a PDF's extra space rather than truncating it.</p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="more-information">More Information<a href="https://www.dynamicpdf.com/blog/pdf-text-changes/#more-information" class="hash-link" aria-label="Direct link to More Information" title="Direct link to More Information" translate="no">​</a></h2>
<p>For more information, refer to the <code>pdf-text</code> endpoint's documentation.</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-text" target="_blank" rel="noopener noreferrer" class="">pdf-text endpoint documentation</a></li>
</ul>
<div class="cloud-api-social-follow"><strong><a href="https://www.linkedin.com/company/dynamicpdf" target="_blank" rel="noreferrer">LinkedIn</a> · <a href="https://www.facebook.com/dynamicpdf" target="_blank" rel="noreferrer">Facebook</a> · <a href="https://twitter.com/dynamicpdf" target="_blank" rel="noreferrer">X</a> · <!-- -->Follow us on social media for the latest news!</strong></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="PDF" term="PDF"/>
        <category label="pdf-text" term="pdf-text"/>
        <category label="EC2" term="EC2"/>
        <category label="AMI" term="AMI"/>
        <category label="DynamicPDF" term="DynamicPDF"/>
        <category label="text extraction" term="text extraction"/>
        <category label="REST" term="REST"/>
        <category label="API" term="API"/>
        <category label="ceTe Software" term="ceTe Software"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[The DynamicPDF API (Self-Hosted)]]></title>
        <id>https://www.dynamicpdf.com/blog/aws-managed-self-hosted/</id>
        <link href="https://www.dynamicpdf.com/blog/aws-managed-self-hosted/"/>
        <updated>2025-05-16T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[DynamicPDF introduces managed and self-hosted AWS deployment options for secure, scalable PDF generation infrastructure.]]></summary>
        <content type="html"><![CDATA[
<p>The DynamicPDF (Self-Hosted) is available on the AWS Marketplace and now supports converting HTML, Word, and Excel to PDFs and converting PDFs to images (rasterizing).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig1-0059adccadca65e696e25e863fe4c204.png" width="900" height="618" class="img__Ss2"></p>
<p>We at ceTe Software are excited to announce that the DynamicPDF API (Self-Hosted) now supports converting HTML, Word, and Excel to PDF documents and converting PDF documents to images (rasterizing).</p>
<p>The DynamicPDF API (Self-Hosted) provides a robust and scalable solution for your PDF processing needs that can be run in your AWS environment. Our flexible RESTful APIs integrate with AWS to easily add PDF functionality to your existing software. Deploy our AMI product to quickly create an EC2 instance within your AWS account and start enjoying immediate access to fully functional endpoints. And best of all, because you are running your own private AWS instance, 100% of your data and code remain in your environment.</p>
<p>And our seven client libraries make integrating your applications with your instance's endpoints a breeze. We offer Node.js, .NET, Java, PHP, Go, Python, and Ruby client libraries all of which are easily integrated into your standalone instance.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/client-libraries-6bd25f37b0df7540bc796d32b1f2ee06.png" width="625" height="47" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="new-features">New Features<a href="https://www.dynamicpdf.com/blog/aws-managed-self-hosted/#new-features" class="hash-link" aria-label="Direct link to New Features" title="Direct link to New Features" translate="no">​</a></h2>
<p>The DynamicPDF API (Self-Hosted) now supports converting HTML, Word, and HTML to PDF and rasterizing PDFs to images. Enjoy all the great features of our hosted DynamicPDF API in your own privately hosted instance.</p>
<ul>
<li class="">Converting Word, Excel, and HTML to PDF is now supported by private instances of the DynamicPDF API Self-Hosted (Core Features).</li>
<li class="">The <code>pdf-image</code> endpoint is also available to private instances of the DynamicPDF API Self-Hosted (Core Features).</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="highlights">Highlights<a href="https://www.dynamicpdf.com/blog/aws-managed-self-hosted/#highlights" class="hash-link" aria-label="Direct link to Highlights" title="Direct link to Highlights" translate="no">​</a></h3>
<ul>
<li class="">SOLUTIONS: Create PDFs and create dynamic reports. Merge PDFs and other resources. Add Outlines and Bookmarks to PDFs. Password protect and encrypt PDFs. Convert images to PDFs. Convert HTML, Word, and Excel to PDFs. Convert PDFs to images. Retrieve text, metadata, and XMP From PDFs. Retrieve image Information. Complete forms and remove or flatten form fields. Add text, images, lines, and rectangles to PDFs. Delete pages from a PDF or split a PDF into multiple PDFs. Add Barcodes to PDFs.</li>
</ul>
<ul>
<li class="">SUPPORT: You also have free access to our client libraries for Node.js, .NET, Java, PHP, Go, Python, and Ruby. These libraries allow you to easily integrate your end-user applications with your DynamicPDF API (Self-Hosted) endpoints. You can also use our DynamicPDF Designer graphic report designer to design dynamic PDF reports without programming quickly. And you have access to the same support we have provided our clients for over 20 years.</li>
<li class="">PROVEN: With over 22 years of experience writing great PDF SDKs and trusted by over 10,000 customers worldwide, the DynamicPDF API (Self-Hosted) enables your organization to host private, dedicated EC2 instances using the same proven technology as our SDKs.</li>
<li class="">SECURE: 100% of your data and applications are run in your own managed AWS instance.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="more-information">More Information<a href="https://www.dynamicpdf.com/blog/aws-managed-self-hosted/#more-information" class="hash-link" aria-label="Direct link to More Information" title="Direct link to More Information" translate="no">​</a></h2>
<p>For more information, refer to our product page on the AWS Marketplace and our documentation.</p>
<ul>
<li class="">
<p><a href="https://aws.amazon.com/marketplace/pp/prodview-t6syqoca3u5oe?sr=0-1&amp;ref_=beagle&amp;applicationId=AWSMPContessa" target="_blank" rel="noopener noreferrer" class="">AWS Marketplace product page</a></p>
</li>
<li class="">
<p>(<a href="https://dpdf.io/docs/usersguide/managed/self-hosted/aws-marketplace/self-hosted-core-features" target="_blank" rel="noopener noreferrer" class="">DynamicPDF API (Self-Hosted)</a>)</p>
</li>
</ul>
<p>Also be certain to check out <a href="https://dpdf.io/solutions" target="_blank" rel="noopener noreferrer" class="">DynamicPDF Solutions</a> to see what DynamicPDF API can do for your organization.</p>
<div class="cloud-api-social-follow"><strong><a href="https://www.linkedin.com/company/dynamicpdf" target="_blank" rel="noreferrer">LinkedIn</a> · <a href="https://www.facebook.com/dynamicpdf" target="_blank" rel="noreferrer">Facebook</a> · <a href="https://twitter.com/dynamicpdf" target="_blank" rel="noreferrer">X</a> · <!-- -->Follow us on social media for the latest news!</strong></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="AWS" term="AWS"/>
        <category label="PDF" term="PDF"/>
        <category label="Self-Hosted" term="Self-Hosted"/>
        <category label="EC2" term="EC2"/>
        <category label="AMI" term="AMI"/>
        <category label="DynamicPDF" term="DynamicPDF"/>
        <category label="ceTe Software" term="ceTe Software"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[DynamicPDF API Announces Ruby Client Library]]></title>
        <id>https://www.dynamicpdf.com/blog/dynamicpdf-api-ruby-client/</id>
        <link href="https://www.dynamicpdf.com/blog/dynamicpdf-api-ruby-client/"/>
        <updated>2025-04-22T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[DynamicPDF API Ruby client released, enabling Ruby developers to generate, merge, and convert PDFs easily.]]></summary>
        <content type="html"><![CDATA[<p>The Ruby client library is now available from <a href="https://rubygems.org/gems/dynamicpdf_api" target="_blank" rel="noopener noreferrer" class="">Ruby Gems</a> . The Ruby client library makes it easy to use the DynamicPDF API from your Ruby based applications.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/ruby-ea6669b1d50e695ba271bf1a3bea20cc.png" width="150" height="150" class="img__Ss2"></p>
<p>Obtain the client library from Ruby Gems.</p>
<ul>
<li class=""><a href="https://rubygems.org/gems/dynamicpdf_api" target="_blank" rel="noopener noreferrer" class="">DynamicPdf API Ruby Gem</a>.</li>
</ul>
<p>Install using the gem command.</p>
<div class="language-bash codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-bash codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">gem install dynamicpdf_api</span><br></div></code></pre></div></div>
<p>Obtain the source code and samples from GitHub.</p>
<ul>
<li class="">Source - <a href="https://github.com/dynamicpdf-api/ruby-client" target="_blank" rel="noopener noreferrer" class="">https://github.com/dynamicpdf-api/ruby-client</a></li>
<li class="">Examples - <a href="https://github.com/dynamicpdf-api/ruby-client-examples" target="_blank" rel="noopener noreferrer" class="">https://github.com/dynamicpdf-api/ruby-client-examples</a></li>
</ul>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="DynamicPDF API" term="DynamicPDF API"/>
        <category label="PDF" term="PDF"/>
        <category label="Ruby" term="Ruby"/>
        <category label="Ruby Client Library" term="Ruby Client Library"/>
        <category label="Ruby PDF" term="Ruby PDF"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Sending Resources & Data in JSON Instructions]]></title>
        <id>https://www.dynamicpdf.com/blog/sending-resources-and-data-in-json-instructions/</id>
        <link href="https://www.dynamicpdf.com/blog/sending-resources-and-data-in-json-instructions/"/>
        <updated>2025-04-02T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Submit JSON data to DynamicPDF templates and generate PDFs using a streamlined workflow with the Cloud API.]]></summary>
        <content type="html"><![CDATA[
<p>The DynamicPDF API <code>pdf</code> endpoint now accepts payloads where the payload is <code>raw/json</code> rather than <code>multipart/formdata</code>. This change allows submitting a request purely as a JSON document.</p>
<p>The <code>pdf</code> endpoint now accepts <code>raw/json</code> as a request's payload. This is especially useful when using a third-party library such as SalesForce's <code>HttpRequest</code> class.</p>
<p>The DynamicPDF <code>pdf</code> endpoint accepts JSON as the message body for HTTP Post requests. Resources embedded in the JSON document are encoded as either base64 data or strings properly encoded for embedding in a JSON document.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>For complete details, and numerous examples, refer to the <a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-json" target="_blank" rel="noopener noreferrer" class="">pdf(JSON)</a> endpoint documentation.</p></div></div>
<p>For example, the following illustrates sending an HTTP POST request where the JSON document is sent as a JSON string.</p>
<div class="language-bash codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-bash codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">POST /v1.0/pdf HTTP/1.1</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">Host: api-euw.dpdf.io</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">Authorization: Bearer DP--api-key--</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">Content-Length: 11476</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">{</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  "author": "Alex Smith",yarn</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  "inputs": [</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      "type": "pdf",</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      "resourceName": "DocumentA.pdf",</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      "startPage": 1,</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      "pageCount": 1</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    },</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      "type": "pdf",</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      "resourceName": "DocumentB.pdf"</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  ],</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  "resources": [</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">	{</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">		"name" : "DocumentA.pdf",</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">		"data" : "--base64 encoded data--"</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">	},</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">	{</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">		"name" : "DocumentB.pdf",</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">		"data" : "--base64 encoded data--"</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">	}</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">	]</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">}</span><br></div></code></pre></div></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig8-06e9ee7522d3d322312e48f5e8bb2f26.png" width="900" height="628" class="img__Ss2"></p>
<p>Now when using the <code>pdf</code> endpoint you can send PDF, Word, Excel, images, and other resources embedded directly in the JSON request.</p>
<p>For complete details, and numerous examples, refer to the <a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-json" target="_blank" rel="noopener noreferrer" class="">pdf(JSON)</a> endpoint documentation.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="PDF" term="PDF"/>
        <category label="DynamicPDF" term="DynamicPDF"/>
        <category label="ceTe Software" term="ceTe Software"/>
        <category label="JSON" term="JSON"/>
        <category label="API" term="API"/>
        <category label="REST" term="REST"/>
        <category label="SalesForce" term="SalesForce"/>
        <category label="Apex" term="Apex"/>
        <category label="POST" term="POST"/>
        <category label="HTTP" term="HTTP"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[The DynamicPDF API PHP Client Library - Manual Import]]></title>
        <id>https://www.dynamicpdf.com/blog/php-manual-import/</id>
        <link href="https://www.dynamicpdf.com/blog/php-manual-import/"/>
        <updated>2025-03-11T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[DynamicPDF PHP client library update adds simplified single-import usage for easier PDF generation and API integration.]]></summary>
        <content type="html"><![CDATA[<p>The DynamicPDF API now offers a simple option for using the PHP Client Library using the <code>require_once</code> PHP directive with the newly added <code>DpdfApi.php</code> file in the client library's GitHub (<a href="https://github.com/dynamicpdf-api/php-client" target="_blank" rel="noopener noreferrer" class="">php-client</a>) project.</p>
<p>You can now use the DynamicPDF API PHP Client Library without using Composer. We have streamlined the installation process and made it easier for clients who cannot or do not wish to use Composer to install the client library.</p>
<p>Download the PHP client library from GitHub, unzip, and begin using it.</p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="installation">Installation<a href="https://www.dynamicpdf.com/blog/php-manual-import/#installation" class="hash-link" aria-label="Direct link to Installation" title="Direct link to Installation" translate="no">​</a></h2>
<p>Follow these steps to install the client library.</p>
<ul>
<li class="">Download the zip file from GitHub (<a href="https://github.com/dynamicpdf-api/php-client" target="_blank" rel="noopener noreferrer" class="">php-client</a>).</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig1-4432af25988fa41dd398770bda1ac5a8.png" width="492" height="407" class="img__Ss2"></p>
<ul>
<li class="">Unzip in the directory of your choice.</li>
<li class="">Use the <code>require_once</code> directive to use the library.</li>
<li class="">Test the results by executing the <code>PdfExample.php file</code> (be certain to set your API key first).</li>
</ul>
<p>All necessary DynamicPDF API PHP Client Library files are included when you require the <code>DpdfApi.php</code> file.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig4-4a3cd0504cbd371e966297c99c25f06e.png" width="320" height="468" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="example">Example<a href="https://www.dynamicpdf.com/blog/php-manual-import/#example" class="hash-link" aria-label="Direct link to Example" title="Direct link to Example" translate="no">​</a></h2>
<p>In this example you create a single PHP page named <code>GetImageInfo.php</code> to obtain image information from the DynamicPDF API <code>image-info</code> endpoint.</p>
<ul>
<li class="">Download the PHP client library as a zip file and unzip to: <code>c:/temp/php-example</code>.</li>
<li class="">Open the <code>php-example</code> folder in Visual Studio Code.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig2-604ef630f99da681ff82d0c184310a37.png" width="425" height="429" class="img__Ss2"></p>
<ul>
<li class="">Open <code>PdfExample.php</code> and add your API Key.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig3-b3610bf69187ec747dcdccc99aee814a.png" width="1514" height="679" class="img__Ss2"></p>
<ul>
<li class="">Run the application,<code>php PdfExample.php</code> and it should produce the PDF file <code>php-pdf-example-output.pdf</code>.</li>
<li class="">Create another file named <code>GetImageInfo.php</code> and add the following code, replacing the API key with your own.</li>
</ul>
<div class="language-PHP language-php codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-php codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">&lt;?php</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">require_once 'src/DpdfApi.php';</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">use DynamicPDF\Api\ImageResource;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">use DynamicPDF\Api\ImageInfo;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">class GetImageInfo</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">{</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    public static function Run(string $apikey, string $inputPath)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        $imageResource = new ImageResource($inputPath . "dynamicpdfLogo.png");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        $imageInfo = new ImageInfo($imageResource);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        $imageInfo-&gt;ApiKey = $apikey;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        $response = $imageInfo-&gt;Process();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        if($response-&gt;IsSuccessful)</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            echo ($response-&gt;JsonContent);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        } else {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            echo("Error: ");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            echo($response-&gt;StatusCode);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">            echo($response-&gt;ErrorMessage);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">}</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">GetImageInfo::Run("DP.--api-key--", "./");</span><br></div></code></pre></div></div>
<p>Notice the added statement: <code>require_once 'src/DpdfApi.php';</code> that ensures your PHP includes the DynamicPDF API PHP Client Library.</p>
<ul>
<li class="">Save the file and also add the file <code>dynamicpdfLogo.png</code> to the folder.</li>
</ul>
<p>You can get the <code>dynamicpdfLogo.png</code> file from the <a href="https://github.com/dynamicpdf-api/php-client-examples" target="_blank" rel="noopener noreferrer" class="">php-client-examples</a> GitHub project's <code>resources/get-image-info-image-info-endpoint</code> folder (<a href="https://github.com/dynamicpdf-api/php-client-examples/blob/main/resources/get-image-info-image-info-endpoint/dynamicpdfLogo.png" target="_blank" rel="noopener noreferrer" class="">dynamicPdfLogo.png</a>).</p>
<ul>
<li class="">Run the PHP file <code>php GetImageInfo.php</code> and the image info appears as a JSON document.</li>
</ul>
<div class="language-json codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-json codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token punctuation" style="color:#393A34">[</span><span class="token punctuation" style="color:#393A34">{</span><span class="token property" style="color:#36acaa">"pageNumber"</span><span class="token operator" style="color:#393A34">:</span><span class="token number" style="color:#36acaa">1</span><span class="token punctuation" style="color:#393A34">,</span><span class="token property" style="color:#36acaa">"width"</span><span class="token operator" style="color:#393A34">:</span><span class="token number" style="color:#36acaa">262</span><span class="token punctuation" style="color:#393A34">,</span><span class="token property" style="color:#36acaa">"height"</span><span class="token operator" style="color:#393A34">:</span><span class="token number" style="color:#36acaa">250</span><span class="token punctuation" style="color:#393A34">,</span><span class="token property" style="color:#36acaa">"horizondalDpi"</span><span class="token operator" style="color:#393A34">:</span><span class="token number" style="color:#36acaa">300</span><span class="token punctuation" style="color:#393A34">,</span><span class="token property" style="color:#36acaa">"verticalDpi"</span><span class="token operator" style="color:#393A34">:</span><span class="token number" style="color:#36acaa">300</span><span class="token punctuation" style="color:#393A34">,</span><span class="token property" style="color:#36acaa">"numberOfComponents"</span><span class="token operator" style="color:#393A34">:</span><span class="token number" style="color:#36acaa">3</span><span class="token punctuation" style="color:#393A34">,</span><span class="token property" style="color:#36acaa">"bitsPerComponent"</span><span class="token operator" style="color:#393A34">:</span><span class="token number" style="color:#36acaa">8</span><span class="token punctuation" style="color:#393A34">,</span><span class="token property" style="color:#36acaa">"colorSpace"</span><span class="token operator" style="color:#393A34">:</span><span class="token string" style="color:#e3116c">"indexed"</span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">]</span><br></div></code></pre></div></div>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="PDF" term="PDF"/>
        <category label="DynamicPDF" term="DynamicPDF"/>
        <category label="ceTe Software" term="ceTe Software"/>
        <category label="PHP" term="PHP"/>
        <category label="API" term="API"/>
        <category label="REST" term="REST"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[The DynamicPDF API (Self-Hosted) - Core Features]]></title>
        <id>https://www.dynamicpdf.com/blog/aws-managed/</id>
        <link href="https://www.dynamicpdf.com/blog/aws-managed/"/>
        <updated>2024-12-13T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Deploy DynamicPDF API workloads on AWS using serverless functions, containers, and automated PDF pipelines.]]></summary>
        <content type="html"><![CDATA[<p>The DynamicPDF (Self-Hosted) - Core Features is now available on the AWS Marketplace.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig1-18dc6caca7abb4628f158e05794d0fc1.png" width="400" height="341" class="img__Ss2"></p>
<p>We here at ceTe Software are excited to announce our latest PDF offering - The DynamicPDF API (Self-Hosted) - Core Features.  Now you can have your own private version of the DynamicPDF API.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig2-6647b8402e1fa51c2c97129aead08216.png" width="900" height="297" class="img__Ss2"></p>
<p>The DynamicPDF API (Self-Hosted) - Core Features provides a robust and scalable solution for your PDF processing needs. Our flexible RESTful APIs integrate with AWS to easily add PDF functionality to your existing software. Deploy our AMI product to quickly create an EC2 instance within your AWS account and start enjoying immediate access to fully functional endpoints.</p>
<p>And our six client libraries make integrating your applications with your instance's endpoints a breeze. We offer client libraries for Node.js, .NET, Java, PHP, Go and Python.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/client-libraries-7bb062911b2a4b1545a833f7446cf796.png" width="711" height="105" class="img__Ss2"></p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="highlights">Highlights<a href="https://www.dynamicpdf.com/blog/aws-managed/#highlights" class="hash-link" aria-label="Direct link to Highlights" title="Direct link to Highlights" translate="no">​</a></h3>
<ul>
<li class="">SOLUTIONS: Create PDFs and create dynamic reports. Merge PDFs and other resources. Add Outlines and Bookmarks to PDFs. Password protect and encrypt PDFs. Convert images to PDFs. Retrieve text, metadata, and XMP From PDFs. Retrieve image Information. Complete forms and remove or flatten form fields. Add text, images, lines, and rectangles to PDFs. Delete pages from a PDF or split a PDF into multiple PDFs. Add Barcodes to PDFs.</li>
</ul>
<ul>
<li class="">SUPPORT: You also have free access to our client libraries for Node.js, .NET, Java, PHP, Go, and Python. These libraries allow you to easily integrate your end-user applications with your DynamicPDF API (Self-Hosted) endpoints. You can also use our DynamicPDF Designer graphic report designer to design dynamic PDF reports without programming quickly. And you have access to the same support we have provided our clients for over 20 years.</li>
<li class="">PROVEN: With over 22 years of experience writing great PDF SDKs and trusted by over 10,000 customers worldwide, the DynamicPDF API (Self-Hosted) enables your organization to host private, dedicated EC2 instances using the same proven technology as our SDKs.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="more-information">More Information<a href="https://www.dynamicpdf.com/blog/aws-managed/#more-information" class="hash-link" aria-label="Direct link to More Information" title="Direct link to More Information" translate="no">​</a></h2>
<p>For more information, refer to our product page on the AWS Marketplace and our documentation.</p>
<ul>
<li class="">
<p><a href="https://aws.amazon.com/marketplace/pp/prodview-t6syqoca3u5oe?sr=0-1&amp;ref_=beagle&amp;applicationId=AWSMPContessa" target="_blank" rel="noopener noreferrer" class="">AWS Marketplace product page</a></p>
</li>
<li class="">
<p>(<a href="https://dpdf.io/docs/usersguide/managed/self-hosted/aws-marketplace/self-hosted-core-features" target="_blank" rel="noopener noreferrer" class="">DynamicPDF API (Self-Hosted) - Core Features</a>)</p>
</li>
</ul>
<p>Also be certain to check out <a href="https://dpdf.io/solutions" target="_blank" rel="noopener noreferrer" class="">DynamicPDF Solutions</a> to see what DynamicPDF API can do for your organization.</p>
<div class="cloud-api-social-follow"><strong><a href="https://www.linkedin.com/company/dynamicpdf" target="_blank" rel="noreferrer">LinkedIn</a> · <a href="https://www.facebook.com/dynamicpdf" target="_blank" rel="noreferrer">Facebook</a> · <a href="https://twitter.com/dynamicpdf" target="_blank" rel="noreferrer">X</a> · <!-- -->Follow us on social media for the latest news!</strong></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="AWS" term="AWS"/>
        <category label="PDF" term="PDF"/>
        <category label="Self-Hosted" term="Self-Hosted"/>
        <category label="EC2" term="EC2"/>
        <category label="AMI" term="AMI"/>
        <category label="DynamicPDF" term="DynamicPDF"/>
        <category label="ceTe Software" term="ceTe Software"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[JSON Layout Data Now Supports Objects]]></title>
        <id>https://www.dynamicpdf.com/blog/json-objects/</id>
        <link href="https://www.dynamicpdf.com/blog/json-objects/"/>
        <updated>2024-11-11T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Learn how to send JSON objects to DynamicPDF API templates for dynamic PDF generation through DLEX layouts.]]></summary>
        <content type="html"><![CDATA[
<p>The DynamicPDF API now supports JSON data with named objects and allows referring to data elements using dot (.) notation. This change allows more flexibility in structuring JSON layout data used to create reports using <strong>Designer</strong>.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/figure1-458ab5a4299390a45e68d05dd505bbda.png" width="413" height="223" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="dot-notation">Dot notation<a href="https://www.dynamicpdf.com/blog/json-objects/#dot-notation" class="hash-link" aria-label="Direct link to Dot notation" title="Direct link to Dot notation" translate="no">​</a></h2>
<p>When using <strong>Designer</strong>, you can now use dot (.)  notation to refer to an object's name to access its properties. For example, consider an object named <code>CustomerDetail</code>.</p>
<div class="language-json codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-json codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token property" style="color:#36acaa">"CustomerDetail"</span><span class="token operator" style="color:#393A34">:</span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"Name"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"John Doe"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"CompanyName"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"Rattlesnake Canyon Grocery"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">,</span><br></div></code></pre></div></div>
<p>You use: <code>CustomerDetail.Name</code> and <code>CustomerDetail.CompanyName</code> to access the <code>CustomerDetail</code> properties.</p>
<p>You can also refer to nested objects using dot notation.  For example, consider the following <code>Content</code> object.</p>
<div class="language-json codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-json codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token property" style="color:#36acaa">"Content"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"Description"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"Coffee beans from Brazil."</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"Origin"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"Country"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"Brazil"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"State"</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">:</span><span class="token string" style="color:#e3116c">"Sao Paulo"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token property" style="color:#36acaa">"Type"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"coffee"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><br></div></code></pre></div></div>
<p>The <code>Content</code> object contains a nested <code>Origin</code> object; therefore to refer to the <code>Country</code> or <code>State</code> property you use<code> Content.Origin.Country</code> or <code>Content.Origin.State</code> when using it in an array as the details of a report.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Refer to the <a href="https://dpdf.io/docs/usersguide/designer/json-data" target="_blank" rel="noopener noreferrer" class="">JSON documentation</a> for more information on using JSON in a report.</p></div></div>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="example---creating-an-invoice">Example - Creating an Invoice<a href="https://www.dynamicpdf.com/blog/json-objects/#example---creating-an-invoice" class="hash-link" aria-label="Direct link to Example - Creating an Invoice" title="Direct link to Example - Creating an Invoice" translate="no">​</a></h2>
<p>Consider the following JSON document. It consists of an invoice containing information about the invoice and the customer, followed by the orders. The top-level data consists of the <code>OrderID</code>, <code>OrderDate</code>, <code>CustomerID</code>, <code>Freight</code>, and <code>CustomerDetail</code> properties. This is the top-level data for the report. The invoice line items consist of an array (<code>OrderDetails</code>) of unnamed orders. Each order has order details properties, one of which is an object (<code>Product</code>).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/figure2-d80ad636d5122b4cadb976bdbe403272.png" width="777" height="884" class="img__Ss2"></p>
<p>After creating a new dlex file in Designer and loading the JSON as the layout data, the <strong>Data Explorer</strong> reflects the following JSON hierarchy.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/figure3-357d7992adb19a3e3208c95db7e92f6b.png" width="209" height="252" class="img__Ss2"></p>
<p>The report's <strong>dataName</strong> property remains blank, as it is the top-level data. Instead, the <code>OrderDetails</code> array's records are the data rows we need to populate the report. However, recall that a header is repeated for every new page of data rows in the <strong>Detail</strong> section. However, we wish to put the invoice details in the header and not have the data repeat if there are multiple pages of data. Therefore, we added a <strong>Subreport</strong> to the report's <strong>Detail</strong> section.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/figure4-5e82e90814b10eb5f5575c78958cbdc3.png" width="990" height="703" class="img__Ss2"></p>
<p>The report's <strong>Detail</strong> section will not repeat, as it contains a <strong>Subreport</strong> and no data elements. Instead, the subreport's <strong>Detail</strong> section contains the data rows.</p>
<p>The subreport's <strong>dataName</strong> is assigned the <code>OrderDetails</code> array, thus ensuring it is used to generate the data rows. The subreport's header contains labels for each data element; each row contains the order's details.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/figure5-2df4544ad2b6da692c1e6ae7f45e282a.png" width="990" height="274" class="img__Ss2"></p>
<p>The <strong>Report</strong> <strong>Header</strong> contains the order details and the customer information. Because <code>Customer</code> is an object, you refer to its properties using dot (.) notation.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/figure6-f178f5b2fce013ff06b91f9bfde3beda.png" width="990" height="397" class="img__Ss2"></p>
<p>The report's <strong>Detail</strong> section contains the <strong>Subreport</strong>. Because the data in the <code>OrderDetails</code> elements have a <code>Product</code> class, it also requires dot (.) notation when referring to the <code>Product</code> element's properties.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/figure7-1b0e66e33ac0717473b549f426f83043.png" width="990" height="160" class="img__Ss2"></p>
<p>The produced PDF document produces a report consisting of the invoice data followed by a product listing.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/figure8-075d747c3be59d46b863ceddfa82976e.png" width="990" height="776" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="more-information">More Information<a href="https://www.dynamicpdf.com/blog/json-objects/#more-information" class="hash-link" aria-label="Direct link to More Information" title="Direct link to More Information" translate="no">​</a></h2>
<p>The DynamicPDF Designer is a powerful graphical tool for creating reports without requiring coding. It supports complex JSON, and now makes creating reports even easier by allowing object hierarchies.</p>
<div class="cloud-api-social-follow"><strong><a href="https://www.linkedin.com/company/dynamicpdf" target="_blank" rel="noreferrer">LinkedIn</a> · <a href="https://www.facebook.com/dynamicpdf" target="_blank" rel="noreferrer">Facebook</a> · <a href="https://twitter.com/dynamicpdf" target="_blank" rel="noreferrer">X</a> · <!-- -->Follow us on social media for the latest news!</strong></div>
<p>For more information, refer to our many Designer tutorials and also be certain to check out <a href="https://dpdf.io/designersolutions" target="_blank" rel="noopener noreferrer" class="">DynamicPDF Designer Solutions</a> to see what DynamicPDF API can do for your organization. And if you are already using Designer, then be certain to review the changes to the documentation (<a href="https://dpdf.io/docs/usersguide/designer/json-data" target="_blank" rel="noopener noreferrer" class="">JSON documentation</a>) for more information on using JSON in a report.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="Designer" term="Designer"/>
        <category label="JSON" term="JSON"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Announcing the pdf-image Endpoint]]></title>
        <id>https://www.dynamicpdf.com/blog/pdf-image-endpoint/</id>
        <link href="https://www.dynamicpdf.com/blog/pdf-image-endpoint/"/>
        <updated>2024-10-03T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[DynamicPDF Rasterizer update adds higher-quality image conversion and refined PDF rendering options for complex documents.]]></summary>
        <content type="html"><![CDATA[<p>We're pleased to announce the public release of the <strong>pdf-image</strong> endpoint for rasterizing PDF documents into images.</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-image" target="_blank" rel="noopener noreferrer" class="">pdf-image endpoint documentation</a></li>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/client-libraries/client-api-pdf-image" target="_blank" rel="noopener noreferrer" class="">pdf-image Client Library documentation</a></li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/pdf-image-small-4dcc1500436c6fbeebe7506255d94536.png" width="623" height="429" class="img__Ss2"></p>
<p>The <strong>pdf-image</strong> endpoint is our exciting new offering, designed to make the process of converting your PDF documents into images as easy as possible. This endpoint offers a range of benefits, including the ability to specify the image type to produce, limit PDF pages to rasterize, set the desired image size, and modify the output height and width. The supported image output types are jpeg, gif, bmp, png, and tiff. The endpoint rasterizes each page into a different image, base64 encodes the image, and then places them in a JSON document.</p>
<p>Features include:</p>
<ul>
<li class="">specifying the image type to produce,</li>
<li class="">specify start page and end page to limit PDF pages to rasterize,</li>
<li class="">setting the desired image size, horizontal, and vertical dpi,</li>
<li class="">modifying the output height and width,</li>
<li class="">and many more options to modify the images produced.</li>
</ul>
<p>For a complete property listing, we encourage you to refer to our comprehensive online documentation. Whether you prefer to call the <strong>pdf-image</strong> endpoint directly or use one of our client libraries, our online documentation is there to support you with more information and examples.</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-image" target="_blank" rel="noopener noreferrer" class="">pdf-image endpoint documentation</a></li>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/client-libraries/client-api-pdf-image" target="_blank" rel="noopener noreferrer" class="">pdf-image Client Library documentation</a></li>
</ul>
<div class="cloud-api-social-follow"><strong><a href="https://www.linkedin.com/company/dynamicpdf" target="_blank" rel="noreferrer">LinkedIn</a> · <a href="https://www.facebook.com/dynamicpdf" target="_blank" rel="noreferrer">Facebook</a> · <a href="https://twitter.com/dynamicpdf" target="_blank" rel="noreferrer">X</a> · <!-- -->Follow us on social media for the latest news!</strong></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="DynamicPDF API" term="DynamicPDF API"/>
        <category label="PDF" term="PDF"/>
        <category label="Dashboard" term="Dashboard"/>
        <category label="Portal" term="Portal"/>
        <category label="rasterization" term="rasterization"/>
        <category label="REST" term="REST"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Using PowerShell with DynamicPDF API]]></title>
        <id>https://www.dynamicpdf.com/blog/powershell/</id>
        <link href="https://www.dynamicpdf.com/blog/powershell/"/>
        <updated>2024-07-05T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Learn how to call the DynamicPDF API using PowerShell to generate, merge, and automate PDF document workflows.]]></summary>
        <content type="html"><![CDATA[
<p>Use Microsoft's PowerShell to test DynamicPDF API endpoints from the command line quickly.</p>
<p><img decoding="async" loading="lazy" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABMCAMAAACsw+I9AAADAFBMVEUAAAAAAFUAAKoAAP8AJAAAJFUAJKoAJP8ASQAASVUASaoASf8AbQAAbVUAbaoAbf8AkgAAklUAkqoAkv8AtgAAtlUAtqoAtv8A2wAA21UA26oA2/8A/wAA/1UA/6oA//8kAAAkAFUkAKokAP8kJAAkJFUkJKokJP8kSQAkSVUkSaokSf8kbQAkbVUkbaokbf8kkgAkklUkkqokkv8ktgAktlUktqoktv8k2wAk21Uk26ok2/8k/wAk/1Uk/6ok//9JAABJAFVJAKpJAP9JJABJJFVJJKpJJP9JSQBJSVVJSapJSf9JbQBJbVVJbapJbf9JkgBJklVJkqpJkv9JtgBJtlVJtqpJtv9J2wBJ21VJ26pJ2/9J/wBJ/1VJ/6pJ//9tAABtAFVtAKptAP9tJABtJFVtJKptJP9tSQBtSVVtSaptSf9tbQBtbVVtbaptbf9tkgBtklVtkqptkv9ttgBttlVttqpttv9t2wBt21Vt26pt2/9t/wBt/1Vt/6pt//+SAACSAFWSAKqSAP+SJACSJFWSJKqSJP+SSQCSSVWSSaqSSf+SbQCSbVWSbaqSbf+SkgCSklWSkqqSkv+StgCStlWStqqStv+S2wCS21WS26qS2/+S/wCS/1WS/6qS//+2AAC2AFW2AKq2AP+2JAC2JFW2JKq2JP+2SQC2SVW2Saq2Sf+2bQC2bVW2baq2bf+2kgC2klW2kqq2kv+2tgC2tlW2tqq2tv+22wC221W226q22/+2/wC2/1W2/6q2///bAADbAFXbAKrbAP/bJADbJFXbJKrbJP/bSQDbSVXbSarbSf/bbQDbbVXbbarbbf/bkgDbklXbkqrbkv/btgDbtlXbtqrbtv/b2wDb21Xb26rb2//b/wDb/1Xb/6rb////AAD/AFX/AKr/AP//JAD/JFX/JKr/JP//SQD/SVX/Sar/Sf//bQD/bVX/bar/bf//kgD/klX/kqr/kv//tgD/tlX/tqr/tv//2wD/21X/26r/2////wD//1X//6r////qm24uAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH6AcDESY38NGv3QAABFdJREFUWIWtWTGS6yAMTe1CvgkUucffmXAUCo5CkYNswVEoOIo/GGwjCYydDRriGVvJs/QkIchjaY6w+H36P11D/LVHEyF/Zo3Qfo3LIzRBwuKsiuOl1qGjmE+ntsmeFoiSMIP8isygXMOS4AVMIj7/0pxUYCBhUVLEd/je/GGWhMVymwXMq22fieKcBJXQozzFcdV6u4vvX7lKxS3xzKegYxAuTsCHnBhOvGU+teWJ/JATyy0xxKOg92erLffF8ehSm+83qV5A0GcXBGIEUxAncY5Mqnro4T4v8Fo4CBCfKvL0LidgOYhhfvcI5Xa+iF8OooHEORj03N7Ol0BBfOSWxblFKOZeXZuUZ5a4J/fr9CYoNzgRcs0ADGKnhl8nh3RUS6cn2Q8YRLdj3WMUaGq1xTEQn96y5VuE4p+XeQEROPGi59uA1K7niQnMksZakmUWtVqqCxc5yZUPg0Av3ucnQaH51L6CoyBheUHXv2sNqm2+wsskGUjk/cS/syYoVzgpla+2xJ36l6DoeczIlHlHlthBzOMCo+UoX2D7Rm2JHvkZoygY5onjlqiBj0GSAjMP9JVnlrhx3D8xijjnBdTCLFnXvUHcK1zG5Kk+bO7dQcKixdDHZX3Yh7/G4WFJypJx7AMO5HD6HU9BYjcvhpzI3BFW492vYofVhyVuGPcl+mkgdzV3ow9L7IiPfYYaRENXz3JLLu9LUCsWm6iu7h7vO0jmfShiwrni+7p5VcQgZ/khen3Y0R8z/bzlwCC279tjgsAp76Bfv2KwM0tOfLvN2BkjznM/2Z3H+xSQEP6NM0TgRPSDDoyBrL3jID9IdXTPfoYkqYJws+Q9WktI1TrLj6x/8L5bokd84DwPo7UEraOPzb+nfMw0qob7R7GtirW7+vGe3gsn+Ul/duRT7d0CYk/8O0mcgE5d6ble1RnWBgJd304Kuyr3sud8JA4PjAwSUufRq1WabByu9cHrXhFb4rurAmAzvBxk0y6BgnjX8S0IbIY9qVWYR5RVj+Lnpl8lWdD1mIttom9mTkxzr0g6xt/LuxK6Z34UNvk5Fe2xzPqOV/fvjoE4yf1a155kbMrxCZrS4jIEBtLwK12d5njPWJfkXU37tqbBCU7fx9o7zsSnM96J5nMIEmm1lYwTBnKcO+6Ca1XZgWHbCAoRrJssCYL4FO918/5wktg4BKIIn5KBlN6xyg+kokutwsh4/BBOSNVOltATlRrE73sQvMlGw9MMMpi+ZIkicQ7HuZDrVCM8UnSiPMFZnEAaZyXl97yucoC0p7UhlNN6VSwg7Nxx86kj+3rlfGDinS0V4uCU1IoEws8do651TglyF4D8Ws4Pdi657xURCI1yuWVX6z6fTIdm1COEF/bnFyYDubhXvDM1/R/sUfL9m0Jia+UkV667/4v0+q1WjXuEdA7XXic+kVgbqR3JkhD7CGO0UV+YxjVLdcr4Zfvn8q+ylM8GSBmH1l+uzfEf4hZAOXh0XEwAAAAASUVORK5CYII=#center" width="100" height="76" class="img__Ss2"></p>
<p>Although Postman and cURL are powerful ways to test your REST calls to the DynamicPDF API, did you know you can also use PowerShell?  In this post I show you just how easy it is to test the DynamicPDF API endpoints using PowerShell.</p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="powershell">Powershell<a href="https://www.dynamicpdf.com/blog/powershell/#powershell" class="hash-link" aria-label="Direct link to Powershell" title="Direct link to Powershell" translate="no">​</a></h2>
<p>PowerShell is Microsoft's command-line shell built on .NET and is open-source and cross-platform, meaning you can also use it on MacOS and Linux.</p>
<p>PowerShell performs tasks called cmdlets, specialized .NET classes that perform a specific functionality. You can use these cmdlets directly via the PowerShell command line, via scripts, or packaged into modules that work with the .NET API.</p>
<ul>
<li class="">Refer to <a href="https://learn.microsoft.com/en-us/powershell/scripting/overview?view=powershell-7.4" target="_blank" rel="noopener noreferrer" class="">Microsoft's PowerShell documentation</a> for more information on using PowerShell.</li>
</ul>
<p>Here, we use the <code>Invoke-RestMethod</code> cmdlet to send HTTPS POST requests to the DynamicPDF API REST endpoints.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Do not be misled by the simplicity of the command-line examples presented here. PowerShell is also a powerful scripting language designed to be easily integrated with .NET applications.</p></div></div>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="invoke-restmethod">Invoke-RestMethod<a href="https://www.dynamicpdf.com/blog/powershell/#invoke-restmethod" class="hash-link" aria-label="Direct link to Invoke-RestMethod" title="Direct link to Invoke-RestMethod" translate="no">​</a></h3>
<p>The <code>Invoke-RestMethod</code> sends HTTP/HTTPS requests to RESTful web services. When used with the <code>-InFile</code> parameter, it sends binary directly as the body of the POST request. When used with the <code>-Form</code> parameter combined with the  <code>-ContentType "multipart/form-data"</code> parameter a POST request's form fields are sent as the body.</p>
<p>The DynamicPDF API has two variations for sending POST requests to its endpoints. For the <code>image-info</code>, <code>pdf-info</code>, <code>pdf-text</code>, and <code>pdf-xmp</code> endpoints, the POST requests send the associated binary resource directly as the body. Therefore, we use the <code>-InFile</code> parameter with <code>Invoke-RestMethod</code>. For the <code>dlex-layout</code> and <code>pdf</code> endpoints, the binary resource is sent as form data from a form submission, and therefore, we use the <code>-Form</code> parameter.</p>
<div class="theme-admonition theme-admonition-danger admonition_IZjC alert alert--danger"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"></path></svg></span>danger</div><div class="admonitionContent_bl22"><p>The <code>Invoke-RestMethod</code> <code>-Form</code> parameter requires PowerShell version 6.x or greater.  Here I used PowerShell version 7.5</p></div></div>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="-infile-parameter">-InFile Parameter<a href="https://www.dynamicpdf.com/blog/powershell/#-infile-parameter" class="hash-link" aria-label="Direct link to -InFile Parameter" title="Direct link to -InFile Parameter" translate="no">​</a></h3>
<p>For the <code>image-info</code>, <code>pdf-info</code>, <code>pdf-text</code>, and <code>pdf-xmp</code> endpoints we use the <code>Invoke-RestMethod</code> as a POST request with the <code>-InFile</code> parameter. The <code>-InFile</code> parameter sends the body content as the type specified by the <code>-ContentType</code> parameter. For example, the following command sends an HTPS POST request to the <code>pdf-text</code> endpoint.</p>
<div class="language-bash codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-bash codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">Invoke-RestMethod -Method Post -Headers @{"Authorization" = "Bearer DP--api-key--"} -Uri "https://api.dpdf.io/v1.0/pdf-text" -Infile "C:\temp\dynamicpdf-api-samples\powershell-example\fw4.pdf" -ContentType "application/pdf"</span><br></div></code></pre></div></div>
<p>Recall that these four DynamicPDF API endpoints take binary as the request's body.</p>
<table><thead><tr><th>Endpoint</th><th>CONTENT-TYPE</th></tr></thead><tbody><tr><td><code>image-info</code></td><td><code>image/png</code>, <code>image/gif</code>, etc.</td></tr><tr><td><code>pdf-info</code>,<code>pdf-xmp</code>, <code>pdf-text</code></td><td><code>application/pdf</code></td></tr></tbody></table>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="-form-parameter">-Form Parameter<a href="https://www.dynamicpdf.com/blog/powershell/#-form-parameter" class="hash-link" aria-label="Direct link to -Form Parameter" title="Direct link to -Form Parameter" translate="no">​</a></h3>
<p>For the <code>dlex-layout</code> and <code>pdf</code> endpoints, we use the <code>Invoke-RestMethod</code> as a POST request with the <code>-Form</code> parameter. The <code>-Form</code> parameter, combined with the  <code>-ContentType "multipart/form-data"</code> parameter, sends the body content as a hashtable of fields and values in a form submission.</p>
<p>The parameter's syntax is an array of name/value pairs separated by a semicolon.</p>
<div class="language-bash codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-bash codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">-Form @{&lt;name&gt; = "&lt;value&gt;"; &lt;name&gt; = "&lt;value&gt;"; ...}</span><br></div></code></pre></div></div>
<p>Form fields with the same name but multiple values separate the values by a comma.</p>
<div class="language-bash codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-bash codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">-Form @{&lt;name&gt; = "&lt;value&gt;", "&lt;value&gt;", ... ; &lt;name&gt; = "&lt;value&gt;"; ...}</span><br></div></code></pre></div></div>
<p>To upload a file in a form submission,  specify <code>Get-Item</code> and <code>-Path</code> for a form field.</p>
<div class="language-bash codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-bash codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">-Form @{&lt;name&gt; = Get-Item -Path "&lt;path&gt;"}</span><br></div></code></pre></div></div>
<p>Separate the paths with a comma for multiple files with the same form field name.</p>
<div class="language-bash codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-bash codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">-Form @{&lt;name&gt; = Get-Item -Path "&lt;path&gt;", "&lt;path&gt;", ...}</span><br></div></code></pre></div></div>
<p>The syntax will become clearer after the following examples.</p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="examples">Examples<a href="https://www.dynamicpdf.com/blog/powershell/#examples" class="hash-link" aria-label="Direct link to Examples" title="Direct link to Examples" translate="no">​</a></h2>
<p>Download all PowerShell commands used in this post from Github (<a href="https://github.com/dynamicpdf-api/dotnet-client-examples/blob/main/DynamicPdfClientLibraryExamples/Resources/powershell-example/powershell-examples.txt" target="_blank" rel="noopener noreferrer" class="">powershell-examples.txt</a>). This file contains examples of calling all of the DynamicPDF API REST endpoints using PowerShell.</p>
<p>You can download the resources used in this post from the <code>powershell-examples</code> folder on GitHub, <a href="https://github.com/dynamicpdf-api/dotnet-client-examples/tree/main/DynamicPdfClientLibraryExamples/Resources/powershell-example" target="_blank" rel="noopener noreferrer" class="">powershell-example</a>.</p>
<p>I assume a path of c:/temp/dynamicpdf-api-samples/powershell-example for all resources used on your local filesystem.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig1-3d1d929def885af4b36ab0937a625a8a.png" width="897" height="372" class="img__Ss2"></p>
<p>You must also have the following sample loaded in your cloud storage space in the DynamicPDF API Portal to run the example using the <code>dlex-layout</code> endpoint.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig2-279547f724d8e497bf62c4dca32a0216.png" width="952" height="535" class="img__Ss2"></p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-info-pdf-text-pdf-xmp-and-image-info"><code>pdf-info</code>, <code>pdf-text</code>, <code>pdf-xmp</code>, and <code>image-info</code><a href="https://www.dynamicpdf.com/blog/powershell/#pdf-info-pdf-text-pdf-xmp-and-image-info" class="hash-link" aria-label="Direct link to pdf-info-pdf-text-pdf-xmp-and-image-info" title="Direct link to pdf-info-pdf-text-pdf-xmp-and-image-info" translate="no">​</a></h3>
<p>These four DynamicPDF API endpoints all use the <code>-Infile</code> parameter to upload a file directly to the endpoint using an POST request.</p>
<table><thead><tr><th>endpoint</th><th>Command</th><th></th></tr></thead><tbody><tr><td><code>image-info</code></td><td><code>Invoke-RestMethod -Method Post -Headers @{"Authorization" = "Bearer DP--api-key--"} -Uri "https://api.dpdf.io/v1.0/image-info" -Infile "C:\temp\dynamicpdf-api-samples\powershell-example\dynamicpdfLogo.png" -ContentType "image/png"</code></td><td></td></tr><tr><td><code>pdf-info</code></td><td><code>Invoke-RestMethod -Method Post -Headers @{"Authorization" = "Bearer DP--api-key--"} -Uri "https://api.dpdf.io/v1.0/pdf-info" -Infile "C:\temp\dynamicpdf-api-samples\powershell-example\fw4.pdf" -ContentType "application/pdf" </code></td><td></td></tr><tr><td><code>pdf-text</code></td><td><code>Invoke-RestMethod -Method Post -Headers @{"Authorization" = "Bearer DP--api-key--"} -Uri "https://api.dpdf.io/v1.0/pdf-text" -Infile "C:\temp\dynamicpdf-api-samples\powershell-example\fw4.pdf" -ContentType "application/pdf"</code>  |Â&nbsp;<code>Format-Table -Wrap -Autosize</code></td><td><em>format to display</em></td></tr><tr><td><code>pdf-text</code></td><td><code>Invoke-RestMethod -Method Post -Headers @{"Authorization" = "Bearer DP.--api-key--"} -Uri "https://api.dpdf.io/v1.0/pdf-text" -Infile "C:\temp\dynamicpdf-api-samples\powershell-example\fw4.pdf" -ContentType "application/pdf" -Outfile "C:\temp\dynamicpdf-api-samples\powershell-example\output-two.json"</code></td><td><em>write to file</em></td></tr><tr><td><code>pdf-xml</code></td><td><code>Invoke-RestMethod -Method Post -Headers @{"Authorization" = "Bearer DP.--api-key--"} -Uri "https://api.dpdf.io/v1.0/pdf-xmp" -Infile "C:\temp\dynamicpdf-api-samples\powershell-example\fw4.pdf" -ContentType "application/pdf" -Outfile "C:\temp\dynamicpdf-api-samples\powershell-example\output-three.xml"</code></td><td><em>write to file</em></td></tr></tbody></table>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-and-dlex-layout"><code>pdf</code> and <code>dlex-layout</code><a href="https://www.dynamicpdf.com/blog/powershell/#pdf-and-dlex-layout" class="hash-link" aria-label="Direct link to pdf-and-dlex-layout" title="Direct link to pdf-and-dlex-layout" translate="no">​</a></h3>
<p>These two DynamicPDF API endpoints use the <code>-Form</code> parameter to upload a file as a form field submission. Note that they also specify the <code>Content-Type</code> as <code>multipart/form-data</code>.</p>
<table><thead><tr><th>Endpoint</th><th>Command</th><th></th></tr></thead><tbody><tr><td><code>dlex-layout</code></td><td><code>Invoke-RestMethod -Method Post -Headers @{"Authorization" = "Bearer DP.--api-key--"} -Uri "https://api.dpdf.io/v1.0/dlex-layout" -Form @{LayoutData = Get-Item -Path "C:\temp\dynamicpdf-api-samples\powershell-example\creating-pdf-dlex-layout.json"; DlexPath = "samples/creating-pdf-dlex-layout-endpoint/creating-pdf-dlex-layout.dlex"} -ContentType "multipart/form-data" -Outfile "C:\temp\dynamicpdf-api-samples\powershell-example\output-three.pdf"</code></td><td><em>create PDF</em></td></tr><tr><td><code>pdf</code></td><td><code>Invoke-RestMethod -Method Post -Headers @{"Authorization" = "Bearer DP.--api-key--"} -Uri "https://api.dpdf.io/v1.0/pdf" -Form @{Instructions = Get-Item -Path "C:\temp\dynamicpdf-api-samples\powershell-example\instructions.json"; Resource = Get-Item -Path "C:\temp\dynamicpdf-api-samples\excel-word-conversion\sample-data.xlsx","C:\temp\dynamicpdf-api-samples\powershell-example\sample-doc.docx"} -ContentType "multipart/form-data" -Outfile "C:\temp\dynamicpdf-api-samples\powershell-example\output-one.pdf"</code></td><td><em>convert Excel &amp; Word to PDF</em></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>
<p>Numerous online resources exist for using PowerShell. You can create robust solutions using PowerShell, including incorporating them into your .NET applications, or you can use it to easily test your calls to the DynamicPDF API, as we did in this post.</p>
<div class="cloud-api-social-follow"><strong><a href="https://www.linkedin.com/company/dynamicpdf" target="_blank" rel="noreferrer">LinkedIn</a> · <a href="https://www.facebook.com/dynamicpdf" target="_blank" rel="noreferrer">Facebook</a> · <a href="https://twitter.com/dynamicpdf" target="_blank" rel="noreferrer">X</a> · <!-- -->Follow us on social media for the latest news!</strong></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="DynamicPDF API" term="DynamicPDF API"/>
        <category label="PDF" term="PDF"/>
        <category label="Dashboard" term="Dashboard"/>
        <category label="Portal" term="Portal"/>
        <category label="PowerShell" term="PowerShell"/>
        <category label="REST" term="REST"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[DynamicPDF API Word and Excel Conversion]]></title>
        <id>https://www.dynamicpdf.com/blog/word-excel-conversion/</id>
        <link href="https://www.dynamicpdf.com/blog/word-excel-conversion/"/>
        <updated>2024-04-16T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Generate PDF reports from Excel or spreadsheet data using the DynamicPDF API, templates, and layout automation.]]></summary>
        <content type="html"><![CDATA[<p>The DynamicPDF API <code>pdf</code> endpoint now supports Word and Excel conversion to PDF.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/word-pdf-endpoint-small-a795f54690a0bb19453fa32c087045a6.png" width="402" height="411" class="img__Ss2"></p>
<p>For example, in the following instructions document, the <code>sample-data.xlsx</code> excel file and the <code>sample-doc.docx</code> word file are both converted to PDFs and then merged to return a combined PDF.</p>
<div class="language-json codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-json codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token property" style="color:#36acaa">"author"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"Alex Smith"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token property" style="color:#36acaa">"title"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"Word and Excel Example"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token property" style="color:#36acaa">"inputs"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">[</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"type"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"excel"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"resourceName"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"sample-data.xlsx"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"type"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"word"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token property" style="color:#36acaa">"resourceName"</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"sample-doc.docx"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token punctuation" style="color:#393A34">]</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><br></div></code></pre></div></div>
<p>The following illustrates the processing performed by the instructions document.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/word-pdf-processing-846a76be0d711f863b5ca23772255f78.png" width="890" height="515" class="img__Ss2"></p>
<p>The instructions first converts the Excel document to a PDF, it then converts the Word document to a PDF. The two interim PDFs are then merged into a combined PDF. The <code>pdf</code> endpoint then returns the combined PDF as binary.</p>
<p>Running the instructions in Postman results in a combined PDF.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/excel-postman-fe323707c6d006a639729edc1d8447f2.png" width="902" height="521" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="client-api-example-code">Client API Example Code<a href="https://www.dynamicpdf.com/blog/word-excel-conversion/#client-api-example-code" class="hash-link" aria-label="Direct link to Client API Example Code" title="Direct link to Client API Example Code" translate="no">​</a></h2>
<p>Here are examples illustrating both Word conversion to PDF and Excel conversion to PDF.</p>
<div class="theme-tabs-container tabs-container tabList_M0Dn"><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_ysIP tabs__item--active">C# (.NET)</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_ysIP">Java</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_ysIP">Node.js</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_ysIP">PHP</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_ysIP">Go</li><li role="tab" tabindex="-1" aria-selected="false" class="tabs__item tabItem_ysIP">Python</li></ul><div class="margin-top--md"><div role="tabpanel" class="tabItem_OMyP"><p>The following example illustrates creating a PDF from a Word document.</p><div class="language-csharp codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-csharp codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">Pdf pdf = new Pdf();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf.ApiKey = apiKey;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf.AddWord(new WordResource(basePath + "/Doc1.docx"));</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">PdfResponse pdfResponse = pdf.Process();</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/dotnet-client-examples/blob/main/DynamicPdfClientLibraryExamples/Examples/WordConversion.cs">WordConversion.cs</a></b><div style="display:block;margin-top:0.5rem"></div></span><p>The following example illustrates creating a PDF from a Excel document.</p><div class="language-csharp codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-csharp codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">Pdf pdf = new Pdf();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf.ApiKey = apiKey;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf.AddExcel(new ExcelResource(basePath + "/sample-data.xlsx"));</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">PdfResponse pdfResponse = pdf.Process();</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/dotnet-client-examples/blob/main/DynamicPdfClientLibraryExamples/Examples/ExcelConversion.cs">ExcelConversion.cs</a></b><div style="display:block;margin-top:0.5rem"></div></span><div class="theme-admonition theme-admonition-tip admonition_IZjC alert alert--success"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_bl22"><p>You can also add a resource using an input, as this Word example illustrates.</p><div class="language-csharp codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-csharp codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">Pdf pdf = new Pdf();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">WordResource wordResource = new WordResource(basePath + "Doc1.docx");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">WordInput word = new WordInput(wordResource);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf.Inputs.Add(word);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">return pdf;</span><br></div></code></pre></div></div></div></div></div><div role="tabpanel" class="tabItem_OMyP" hidden=""><p>The follow example illustrates creating a PDF document from a Word document.</p><div class="language-javascript codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-javascript codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">var</span><span class="token plain"> pdf </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">new</span><span class="token plain"> </span><span class="token class-name">Pdf</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">var</span><span class="token plain"> resource </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">new</span><span class="token plain"> </span><span class="token class-name">WordResource</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain"> basePath </span><span class="token operator" style="color:#393A34">+</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"Doc1.docx"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"Doc1.docx"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">var</span><span class="token plain"> word </span><span class="token operator" style="color:#393A34">=</span><span class="token keyword" style="color:#00009f">new</span><span class="token plain"> </span><span class="token class-name">WordInput</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">resource</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf</span><span class="token punctuation" style="color:#393A34">.</span><span class="token property-access">inputs</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">push</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">word</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/nodejs-client-examples/blob/main/InstructionsExample.js">InstructionsExample.js</a></b><div style="display:block;margin-top:0.5rem"></div></span><p>The follow example illustrates creating a PDF document from a Excel document.</p><div class="language-javascript codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-javascript codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token constant" style="color:#36acaa">TBD</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/nodejs-client-examples/blob/main/InstructionsExample.js">InstructionsExample.js</a></b><div style="display:block;margin-top:0.5rem"></div></span></div><div role="tabpanel" class="tabItem_OMyP" hidden=""><p>The following example illustrates creating a PDF from a Word document.</p><div class="language-java codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-java codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">Pdf pdf = new Pdf();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf.setApiKey(apiKey);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">WordResource wordResource = new WordResource(basePath + "Doc1.docx");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf.addWord(wordResource, PageSize.LETTER, PageOrientation.PORTRAIT, (float)1.0);		</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">PdfResponse pdfResponse = pdf.process();</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/java-client-examples/blob/main/src/main/java/com/dynamicpdf/api/examples/WordExample.java">WordExample.java</a></b><div style="display:block;margin-top:0.5rem"></div></span><p>The following example illustrates creating a PDF from a Excel document.</p><div class="language-java codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-java codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">Pdf pdf = new Pdf();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf.setApiKey(apiKey);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">ExcelResource excelResource = new ExcelResource(basePath + "sample-data.xlsx");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf.addExcel(excelResource, PageSize.LETTER, PageOrientation.PORTRAIT, (float)1.0);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">PdfResponse pdfResponse = pdf.process();</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/java-client-examples/blob/main/src/main/java/com/dynamicpdf/api/examples/ExcelExample.java">ExcelExample.java</a></b><div style="display:block;margin-top:0.5rem"></div></span><div class="theme-admonition theme-admonition-tip admonition_IZjC alert alert--success"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_bl22"><p>You can also add a resource using an input, as this Word example illustrates.</p><div class="language-java codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-java codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">Pdf pdf = new Pdf();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">WordResource wordResource = new WordResource(basePath + "Doc1.docx");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">WordInput word = new WordInput(wordResource);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf.getInputs().add(word);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">return pdf;</span><br></div></code></pre></div></div></div></div></div><div role="tabpanel" class="tabItem_OMyP" hidden=""><p>The following example illustrates creating a PDF from a Word document.</p><div class="language-php codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-php codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">$pdf = new Pdf();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$pdf-&gt;ApiKey =$apikey;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$pdf-&gt;AddWord(new WordResource($path . "Doc1.docx"));</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$pdfResponse = $pdf-&gt;Process();</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/php-client-examples/blob/main/WordToPdfExample.php">WordToPdfExample.php</a></b><div style="display:block;margin-top:0.5rem"></div></span><p>The following example illustrates creating a PDF from a Excel document.</p><div class="language-php codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-php codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">$pdf = new Pdf();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$pdf-&gt;ApiKey =$apikey;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$pdf-&gt;AddExcel(new ExcelResource($path . "sample-data.xlsx"));</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$pdfResponse = $pdf-&gt;Process();</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/php-client-examples/blob/main/ExcelToPdfExample.php">ExcelToPdfExample.php</a></b><div style="display:block;margin-top:0.5rem"></div></span><div class="theme-admonition theme-admonition-tip admonition_IZjC alert alert--success"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_bl22"><p>You can also add a resource using an input, as this Word example illustrates.</p><div class="language-php codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-php codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">$pdf = new Pdf();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$pdf-&gt;ApiKey =$apikey;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$wordResource = new WordResource($path . "Doc1.docx");</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$wordInput = new WordInput($wordResource);       </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">array_push($pdf-&gt;Inputs, $wordInput);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$pdfResponse = $pdf-&gt;Process();</span><br></div></code></pre></div></div></div></div></div><div role="tabpanel" class="tabItem_OMyP" hidden=""><p>The following example illustrates creating a PDF from a Word document.</p><div class="language-go codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-go codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">pdfExample </span><span class="token operator" style="color:#393A34">:=</span><span class="token plain"> endpoint</span><span class="token punctuation" style="color:#393A34">.</span><span class="token function" style="color:#d73a49">NewPdf</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdfExample</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">Endpoint</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">BaseUrl </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"https://api.dpdf.io/"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdfExample</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">Endpoint</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">ApiKey </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"DP--api-key--"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">wordResource </span><span class="token operator" style="color:#393A34">:=</span><span class="token plain"> resource</span><span class="token punctuation" style="color:#393A34">.</span><span class="token function" style="color:#d73a49">NewWordResourceWithResourcePath</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">"./resources/word-pdf/Doc1.docx"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"Doc1.docx"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdfInput </span><span class="token operator" style="color:#393A34">:=</span><span class="token plain"> input</span><span class="token punctuation" style="color:#393A34">.</span><span class="token function" style="color:#d73a49">NewWordInputWithResource</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">wordResource</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdfExample</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">Inputs </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">append</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">pdfExample</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">Inputs</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> pdfInput</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">resp </span><span class="token operator" style="color:#393A34">:=</span><span class="token plain"> pdfExample</span><span class="token punctuation" style="color:#393A34">.</span><span class="token function" style="color:#d73a49">Process</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/go-client-examples/blob/main/pdf-word-example.go">pdf-word-example.go</a></b><div style="display:block;margin-top:0.5rem"></div></span><p>The following example illustrates creating a PDF from a Excel document.</p><div class="language-go codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-go codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">TBD</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/go-client-examples/blob/main/pdf-instructions-example.go">pdf-instructions-example.go</a></b><div style="display:block;margin-top:0.5rem"></div></span></div><div role="tabpanel" class="tabItem_OMyP" hidden=""><p>The follow example illustrates using the <code>word</code> input type.</p><div class="language-python codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-python codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">pdf</span><span class="token operator" style="color:#393A34">=</span><span class="token plain">Pdf</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">api_key</span><span class="token operator" style="color:#393A34">=</span><span class="token plain">apikey</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">add_word</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">WordResource</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">documentPath </span><span class="token operator" style="color:#393A34">+</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"Doc1.docx"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">response </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> pdf</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">process</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/python-client-examples/blob/main/WordExample.py">WordExample.py</a></b><div style="display:block;margin-top:0.5rem"></div></span><p>The follow example illustrates using the <code>excel</code> input type.</p><div class="language-python codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-python codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">pdf</span><span class="token operator" style="color:#393A34">=</span><span class="token plain">Pdf</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">api_key</span><span class="token operator" style="color:#393A34">=</span><span class="token plain">apikey</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">add_excel</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">ExcelResource</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">documentPath </span><span class="token operator" style="color:#393A34">+</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"sample-data.xlsx"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain">       </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">response </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> pdf</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">process</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><br></div></code></pre></div></div><span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/python-client-examples/blob/main/ExcelExample.py">ExcelExample.py</a></b><div style="display:block;margin-top:0.5rem"></div></span><div class="theme-admonition theme-admonition-tip admonition_IZjC alert alert--success"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_bl22"><p>You can also add a resource using an input, as this Word example illustrates.</p><div class="language-python codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-python codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">pdf</span><span class="token operator" style="color:#393A34">=</span><span class="token plain">Pdf</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">wordResource </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> WordResource</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">documentPath </span><span class="token operator" style="color:#393A34">+</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"Doc1.docx"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">word </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> WordInput</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">wordResource</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">pdf</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">inputs</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">append</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">word</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">return</span><span class="token plain"> pdf</span><br></div></code></pre></div></div></div></div></div></div></div>
<p>Refer to our online documentation for more information on the word and excel input types.</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/client-libraries/pdf-endpoint/pdf-inputs#wordinput" target="_blank" rel="noopener noreferrer" class="">word input type documentation</a></li>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/client-libraries/pdf-endpoint/pdf-inputs#excelinput" target="_blank" rel="noopener noreferrer" class="">excel input type documentation</a></li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="DynamicPDF API" term="DynamicPDF API"/>
        <category label="PDF" term="PDF"/>
        <category label="Dashboard" term="Dashboard"/>
        <category label="Portal" term="Portal"/>
        <category label="Word" term="Word"/>
        <category label="Excel" term="Excel"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[DynamicPDF API's Postman Collection]]></title>
        <id>https://www.dynamicpdf.com/blog/postman-api/</id>
        <link href="https://www.dynamicpdf.com/blog/postman-api/"/>
        <updated>2024-04-02T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Step-by-step guide to calling the DynamicPDF API from Postman, including authentication and endpoint testing.]]></summary>
        <content type="html"><![CDATA[
<p>The DynamicPDF API is now on the <a href="https://www.postman.com/explore" target="_blank" rel="noopener noreferrer" class="">Postman Public API Network</a>, the most extensive collection of APIs available anywhere. Use Postman to call the DynamicPDF API's endpoints before incorporating the endpoints into your application. Save time and money using the DynamicPDF API's public collection on Postman.</p>
<p>The DynamicPDF is now on the Postman Public API Network, helping your development efforts using the DynamicPDF API.</p>
<div align="center"><iframe width="640" height="360" src="https://www.youtube.com/embed/378cA1ORr_U" title="Testing the DynamicPDF API Using Postman" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin"></iframe></div>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="dynamicpdf-public-workspace">DynamicPDF Public Workspace<a href="https://www.dynamicpdf.com/blog/postman-api/#dynamicpdf-public-workspace" class="hash-link" aria-label="Direct link to DynamicPDF Public Workspace" title="Direct link to DynamicPDF Public Workspace" translate="no">​</a></h2>
<p>Access the DynamicPDF Public workspace at the following location: <a href="https://www.postman.com/dynamicpdf-team/workspace/dynamicpdf-api-public-workspace/overview." target="_blank" rel="noopener noreferrer" class="">DynamicPDF Public Workspace</a>.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig1-df2a1551dc4e29ffe99aa8ebc0e4be1a.png" width="1036" height="749" class="img__Ss2"></p>
<p>The workspace consists of the DynamicPDF API Environment and the DynamicPDF API Public Collection.</p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="dynamicpdf-api-public-environment">DynamicPDF API Public Environment<a href="https://www.dynamicpdf.com/blog/postman-api/#dynamicpdf-api-public-environment" class="hash-link" aria-label="Direct link to DynamicPDF API Public Environment" title="Direct link to DynamicPDF API Public Environment" translate="no">​</a></h3>
<p>The DynamicPDF API Public Environment consists of two environment variables, the endpoint URL and the API key, which can be used with the DynamicPDF API Public Collection. Set these variables so you can use them throughout the collection.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig6-e4c6239e04dcd091a0c5e30bf3b93d50.png" width="1000" height="156" class="img__Ss2"></p>
<p>The <code>Authorization</code> variable is where you set the API Key for the application (<a href="https://dpdf.io/docs/usersguide/environment-manager/environment-manager-api-api-keys" target="_blank" rel="noopener noreferrer" class="">Apps and API Keys</a>), while the <code>API-URL</code> variable is for setting the base URL you wish to use (<a href="https://dpdf.io/docs/usersguide/endpoint-zones" target="_blank" rel="noopener noreferrer" class="">Endpoint Zones</a>).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig13-05daf2eb55302e92acdc67ab6c814cbc.png" width="1000" height="208" class="img__Ss2"></p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="dynamicpdf-api-public-collection">DynamicPDF API Public Collection<a href="https://www.dynamicpdf.com/blog/postman-api/#dynamicpdf-api-public-collection" class="hash-link" aria-label="Direct link to DynamicPDF API Public Collection" title="Direct link to DynamicPDF API Public Collection" translate="no">​</a></h3>
<p>The DynamicPDF API Public Collection consists of six endpoints for developing and testing your applications. The six endpoints consist of:</p>
<ul>
<li class="">image-info,</li>
<li class="">pdf-info,</li>
<li class="">pdf-text,</li>
<li class="">pdf-xmp,</li>
<li class="">dlex-layout and,</li>
<li class="">pdf.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig2-25ca3bfa375e5d1cbfaf5d5b1be41ec4.png" width="1000" height="749" class="img__Ss2"></p>
<h4 class="anchor anchorTargetStickyNavbar_SAay" id="image-info-and-pdf-info">image-info and pdf-info<a href="https://www.dynamicpdf.com/blog/postman-api/#image-info-and-pdf-info" class="hash-link" aria-label="Direct link to image-info and pdf-info" title="Direct link to image-info and pdf-info" translate="no">​</a></h4>
<p>Use the <code>image-info</code> and <code>pdf-info</code> endpoints for obtaining an image's information or a PDF's information.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig3-b05e6af9701c2dbcbfb3d0bc7d32e1c3.png" width="1002" height="1127" class="img__Ss2"></p>
<p>The <code>image-info</code> endpoint returns image information as JSON (<a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-image-info" target="_blank" rel="noopener noreferrer" class=""><code>image-info</code> endpoint</a>).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig8-22e227b323460db5f723572fba97ac0b.png" width="1000" height="562" class="img__Ss2"></p>
<p>The <code>pdf-info</code> endpoint returns PDF information as JSON (<a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-image-info" target="_blank" rel="noopener noreferrer" class=""><code>pdf-info</code> endpoint</a>).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig9-c2d7c4e316e4b3264c7af806248549b7.png" width="1000" height="561" class="img__Ss2"></p>
<h4 class="anchor anchorTargetStickyNavbar_SAay" id="pdf-text-pdf-xmp-and-dlex-layout">pdf-text, pdf-xmp and dlex-layout<a href="https://www.dynamicpdf.com/blog/postman-api/#pdf-text-pdf-xmp-and-dlex-layout" class="hash-link" aria-label="Direct link to pdf-text, pdf-xmp and dlex-layout" title="Direct link to pdf-text, pdf-xmp and dlex-layout" translate="no">​</a></h4>
<p>The <code>pdf-text</code> and <code>pdf-xmp</code> endpoint returns a PDF's text information or a PDF's XMP metadata.  The <code>dlex-layout</code> endpoint creates a PDF document from a DLEX file and its JSON metadata.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig4-78f45fc6f8df651034aace7b4b21a5b1.png" width="1000" height="1213" class="img__Ss2"></p>
<p>The <code>pdf-text</code> endpoint returns a PDF's text information as a JSON document (<a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-text" target="_blank" rel="noopener noreferrer" class=""><code>pdf-text</code> endpoint</a>).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig7-ae6c5bbac39dfc906ce37a0d9eea6fda.png" width="1000" height="562" class="img__Ss2"></p>
<p>The <code>pdf-xmp</code> endpoint returns a PDF's XMP metadata as JSON (<a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf-xmp" target="_blank" rel="noopener noreferrer" class=""><code>pdf-xmp</code> endpoint</a>).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig10-7a11a22a2c5c46dbe0e672e260577ed4.png" width="1000" height="561" class="img__Ss2"></p>
<p>The <code>dlex-layout</code> endpoint combines a DLEX document and its associated JSON data to create a PDF document (<a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-dlex-layout" target="_blank" rel="noopener noreferrer" class=""><code>dlex-layout</code> endpoint</a>).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig11-e51d15a8df8954fcbe6e6d400f2db383.png" width="1000" height="561" class="img__Ss2"></p>
<h4 class="anchor anchorTargetStickyNavbar_SAay" id="pdf">pdf<a href="https://www.dynamicpdf.com/blog/postman-api/#pdf" class="hash-link" aria-label="Direct link to pdf" title="Direct link to pdf" translate="no">​</a></h4>
<p>The <code>pdf</code> endpoint uses an <code>instructions.json</code> document to create a PDF document (<a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-pdf" target="_blank" rel="noopener noreferrer" class=""><code>pdf</code> endpoint</a>).</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig5-37bb6c895032bfd1f5a932282525b7e9.png" width="923" height="682" class="img__Ss2"></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig12-8fe27743dae0180ee88708db1065fb3c.png" width="1000" height="561" class="img__Ss2"></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="DynamicPDF API" term="DynamicPDF API"/>
        <category label="PDF" term="PDF"/>
        <category label="Dashboard" term="Dashboard"/>
        <category label="Portal" term="Portal"/>
        <category label="Postman" term="Postman"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[DynamicPDF API's Portal]]></title>
        <id>https://www.dynamicpdf.com/blog/dashboard-changes/</id>
        <link href="https://www.dynamicpdf.com/blog/dashboard-changes/"/>
        <updated>2024-03-04T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Introducing the DynamicPDF dashboard for account management, usage tracking, API keys, and monitoring PDF generation workflows.]]></summary>
        <content type="html"><![CDATA[<p>DynamicPDF is excited to announce our new <strong>Portal</strong> has been redesigned to make working with the DynamicPDF API more intuitive. We are also happy to announce the renaming of the DynamicPDF Cloud  API to DynamicPDF API and our new home:  <a href="https://dpdf.io/" target="_blank" rel="noopener noreferrer" class="">https://dpdf.io</a>.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p><strong>DynamicPDF API Becomes DynamicPDF API</strong></p><p>DynamicPDF announces our new name, DynamicPDF API. Since launching the DynamicPDF API last year, people worldwide have used it to create and manipulate PDF documents and reports. Our mission at the DynamicPDF API has always been to provide an easy-to-use web interface for organizations wishing to capitalize on our powerful flagship product, DynamicPDF Core Suite, without worrying about installing and managing desktop software. To reflect DynamicPDF's goals, the DynamicPDF Cloud API will now be known as the DynamicPDF API. This name change better reflects the current trend, where cloud computing is so ubiquitous that adding cloud to our name felt redundant.</p><p>The DynamicPDF API also changed its domains to:</p><ul>
<li class=""><strong><a href="https://dpdf.io/" target="_blank" rel="noopener noreferrer" class="">https://dpdf.io</a></strong> for the main website and</li>
<li class=""><strong><a href="https://portal.dpdf.io/log-in" target="_blank" rel="noopener noreferrer" class="">https://portal.dpdf.io/log-in</a></strong> for the portal.</li>
</ul></div></div>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="portal">Portal<a href="https://www.dynamicpdf.com/blog/dashboard-changes/#portal" class="hash-link" aria-label="Direct link to Portal" title="Direct link to Portal" translate="no">​</a></h2>
<p>DynamicPDF API replaced the <strong>Environment Manager</strong> with our new and improved <strong>Portal</strong>.  The <strong>Portal</strong> includes global font management, a more intuitive file manager, and other features improving your experience using the DynamicPDF API for all your PDF needs. Use the <strong>Portal</strong> to manage your organization's apps, API keys, plan, billing, files, and fonts and to review usage reports.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/dashboard-649e76260d14bcc5e595e948c80249c5.png" width="952" height="694" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="global-fonts">Global Fonts<a href="https://www.dynamicpdf.com/blog/dashboard-changes/#global-fonts" class="hash-link" aria-label="Direct link to Global Fonts" title="Direct link to Global Fonts" translate="no">​</a></h2>
<p>You can now add fonts globally to your account if you need to use a font other than Google Fonts or the 14 built-in PDF fonts. Select <code>Fonts</code> from the <strong>Portal</strong> menu to view the <strong>Global Fonts</strong> panel. The <strong>Global Fonts</strong> panel allows you to manage fonts you wish to use globally in your DynamicPDF applications.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fonts-ef7d54607d023833a3074fb64688e965.png" width="950" height="491" class="img__Ss2"></p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>A future blog post will discuss global fonts in more detail.</p></div></div>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="file-management">File Management<a href="https://www.dynamicpdf.com/blog/dashboard-changes/#file-management" class="hash-link" aria-label="Direct link to File Management" title="Direct link to File Management" translate="no">​</a></h2>
<p>The <strong>File Manager</strong>, previously called the <strong>Resource Manager</strong>, was redesigned to be a more intuitive way of adding, removing, downloading, and renaming your files in your DynamicPDF API cloud storage. Manage your DynamicPDF API cloud resources using the <strong>File Manager.</strong></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/files-2cc2081d51cea1ee2c9ea8a93df56faf.png" width="950" height="491" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="other-improvements">Other Improvements<a href="https://www.dynamicpdf.com/blog/dashboard-changes/#other-improvements" class="hash-link" aria-label="Direct link to Other Improvements" title="Direct link to Other Improvements" translate="no">​</a></h2>
<p>Other improvements include:</p>
<ul>
<li class="">A more intuitive interface for managing your Apps and API keys.</li>
<li class="">Easier and more intuitive user management.</li>
<li class="">Easier plan management that allows more conveniently changing plans.</li>
<li class="">Quicker access to invoices to keep on top of  your organization's invoices.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/apikeystwo-ef5d2aa071d1b978e3d248d0f634b986.png" width="950" height="491" class="img__Ss2"></p>
<ul>
<li class="">Change your plan at any time using the <strong>Plan</strong> panel.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/planone-8e3c37e8e2ea63db01a096af8a7dde19.png" width="950" height="793" class="img__Ss2"></p>
<ul>
<li class="">Add, edit, or delete billing information for your account using the <strong>Billing Information</strong> panel.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/billingone-e6c69741799c543421803caa36b911ad.png" width="950" height="492" class="img__Ss2"></p>
<ul>
<li class="">View your organization's invoices on the <strong>Invoice</strong> panel.  Display a PDF invoice by clicking the invoice number.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/invoice-e2cd18cd1f75c1126905e75dce1f254d.png" width="950" height="490" class="img__Ss2"></p>
<ul>
<li class="">Add, edit, and delete your organization's users using the <strong>Users</strong> panel.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/userone-4160817d4115e5784f7545eb1b17cc86.png" width="950" height="793" class="img__Ss2"></p>
<ul>
<li class="">Assign permissions to different Portal areas when creating a new user or edit permissions of an existing user.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/usertwo-0a2870f81636d28448526e45b5cf7529.png" width="950" height="492" class="img__Ss2"></p>
<ul>
<li class="">Track your account's overall usage on the <strong>Reporting</strong> panel.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/reportone-889dbb2cbc443e74fb0b8a9e6fa2f6d8.png" width="950" height="491" class="img__Ss2"></p>
<ul>
<li class="">View a summary usage report summarized by App or a detail report listing all calls to your organization made to the API endpoints.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/reporttwo-24b0fcc6b8ed55b17858b28bd511ad35.png" width="1064" height="824" class="img__Ss2"></p>
<p>If you haven't already, login to the Portal today and review the new look and feel. We look forward to improving and expanding our API, hands-down the best in class for working with PDF documents and reports via a publicly available API.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="DynamicPDF API" term="DynamicPDF API"/>
        <category label="PDF" term="PDF"/>
        <category label="Dashboard" term="Dashboard"/>
        <category label="Portal" term="Portal"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Using Axios Node.js with CloudAPI]]></title>
        <id>https://www.dynamicpdf.com/blog/dlex-layout-axios/</id>
        <link href="https://www.dynamicpdf.com/blog/dlex-layout-axios/"/>
        <updated>2024-01-31T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Use Axios with the DynamicPDF API to generate PDFs, submit HTML, merge documents, and automate PDF workflows in JavaScript.]]></summary>
        <content type="html"><![CDATA[<p>A client asked how to call the <code>dlex-layout</code> endpoint using the Axios library rather than the DynamicPDF API's Node.js client library. In this tutorial, we illustrate how to send files and associated data by constructing a form and then using Axios to call the <code>dlex-layout</code> endpoint.</p>
<div class="theme-admonition theme-admonition-tip admonition_IZjC alert alert--success"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_bl22"><p>Consider using <a href="https://dpdf.io/docs/usersguide/cloud-api/client-libraries/cloud-api-client-libraries" target="_blank" rel="noopener noreferrer" class="">The DynamicPDF API's node.js client library</a> to make using the endpoints easier (<a href="https://www.npmjs.com/package/@dynamicpdf/api" target="_blank" rel="noopener noreferrer" class="">DynamicPDF API - Node.js Client</a> on NPM).</p></div></div>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="dlex-layout-endpoint"><code>dlex-layout</code> Endpoint<a href="https://www.dynamicpdf.com/blog/dlex-layout-axios/#dlex-layout-endpoint" class="hash-link" aria-label="Direct link to dlex-layout-endpoint" title="Direct link to dlex-layout-endpoint" translate="no">​</a></h2>
<p>The <code>dlex-layout</code> endpoint takes a DLEX file and JSON layout data, and if the DLEX file is local rather than in cloud storage, one or more resources are available.  The endpoint is an HTTP POST form submission that sends the data as <code>multipart/form</code> data and returns the PDF as a byte array.</p>
<ul>
<li class=""><a href="https://dpdf.io/docs/usersguide/cloud-api/cloud-api-dlex-layout" target="_blank" rel="noopener noreferrer" class=""><code>dlex-layout</code> Endpoint Documentation</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="obtain-needed-resources">Obtain Needed Resources<a href="https://www.dynamicpdf.com/blog/dlex-layout-axios/#obtain-needed-resources" class="hash-link" aria-label="Direct link to Obtain Needed Resources" title="Direct link to Obtain Needed Resources" translate="no">​</a></h2>
<p>If you wish to follow along, you must get the required resources from Cloud Storage.</p>
<ul>
<li class="">
<p>If you have not created the <code>dlex-layout</code> sample folder then create it now.</p>
</li>
<li class="">
<p>Create a new folder named <code>dlex-layout</code> and move the files to this folder.</p>
</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/add-samples-d97d46ca434ce21b0c85683f0c528bf9.png" width="900" height="631" class="img__Ss2"></p>
<ul>
<li class="">Download the files to your local filesystem and place them in a local folder (here we assume <code>c:/temp/example</code> as the local folder).</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="using-axios">Using Axios<a href="https://www.dynamicpdf.com/blog/dlex-layout-axios/#using-axios" class="hash-link" aria-label="Direct link to Using Axios" title="Direct link to Using Axios" translate="no">​</a></h2>
<p>Now that we have the required resources we can use Axios to call the <code>dlex-layout</code> endpoint. In the following example we call the <code>dlex-layout</code> endpoint using Node.js rather than The DynamicPDF API Node.js client library.</p>
<div class="theme-admonition theme-admonition-danger admonition_IZjC alert alert--danger"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"></path></svg></span>danger</div><div class="admonitionContent_bl22"><p><strong>Do not use Node.js and Axios in a user's browser.</strong></p><p>DynamicPDF does not recommend nor support calling any of the <strong>DynamicPDF API</strong> endpoints directly from an end-user's browser. DynamicPDF users that improperly secure API keys are liable for any excessive usage from improper key storage. Secure your <strong>DynamicPDF API</strong> key.</p></div></div>
<div class="language-javascript codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-javascript codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token keyword module" style="color:#00009f">import</span><span class="token plain"> </span><span class="token imports">fs</span><span class="token plain"> </span><span class="token keyword module" style="color:#00009f">from</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'fs'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword module" style="color:#00009f">import</span><span class="token plain"> </span><span class="token imports">axios</span><span class="token plain"> </span><span class="token keyword module" style="color:#00009f">from</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'axios'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword module" style="color:#00009f">import</span><span class="token plain"> </span><span class="token imports maybe-class-name">FormData</span><span class="token plain"> </span><span class="token keyword module" style="color:#00009f">from</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'form-data'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword module" style="color:#00009f">export</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">class</span><span class="token plain"> </span><span class="token class-name">AxiosDlexExample</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token keyword" style="color:#00009f">static</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">async</span><span class="token plain"> </span><span class="token function maybe-class-name" style="color:#d73a49">Run</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token keyword" style="color:#00009f">const</span><span class="token plain"> basePath </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"c:/temp/example/"</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token comment" style="color:#999988;font-style:italic">// simulate reading from a buffer in memory, note, if using a JSON</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token comment" style="color:#999988;font-style:italic">// file you could just use fs.createReadStream in the data.append method</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token comment" style="color:#999988;font-style:italic">// data.append('LayoutData', fs.createReadStream("c:/temp/example/SimpleReportWithCoverPage.json"));</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token keyword" style="color:#00009f">const</span><span class="token plain"> obj </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> fs</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">readFileSync</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">basePath </span><span class="token operator" style="color:#393A34">+</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"SimpleReportWithCoverPage.json"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"utf-8"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token keyword" style="color:#00009f">const</span><span class="token plain"> buffer </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token maybe-class-name">Buffer</span><span class="token punctuation" style="color:#393A34">.</span><span class="token keyword module" style="color:#00009f">from</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">obj</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"utf8"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token comment" style="color:#999988;font-style:italic">// create formdata and append the HTTP Post Fields</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token keyword" style="color:#00009f">const</span><span class="token plain"> data </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">new</span><span class="token plain"> </span><span class="token class-name">FormData</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      data</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">append</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">'LayoutData'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> buffer</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'SimpleReportWithCoverPage.json'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token comment" style="color:#999988;font-style:italic">// if using DLEX in Cloud Storage use DlexPath</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token comment" style="color:#999988;font-style:italic">//data.append('DlexPath', 'samples/dlex-layout/SimpleReportWithCoverPage.dlex');</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token comment" style="color:#999988;font-style:italic">// if using DLEX locally, use Resource. Do not forget to include any embedded images as the DLEX file contains a relative path to the image</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      data</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">append</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">'Resource'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> fs</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">createReadStream</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">basePath </span><span class="token operator" style="color:#393A34">+</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"SimpleReportWithCoverPage.dlex"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      data</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">append</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">'Resource'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> fs</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">createReadStream</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">basePath </span><span class="token operator" style="color:#393A34">+</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"NorthwindLogo.gif"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token keyword" style="color:#00009f">var</span><span class="token plain"> config </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token literal-property property" style="color:#36acaa">method</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'post'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token literal-property property" style="color:#36acaa">maxBodyLength</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">Infinity</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token literal-property property" style="color:#36acaa">responseType</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'stream'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token literal-property property" style="color:#36acaa">url</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'https://api.dpdf.io/v1.0/dlex-layout'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token literal-property property" style="color:#36acaa">headers</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"> </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">          </span><span class="token string-property property" style="color:#36acaa">'Authorization'</span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'Bearer DP.--api-key--'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">          </span><span class="token string-property property" style="color:#36acaa">'Content-Type'</span><span class="token operator" style="color:#393A34">:</span><span class="token string" style="color:#e3116c">'multipart/form-data'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">          </span><span class="token spread operator" style="color:#393A34">...</span><span class="token plain">data</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">getHeaders</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token literal-property property" style="color:#36acaa">data</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> data</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      axios</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">request</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">config</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">then</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">(</span><span class="token parameter">response</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token arrow operator" style="color:#393A34">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">          response</span><span class="token punctuation" style="color:#393A34">.</span><span class="token property-access">data</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">pipe</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">fs</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">createWriteStream</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">"C:/temp/example/output.pdf"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token punctuation" style="color:#393A34">.</span><span class="token keyword control-flow" style="color:#00009f">catch</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">(</span><span class="token parameter">error</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token arrow operator" style="color:#393A34">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token console class-name">console</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">log</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">error</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">      </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword control-flow" style="color:#00009f">await</span><span class="token plain"> </span><span class="token maybe-class-name">AxiosDlexExample</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access maybe-class-name" style="color:#d73a49">Run</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><br></div></code></pre></div></div>
<span style="padding:0.5rem;font-size:xx-small;border-radius:8px;position:relative;top:-20px;left:-7px"><br><b>Source:&nbsp;<a target="_blank" rel="noopener noreferrer" href="https://github.com/dynamicpdf-api/nodejs-client-examples/blob/main/AxiosDlexExample.js">AxiosDlexExample.js</a></b><div style="display:block;margin-top:0.5rem"></div></span>
<p>The preceding code first simulates the data as a Buffer rather than a file.</p>
<div class="language-javascript codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-javascript codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">const</span><span class="token plain"> obj </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> fs</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">readFileSync</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">basePath </span><span class="token operator" style="color:#393A34">+</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"SimpleReportWithCoverPage.json"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"utf-8"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">const</span><span class="token plain"> buffer </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token maybe-class-name">Buffer</span><span class="token punctuation" style="color:#393A34">.</span><span class="token keyword module" style="color:#00009f">from</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">obj</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"utf8"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><br></div></code></pre></div></div>
<p>We use a <code>Buffer</code> rather than a file because your JSON layout data is usually dynamic, while the DLEX file and its associated resources are static. After reading the layout data into a <code>Buffer</code>, we create a new <code>FormData</code> instance and append the layout data buffer.</p>
<div class="language-javascript codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-javascript codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">const</span><span class="token plain"> data </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> </span><span class="token keyword" style="color:#00009f">new</span><span class="token plain"> </span><span class="token class-name">FormData</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">data</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">append</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">'LayoutData'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> buffer</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'SimpleReportWithCoverPage.json'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><br></div></code></pre></div></div>
<div class="theme-admonition theme-admonition-danger admonition_IZjC alert alert--danger"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"></path></svg></span>danger</div><div class="admonitionContent_bl22"><p>Do not forget the filename parameter, the <code>append</code> method will not work without it.</p></div></div>
<p>We assume the DLEX file and the associated image are local to our filesystem rather than in DynamicPDF Cloud Storage, so we use the <code>fs.createReadStream</code> method rather than a buffer.</p>
<div class="language-javascript codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-javascript codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">data</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">append</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">'Resource'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> fs</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">createReadStream</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">basePath </span><span class="token operator" style="color:#393A34">+</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"SimpleReportWithCoverPage.dlex"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">data</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">append</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">'Resource'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> fs</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">createReadStream</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">basePath </span><span class="token operator" style="color:#393A34">+</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"NorthwindLogo.gif"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><br></div></code></pre></div></div>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>If using the DLEX in cloud storage you use the <code>DlexPath</code> field name rather than <code>Resource</code>.</p><div class="language-javascript codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-javascript codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">data</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">append</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">'DlexPath'</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">  </span><span class="token string" style="color:#e3116c">'samples/dlex-layout/SimpleReportWithCoverPage.dlex'</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><br></div></code></pre></div></div></div></div>
<p>We configure the required headers and then make the request.  If the response is successful, we save the PDF to a file; otherwise, we log the error.</p>
<div class="theme-admonition theme-admonition-tip admonition_IZjC alert alert--success"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_bl22"><p>Refer to the article <a href="https://maximorlov.com/send-a-file-with-axios-in-nodejs/" target="_blank" rel="noopener noreferrer" class="">Send a File With Axios in Node.js</a> for more details on using Axios to send files.</p></div></div>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig1-df39b74fea30c4714bbb94e8cae1c161.png" width="800" height="647" class="img__Ss2"></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/img/cloud-api/divider.png#center" alt="" class="img__Ss2"></p>
<a href="https://portal.dpdf.io/sign-up" target="_self">Sign Up For FREE!</a>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="DynamicPDF API" term="DynamicPDF API"/>
        <category label="PDF" term="PDF"/>
        <category label="Node.js" term="Node.js"/>
        <category label="Axios" term="Axios"/>
        <category label="DLEX" term="DLEX"/>
        <category label="dlex-layout" term="dlex-layout"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Using CloudAPI with WordPress]]></title>
        <id>https://www.dynamicpdf.com/blog/cloudapi-with-wordpress/</id>
        <link href="https://www.dynamicpdf.com/blog/cloudapi-with-wordpress/"/>
        <updated>2024-01-14T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Learn how to integrate the DynamicPDF API with WordPress to automate PDF generation, downloads, forms, and site workflows.]]></summary>
        <content type="html"><![CDATA[
<p>A client asked if <strong>The DynamicPDF API</strong> worked with <strong>WordPress</strong>. This question made us wonder how we could integrate The DynamicPDF API with WordPress so potential clients could use our product in their WordPress sites.</p>
<p>The following solution is what we came up with.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Before we begin, realize this is <strong>a way</strong> to use The DynamicPDF API within WordPress and is <strong>not necessarily the only way</strong>.</p></div></div>
<p>Before starting, our first concern was security. While creating the example, we wanted to avoid a webpage that somebody online could access repeatedly and run up our service usage. WordPress solves this problem by allowing a site to register its users and other security measures. However, we opted to only password-protect the page.</p>
<p>Our next concern was to preserve the siteâ€™s existing integrity. Although it is permissible to modify a WordPress site themeâ€™s <code>functions.php</code> page, rather than risking corrupting a site in production, finding a plugin solution that allowed inserting PHP code into pages and posts seemed more prudent. We opted for the <a href="https://xyzscripts.com/wordpress-plugins/xyz-wp-insert-code-snippet/details" target="_blank" rel="noopener noreferrer" class=""><strong>XYZ WP Insert Code Snippet</strong></a> plugin by <a href="https://xyzscripts.com/" target="_blank" rel="noopener noreferrer" class="">XYZScripts</a>.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>If you are dead set against using plugins, realize you must modify your <code>functions.php</code> page to include the needed functionality. Your WordPress site will require modifications to allow the <code>DLEX</code>, <code>JSON</code>, and <code>XML</code> file extensions. See:</p><ul>
<li class=""><a href="https://www.siteground.com/kb/fix-sorry-not-allowed-upload-file-type-error-wordpress/" target="_blank" rel="noopener noreferrer" class="">How to fix "Sorry, you are not allowed to upload this file type." error in WordPress</a></li>
<li class=""><a href="https://developer.wordpress.org/reference/functions/add_shortcode/" target="_blank" rel="noopener noreferrer" class="">WordPress documentation, <code>add_shortcode</code></a></li>
<li class=""><a href="https://codex.wordpress.org/Shortcode_API" target="_blank" rel="noopener noreferrer" class="">Shortcode API</a></li>
</ul></div></div>
<p>Adding PHP code snippets removes the dangers of adding custom code to your WordPress theme. A snippet is a small chunk of PHP code used to extend the functionality of any WordPress page or post - think of a snippet as a "mini-plugin." Using a snippet is a quick, easy, and safe way to extend your WordPress siteâ€™s functionality without requiring you to modify your existing theme.</p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Preliminary plans are in the works to create a DynamicPDF API WordPress Plugin, freeing you from the steps outlined here.  If you want to see a WordPress Plugin for DynamicPDF API, let us know on our chat or via email at <a href="mailto:sales@dynamicpdf.com" target="_blank" rel="noopener noreferrer" class="">sales@dynamicpdf.com</a>.</p></div></div>
<p>Before we could start coding, we needed to modify our WordPress Site by installing the plugins, creating some folders, and uploading the required files to our WordPress site's media library.</p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="installed-plugins">Installed Plugins<a href="https://www.dynamicpdf.com/blog/cloudapi-with-wordpress/#installed-plugins" class="hash-link" aria-label="Direct link to Installed Plugins" title="Direct link to Installed Plugins" translate="no">​</a></h2>
<p>We installed two plugins, the <strong>File Upload Types</strong>, and the <strong>Insert PHP Code Snippet</strong> plugins. We used the File Upload Types plugin to allow uploading JSON, DLEX, and XML files to our <strong>WordPress Media Library</strong>. We used the Insert PHP Code Snippet plugin to insert PHP code into a page we created to call the <code>pdf</code> endpoint and then embed the returned PDF into that page.</p>
<div class="theme-admonition theme-admonition-danger admonition_IZjC alert alert--danger"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"></path></svg></span>danger</div><div class="admonitionContent_bl22"><p>Carelessness with your WordPress site could bring it down. Moreover, embedding a link to generate a PDF dynamically could lead to a denial of service attack and incur significant DynamicPDF API usage costs.</p></div></div>
<ul>
<li class="">We installed the File Upload Types plugin and the Insert PHP Code Snippet plugin.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig1-fd226bc1e259f79ef23bf09ee909e810.png" width="902" height="629" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="created-file-types">Created File Types<a href="https://www.dynamicpdf.com/blog/cloudapi-with-wordpress/#created-file-types" class="hash-link" aria-label="Direct link to Created File Types" title="Direct link to Created File Types" translate="no">​</a></h2>
<ul>
<li class="">We allowed the XML and JSON file types and created a new rule allowing the DLEX file type.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig2-14fa2636dc1de3b0598c31bd12798d3f.png" width="899" height="565" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="created-folders-and-files">Created Folders and Files<a href="https://www.dynamicpdf.com/blog/cloudapi-with-wordpress/#created-folders-and-files" class="hash-link" aria-label="Direct link to Created Folders and Files" title="Direct link to Created Folders and Files" translate="no">​</a></h2>
<p>Rather than stream the PDF from the <code>pdf</code> endpoint to the user's browser directly, it seemed easier to save the produced PDF to a temporary file, use an <code>iframe</code> to embed the saved PDF file and display it in the user's browser, and then periodically delete the temporary file. Therefore, we created a folder in our WordPress media folder to store the temporary PDFs. We also created a folder to contain the <code>instructions.json</code> file and the JSON data (<code>report-with-cover-page.json</code>).</p>
<ul>
<li class="">We created two folders, <code>pdf-data</code> and <code>pdf-output</code>, in our <code>wp-content</code> folder</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig3a-f443bb1a858c9ca60040cd74b69c7d0d.png" width="959" height="322" class="img__Ss2"></p>
<ul>
<li class="">We placed <code>Instructions.json</code> and <code>report-with-cover-page.json</code> in the <code>pdf-data</code> folder.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig3-c8541581d22d88a88e26124fe876351c.png" width="800" height="188" class="img__Ss2"></p>
<div class="theme-admonition theme-admonition-info admonition_IZjC alert alert--info"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_bl22"><p>Recall we had to install and configure our WordPress site to allow uploading JSON and XML files to our media folder.</p></div></div>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="php-api-call">PHP API Call<a href="https://www.dynamicpdf.com/blog/cloudapi-with-wordpress/#php-api-call" class="hash-link" aria-label="Direct link to PHP API Call" title="Direct link to PHP API Call" translate="no">​</a></h2>
<p>We next created the PHP code snippet to embed it in a page. To accomplish this, we created a snippet named <code>pdf-dlex-example</code>, added the PHP code, and tested it.</p>
<div class="theme-admonition theme-admonition-caution admonition_IZjC alert alert--warning"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>caution</div><div class="admonitionContent_bl22"><p>Full disclosure. In reality, we wrote and edited the code in Visual Studio Code running standalone first. The end of this post lists the complete code listing. Attempting to create and debug the code directly via the code snippet would have been time-consuming.</p></div></div>
<ul>
<li class="">We created a new PHP code snippet named <code>pdf-dlex-example</code>.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig5-c009dae805316a54f23e1f92aab82a7c.png" width="900" height="280" class="img__Ss2"></p>
<ul>
<li class="">We then added the PHP code.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig6-fc2a89a3b68c8cf1aa8ea192be0a602f.png" width="800" height="393" class="img__Ss2"></p>
<p>The PHP code performs the following tasks:</p>
<ul>
<li class="">constructs the complete path to the <code>instructions.json</code> and the <code>report-with-cover-page.json</code> files,</li>
<li class="">constructs the complete path and file name to save the temporary PDF,</li>
<li class="">it ensures the save path exists, and if it doesn't create the path,</li>
<li class="">constructs the cURL <code>POST</code> request to the <code>pdf</code> endpoint,</li>
<li class="">calls the <code>pdf</code> endpoint,</li>
<li class="">saves the PDF as a temporary file,</li>
<li class="">echoes an <code>iframe</code> containing the path to the temporary PDF,</li>
<li class="">closes the cURL connection,</li>
<li class="">and then deletes any temporary file older than two minutes.</li>
</ul>
<div class="language-php codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-php codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">&lt;?php</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">// get the path to instructions.json file and the</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">// json data.</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$uploads   = wp_upload_dir();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$instructions_path = $uploads['basedir']  .  '/2023/12/pdf-data/instructions.json';</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$json_path = $uploads['basedir'] . '/2023/12/pdf-data/report-with-cover-page.json';</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//get the path to the output folder</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$save_dir = '/pdf-output/';</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$save_path = $uploads['basedir'] . '/2023/12/pdf-output/';</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">// create the file name that is unique</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$output_file = strtotime("now") . '-pdf-output.pdf';</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$output_path = $save_path . $output_file;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$output_url = $uploads['url'] . "/pdf-output/" . $output_file;</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//if there is no save path, create it</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">if (!file_exists($save_path)) {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    mkdir($save_path, 0777, true);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">}</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$ch = curl_init();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//initialize curl with DynamicPDF API endpoint</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//set it to post and that it returns content rather</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//than success/failure</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_URL, 'https://api.dpdf.io/v1.0/pdf');</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_POST, 1);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//set dynamicpdf api key in header</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_HTTPHEADER, [</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    'Authorization: Bearer DP---api-key---',</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">]);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//specify the instructions json and the json</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//layout data as files note the first param</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//of CURLFile is the path to the file, and the</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//last param is the form post file name</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_POSTFIELDS, [</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    'Instructions' =&gt; new CURLFile($instructions_path, "application/json" ,"instructions.json"),</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    'Resource' =&gt; new CURLFile($json_path, "application/json", "report-with-cover-page.json"),</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">]);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//call the pdf endpoint</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$response = curl_exec($ch);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//if there is an error print it out,</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//otherwise save the response as a file</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">if ($response === false) {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    echo curl_error($ch);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">} else</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">{</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    file_put_contents($output_path, $response);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    </span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">}</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">// be certain to close curl connection</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_close($ch);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//echo the iframe to embed in a wordpress page/post</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//specifying the just created pdf as the content</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">echo "&lt;iframe src='" . $output_url . "' width='1000' height='1000'&gt;&lt;/iframe&gt;";</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//perform housekeeping by deleting any pdf older than</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">//two minutes old</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    $files = array();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    foreach (scandir($save_path) as $file) {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        if ($file !== '..' &amp;&amp; $file !== '.') {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">           if( filemtime($save_path . $file) &lt;= strtotime("-120 seconds")) {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">             unlink($save_path . $file);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">          }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">        }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    }</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">?&gt;</span><br></div></code></pre></div></div>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="testing-the-php-snippet">Testing the PHP Snippet<a href="https://www.dynamicpdf.com/blog/cloudapi-with-wordpress/#testing-the-php-snippet" class="hash-link" aria-label="Direct link to Testing the PHP Snippet" title="Direct link to Testing the PHP Snippet" translate="no">​</a></h2>
<p>We then tested the PHP snippet directly via the preview link.</p>
<ul>
<li class="">We tested the newly created snippet by clicking on the preview link.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig7-6444591f7cca89f45f409058a9ce17fe.png" width="900" height="118" class="img__Ss2"></p>
<p>After successfully debugging the code,  the page displayed the PDF embedded in an <code>iframe</code>.</p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig8-56c371e04887019b616a08db73b49c5f.png" width="786" height="829" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="creating-a-page">Creating a Page<a href="https://www.dynamicpdf.com/blog/cloudapi-with-wordpress/#creating-a-page" class="hash-link" aria-label="Direct link to Creating a Page" title="Direct link to Creating a Page" translate="no">​</a></h2>
<p>We next created a page to embed the snippet and password-protected the page to ensure only authorized users could access the page.</p>
<div class="theme-admonition theme-admonition-danger admonition_IZjC alert alert--danger"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"></path></svg></span>danger</div><div class="admonitionContent_bl22"><p>You would want better security in a production environment than a simple password-protected page (see <a href="https://wordpress.com/support/security/" target="_blank" rel="noopener noreferrer" class="">WordPress Security</a>).</p></div></div>
<ul>
<li class="">We created a new page and password-protected the page.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig4-cf164084706c8fc1f4eeb6a8f855b3e4.png" width="800" height="228" class="img__Ss2"></p>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig10-1503b46e62dca25c301b67453f14fb8f.png" width="718" height="244" class="img__Ss2"></p>
<ul>
<li class="">We copied the short-code to embed in the newly created page.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig13-f669f1852f68dfbd0c7c054e59101a58.png" width="695" height="112" class="img__Ss2"></p>
<ul>
<li class="">We embedded the short-code in the page.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig9-32c10c46582ba396c372ee2e4906df88.png" width="1110" height="485" class="img__Ss2"></p>
<ul>
<li class="">We saved the page, logged out of WordPress, and navigated to the newly created page.</li>
<li class="">We entered the password,</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig11-3d88e80f73ecce9f4a686ce80a535c7a.png" width="806" height="325" class="img__Ss2"></p>
<ul>
<li class="">and the page with the dynamically created PDF appeared embedded in the page.</li>
</ul>
<p><img decoding="async" loading="lazy" src="https://www.dynamicpdf.com/blog/assets/images/fig12-5368eaada2f3d590e5c034ce9f83e2b3.png" width="737" height="819" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="conclusion">Conclusion<a href="https://www.dynamicpdf.com/blog/cloudapi-with-wordpress/#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion" translate="no">​</a></h2>
<p>Embedding one of the DynamicPDF API endpoints is straightforward.  The DynamicPDF API can easily be integrated into your WordPress site with a small amount of PHP coding.</p>
<h3 class="anchor anchorTargetStickyNavbar_SAay" id="github-examples">GitHub Examples<a href="https://www.dynamicpdf.com/blog/cloudapi-with-wordpress/#github-examples" class="hash-link" aria-label="Direct link to GitHub Examples" title="Direct link to GitHub Examples" translate="no">​</a></h3>
<p>To make it easier to use DynamicPDF API with WordPress, we provide the <a href="https://github.com/dynamicpdf-api/php-client-examples/blob/main/wordpress/wordpress-dpdf-base.php" target="_blank" rel="noopener noreferrer" class=""><code>wordpress-dpdf-base.php</code></a> file on GitHub, which contains the class, <code>DynamicPdfWordPressBase</code>. Install that PHP file to a folder accessible by WordPress when creating code snippets.</p>
<div class="theme-admonition theme-admonition-caution admonition_IZjC alert alert--warning"><div class="admonitionHeading_uVvU"><span class="admonitionIcon_HiR3"><svg viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>caution</div><div class="admonitionContent_bl22"><p>Embedding class definitions and functions does not appear to be supported by XYZ Code Snippet plugin. Instead, upload the <code>wordpress-dpdf_base.php</code> file to a location accessible by PHP.  Then use <code>include_once('wordpress-dpdf-base.php');</code> when referring to the class.  See the GitHub files for examples.</p></div></div>
<p>Then use the code snippets within your WordPress site. We also provide the files:</p>
<ul>
<li class=""><a href="https://github.com/dynamicpdf-api/php-client-examples/blob/main/wordpress/wordpress-pdf-dlex-snippet.php" target="_blank" rel="noopener noreferrer" class=""><code>wordpress-pdf-dlex-snippet.php</code></a> and</li>
<li class=""><a href="https://github.com/dynamicpdf-api/php-client-examples/blob/main/wordpress/wordpress-dlex-layout-snippet.php" target="_blank" rel="noopener noreferrer" class=""><code>wordpress-dlex-layout-snippet.php</code></a></li>
</ul>
<p>to help you get started creating snippets using the <code>DynamicPdfWordPressBase</code> class to create PHP code snippets.</p>
<p><img decoding="async" loading="lazy" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAAAsCAYAAACAPl2hAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wwTEhcQR193BgAADk5JREFUeJztm3t0ldWVwH/7fN/98iBAEkJAogEFY9C87k3V+qC26ppq60JdUrVSdVkg4NSxjq9axcesQV3LjkrH6YjiA63ahTq+x6mj1a4BH/ggIbwCVYgCAfIgz5vk3vt9Z88fEA3JDRVNmrBWf//dvfc5++xv3/PdfR5XOJQ5bk5uyIROVIKIgUIwecAYFc0QlS5EW1F2WqVGRKoSQWwVG5ZtH+5hfxtkuAdw0BTNTndJO8+Y0CUIU7G2QWGtiF2rSq0a00Rgu1BJMY4dhzJZxSkRpFiRPMHWYYPn4kSfYt0fWoY7nIPl0EnYpAtSU3Jysm0ili5u6uM4vK5+1wuJdU9s+rpdeNPnTNWQM1OQ2SDZKEvjTQ33U/df3UM59MFk5CYsfE4alaEYvGgJz0vzAvM6qp/G1z48bzC6D5VUnC8SuhHVNILEDfH1S98EoHBWiJrnE4PhYygYkQnziufegvEuBE1oEPxrYt3DL4dKK851xP+wu+qxnYPqq2TBr8D+0qp5yogWIM7h1gbv+K21t/DFG/HB9DUYjLiEeUXzfgFyLQTzcdwpWO602LP8tUsrh8pn6Lgrfmzc1NfU92/BsZ+g7t2KrkqsffjKofL5TXGHewD9MOanVu1Cf+2jbwGEiuecBmY2MGQJExOarDbx+/j6R+4CcKdfvsu4qS9QcEUGmx/vGCq/34SRlzC0QdDcnk+CyRLlgIWFAp+XMj1bOLoL8gJIF4h7Qr1VPtvhs6FsHZ0Dd6A+Ikf2fHRd91iLCm0NwWBENJiMuISpJv4sknaPWzw/0xiThw3yTdxPWmjUhpmY7TCvXbkgwzJeDZNyHYgGMMqBmIW2gN1TU2hrLeftIOA/s6uo7ttPPBr9g5cxeo5XsuBPKrrJIpdYG9zGrte6hj7ig8MM9wB6k3bcnFwR9+eIvdsIeSBRCeI/6t68f6GxEGRPObfkOGwUuCxuWYbyllUSO2Lc3RFQsyvGg+0BuwU2tgcsUuU4z+H99gjLNhQycT/HW59pj8eiZyOySlSy1dq5/tql//43Df5QxCuueCJUUvH7A9l8dixHdJSzsqOcxrYwFQC7y7g0+h06dpVyLkBThNrGCCfUlTK9s5ydLRF+A1BfxlnRcqqj32HH9jLOOJCflJKKU0LF85/hxAtSByu+wWDEzLCUknknYOTURHvntQPZbC/h6IlpvGOhq76TyJhKHt5RysljXJ5sTnDVxDW8vKGAbKuExJI9aQ0bGyznuML1jWF+kVvFH1elE04EPJ1peLkxzPkD+ZJE7FMRHeO1ZeYNTcSHOF5JxYteScVtA+nrSslpCPOpfhfdUcavYe+rsSnClqYIS3vsasoZ1xhhe1MZZ33ZtowFeyJoXRn5ANtKOa2jHG3dK/veAQd25CWjGUHLnxExw0LHzp8OFMZD/G4gm1SHp43QtK2Ti8c6/Lo5wuKrw9ysoGtWs6DHznexAAjaI5tUxZIA/tcR7mqJsCDL5c1owPXdlnvTDC9+WsL4gfx6GRlPh4oqZg5OpN+eEZEwcYKfofoenzzclEy/u4zLBM5sjXNpfjXLW33OAk7LdllkLU1lxZz0eRGZABtaiaMERogBrCwgY3s5ZaLU57jMNnBTt6ViQhX3TqjieoX6TJfFA41NsbUCVwxJ4N+AEZEwMN9TeC6Z5otJpDqGu3zLnUetYzNA3hrea0vwT80+7UboMC4vjApR0xyh8gfpvBFTxieU+5ojvF+YTk0GvC0wrTVgT4flgZxKlvX0322Zb+CS7SWUJfOvYh9TKOLoinFDEvpBMuwJCx17ZSGqaYmO6LvJ9F4u54syuivG/b3laS4zEdbkVHK6Wo73YR7wlCiVjhAAtaq86sMN3cr3xlVykm95OkU4u3c/k6r4PwsrUxyuSebfr560RoTWUKqePFgxfxuGfeGsTuxEwa1j6zPtyfSu4dJAeTV/I837N2SGwtsAWWv4HPgcYF4Y925hplXuz65kRe8mvvCOgVkrC8g4dTNfbjmpssTAvRsLyJjeS76XRQrz16u13wVeHYSQvxXDPsMMTpFFNyfTbTyJDJQyVV7sLa8qIt0Ihzn037W4zjAWcBxlVL8OLTUCoSmpTO0t3hPwjgqhzAyOTzYOJag2jkw/mLiGimFPGOJOMpjPkqlyuig04Hb7rO4tH+8xzgip8YCtfdukJPABHKXfPuAXHtut0J1mOKy3/Jhq6hS2uRBJPkbZAmZE/IbteyWeb0LleUdrQAp+oAduMhheHUmJdW2Lbny0GRuMVpH6pHZKXiB0bWlnz+3gHBZGFlTi+zDeKqYZogtBDg/jAGRVYusTpI52Ie7gASwJ741xZyW6cSfxabl0+pDboyvIQE9fQaDKbmBKsmFIYJowmgIIhbe5rldfQKAOYob+WXlG/Y7O2p5Tg70Jm5KTIZbrBMnFlaHeoRaMa+KuWQL8EWwGYmLJDOMgqTCpOIuPirNRFJkVJggso7oha5zhtWvCxNB9b4ow1iqh7oDckMNDTWW0qe6NUffVgDFLviPc01jGTSgu7VAfJvAMU9oCks5060irUetROMtNcety1aTeikMKau1QPKCvEEFddUOhu3z4BHoSVru0LV4740oKGwxpaUP/rensEmpq9h7DH2APwVWMhZZAuccIAQIEgMPkkHKND0skoH7v/NpLABkhwx0oz6pSbc1XHgyoo9yhygqUP/XojEUD4RqX3j3tj0LALrxYyyM7IPwzCrtkyJ9V1z4f6yv9HlGvKnFFQE3/9/7QI1FUUpKqHKIGuv9jDY//C1+NrbGEScZlQVeC5Xlrqe3d5PYZOFdHuUHghew1rOzbZWOYa0V4Zdzq/dd9DWEucelTie7DiI4FE6Pl+X3HLZU+NQcb5+AwAooOp03E5CRTxeBTIG1B6f7FQGuAD9jRIQr6tvlpJ5kKRi0ZfXXVRWQKZAYB0d7yzfl4IkwzkjwNqnacYqLAEL8C/zojIGHBTmsTRyZTvV/JVoUmx3Bqb/nHBTQGSpsP0/q26akSFfy+uiyXfCA14e7/W5WeybEC42KG95OOMQiOAr/x6wc1dAx7wmwQrDci/WYKwEVgRXjDES7eT/4iVpQaRzmpb5v6BKkAgTDm7Rn7/yZ5UIrQ8W6ULb3lKQ4/UaX2wU9Iuh4UJ3ScqG442NiGgmFPGI5ZpcgkimanJ1N3+TymUL6zdP9FbSA8Hygn14UpbwpzQ2MZLzWE+XhaKitjlglGeDDSSXV9Ge+2hnlgZ4QfiGGWVd66sIYv7x1+HCZNhLlWeHQRJCkiFgpqC0E+GOzQvwnDnjB/zSMbRTTmSXq/2QJweDVVCm94hn/bT2FxR7kc5cH/OMLFamh0hOcT8DsXWq2yNK7cj/CeGqZ78GSmw0wRgoW9atN85XpRpMXh8WT+3cK6UpT01I7oh4Ma+KGMWzJvkVdSkfSBAewo4piWcoL6MuYAtIZZ0lxOU1s5W3eFeae37ZIwblOEL/aEmdFbvjPM7XsiNLaXU9NWznufF5G5rYxpreXo7jIuHci3VzJvkVc096lvG+NgMewzDADRZ4DxFN4WSqbOW8emmOVqIzywJ8IbIpyZgDN2BpybIpy6vZjTe2y/bxirYLTXXuK6E8nyhKvjATdvauMUA53pLm+mGt6MW5ZPqCL5PZL8H3qonIPKE4Md8qFPyWVj+StH8bvK+K2ejG4r5ctrbw1hHmqJsLN63wHm5lJy+l4RaAzzSkOE9T2vwuoijtHj0T0RPtg6g+RrQMArnnt5qLjiA1j49ysC/eh2Ard4/kvu9LmlA5lMrOKXTV38ZpzL4uZybgQYX8l8oPEIj//+KIz7l2baUIwV4gDNYe5MNZyZsJy9CLQ+wo+PTOWtdsvrzco/HLmCpNti5P/QA3Oj2uC+vUcsI4ORk7DNLZ0iug3HFB3ILKeSGxOWq1y4OVrO6sYI57XGmekJ6VOFVwozmWygxQjungi3hoR5zT5nW0tWS4SXRgkvKiy/9xNmTq2kbSA/7pj8hQiN/vpHnx38YL85I2aq98YrmnMmjnepCq2SiC6Or39yS1+braVMznG5VWBWALVdAXVZLmc3+zQESsgIHTkhDq/3+XCU0GaEE0V4N2q5Y+JqVvVzOn1Olud5t1sNphiRSiwXWbUX+uuWrvubBP01GXEJCxVVnCtGHsaYZWp1kmhwCuqfEV/3eL+zL4AdEY7IUC5IKN9HyPdhslUcI2CgTmCba/goHvDshCTXtAEomp3umYw3QTot9gMjzj8TxJ+Or3t0/pAG+w0Y9isCfREjN1jlDr/qwQcBQsUVy0XcfwRuSGaft5ptwGJg8eZ8PDue0RrghQL8UZboYQf6E8Q+UjT1HFUdE1/70CkAoZKfV4qEbhqJf+4bcQlTSBGru778rMEmMW6/jdxkFHxBnC9IelXugD5VxqL2y3YaZ4t4jKIlywX+nrADovZZceS3oaIKK2JzkdCvbBBLeqNpsDC+fc2mhG4KFc29UVXeNsbcp2r/zK6lI+7fKwMe2A0Xtn71e874ck8cbz7oNItdLsaZ6044PjfI6lhJY+OgHXFklFw21k448dz46OY1xFLfN457lbjeeaq2MtHUdB3tG/vt+A83I67o+IoZDqwIANyiuRHjhO4Hk2rV3utXP/gcSTdqDw6veO4tiHuh22VP7/zLvlvHU2aNofb5Acv94WYEJ6w/Xun8uahcBXQrPCtB8FJ8/dJ+Jf+AlCwY76r+yKCXg3973Momoq3dIzlBfTmkEgbA4TNS3OzCn4BzsRHJR+1uhDWS8KtVTK0V9giSUGNcNcEYE0ieosWIKTbIUUC7avCKK86yruolDcMdzsFy6CWsN8ddlBtyxp4gaFiRAsGZqNhMRccapAOVZtB6a4MtOG61sbEPB1rPHSr8P5AuxiEZQnxoAAAAAElFTkSuQmCC#center" width="108" height="44" class="img__Ss2"></p>
<h2 class="anchor anchorTargetStickyNavbar_SAay" id="php-test-code-in-visual-studio">PHP Test Code in Visual Studio<a href="https://www.dynamicpdf.com/blog/cloudapi-with-wordpress/#php-test-code-in-visual-studio" class="hash-link" aria-label="Direct link to PHP Test Code in Visual Studio" title="Direct link to PHP Test Code in Visual Studio" translate="no">​</a></h2>
<div class="language-php codeBlockContainer_ZGJx theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_kX1v"><pre tabindex="0" class="prism-code language-php codeBlock_TAPP thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_AdAo"><div class="token-line" style="color:#393A34"><span class="token plain">&lt;?php</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$instructions_path = "c:/temp/dlex/instructions.json";</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$json_path = "c:/temp/dlex/report-with-cover-page.json";</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$save_path = "c:/temp/dlex/php-dlex-output.pdf";</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$ch = curl_init();</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_URL, 'https://api.dpdf.io/v1.0/pdf');</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_POST, 1);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_HTTPHEADER, [</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    'Authorization: Bearer DP.---api-key---',</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">]);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_setopt($ch, CURLOPT_POSTFIELDS, [</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    'Instructions' =&gt; new CURLFile($instructions_path, "application/json" ,"instructions.json"),</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    'Resource' =&gt; new CURLFile($json_path, "application/json", "report-with-cover-page.json"),</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">]);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">$response = curl_exec($ch);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">if ($response === false) {</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    echo curl_error($ch);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">} else</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">{</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">    file_put_contents($save_path, $response);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">}</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">curl_close($ch);</span><br></div><div class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#393A34"><span class="token plain">?&gt;</span><br></div></code></pre></div></div>]]></content>
        <author>
            <name>James A. Brannan</name>
            <uri>https://github.com/jamesabrannan</uri>
        </author>
        <category label="WordPress" term="WordPress"/>
        <category label="PHP" term="PHP"/>
        <category label="DynamicPDF API" term="DynamicPDF API"/>
        <category label="PDF" term="PDF"/>
    </entry>
</feed>