getPDFapi 1.0.0 Beta is finally here!

written by Răzvan Puiu

The launch of getPDFapi is getting closer and closer. We are now planning a successful product launch, and for a product launch to be successful, well, you first need to have... the product. This is what this article is all about. The product:

getPDFapi 1.0.0 Beta

Let's take a look at the main features:

When you first enter the website, you will be directed to the Template Designer. This is the place where you can customize your PDF document layout by adding elements and format accordingly.

The 3 elements you can currently add and their customizations are:
  1. Text block:
    • Static / Dynamic toggle based on the "Element id". Static text blocks can be edited from the "Edit text" area and will appear in the PDF if no element id is set.
    • Resize
    • Bold
    • Align (Left, Right, Center, Justify)
    • Font size
    • Font Family
  2. Table:
    • Resize
    • Add / Remove Column
  3. Image:
    • Resize
The Canvas functionalities are:
  • Orientation: Portrait / Landscape
  • Undo / Redo
  • Duplicate element
  • Delete element
  • Preview: Set content to the elements that have an id associated and preview a PDF generated using your template.
  • Save: When you finish the design, the "Save" button will generate the Rest endpoint that you can use to send data.

After you finish designing your PDF template, an API will be generated just for you. You can use this API to send content that will fill the template.

Below you can find the main features:
  • The API will identify the elements you've just added by the "Element id" and fill them with content.
  • If a text block doesn't contain an id, the text that was set in the design will be displayed in the document (Static text block).
  • If the content is large, the text and table elements will grow vertically to fit the content.
  • If there is no more room on the page, a new page will get created automatically.
  • If an element has grown, the elements that were positioned below in the design will automatically get positioned below the grown element without breaking the initial design.
  • The table content, in JSON format needs to be a list of lists of Strings (Matrix).
  • The content will be positioned in the cells based on the position in the matrix. E.g: "myTable": [ ["A","","c"]] will display a table with 1 row, 3 columns where column 1 contains the text "A" and column 3 contains text "c".
  • The table will have a maximum number of columns equal to the number of columns in the design.
  • The table will add additional rows based on the number of rows in the content matrix. E.g: If the table in your design is 3x3 and the content you send has 7 rows, the generated PDF will contain a table with 3 columns and 7 rows.
  • The images you have added in the template will be stored along with the template description itself and will be used in all the documents generated using that template.

In the documentation page you will find a cURL request that will generate a PDF document from your template. All you need to do is change the payload with your content and use it in your products.

We do not store the content you send anywhere.