Skip to main content

Overview


The DynamicPDF Designer is a WSIWG editor for graphically creating DLEX templates. The following outlines the major Designer interface's layout elements.

The DynamicPDF Designer is a layout tool used to create templates that are then used to create PDF documents using the pdf and the dlex-layout endpoints. Layout elements are dragged, dropped, resized, and positioned to create a template as a DLEX file. The DLEX file, combined with a JSON dataset, is then used via the DynamicPDF CloudAPI's pdf or dlex-layout endpoints. The following topics list the DLEX document sections, major Designer Interface Layout elements, and then describes the major features of Designer.

SectionDocumentation
DocumentDocument
PagePage
ReportReport
info

Use the dlex-layout and pdf endpoints to process DLEX files created using Designer.

Designer Layout ElementDocumentation
AztecBarcodeAztecBarcode Layout Element Details
ContentGroupContentGroup Layout Element Details
DataMatrixBarcodeDataMatrixBarcode Layout Element Details
FormattedRecordAreaFormattedRecordArea Layout Element Details
ImageImage Layout Element Details
LabelLabel Layout Element Details
LineLine Layout Element Details
LinearBarcodeLinearBarcode Layout Element Details
LinkLink Layout Element Details
NoSplitZoneNoSplitZone Layout Element Details
PageBreakPageBreak Layout Element Details
PageNumberingLabelPageNumberingLabel Layout Element Details
RecordAreaRecordArea Element Details Layout Element Details
RecordBoxRecordBox Element Details Layout Element Details
RectangleRectangle Layout Element Details
SoftBreakSoftBreak Layout Element Details
SubreportSubreport Layout Element Details
SymbolSymbol Layout Element Details
info

The designer-usersguide-examples GitHub project contains numerous examples illustrating the many different components of a DLEX document. The Samples folder in your DynamicPDF cloud storage also contains numerous example projects. Refer to the Designer Examples documentation for more information.

Main Window

Designer's UI consists of a toolbar along the application's top, the document window, and the properties window.

info

Every Designer report MUST have associated JSON data. You cannot use Designer without specifying data.

When opening Designer with no DLEX file loaded, you are presented with the File Explorer. You must either open a DLEX file from the File Explorer, add a file to your File Explorer from your local system, or create a new DLEX file.

Figure 1. Designer's main window.

tip

Right click anywhere in the File Explorer right pane to display a New DLEX option.

After loading a DLEX file or choosing to create a new DLEX file, Designer is enabled.

Figure 2. The DynamicPDF Designer application main window.

Toolbar

The toolbar buttons along Designer's top are described from left to right.

Figure 3 The DynamicPDF Designer's toolbar.

Toolbar ButtonDescription
New DLEX FileCreate a new DLEX file.
Open DLEX FileOpen an existing DLEX file.
Save DLEX File/Save AsSave a new DLEX file or Save As to overwrite an existing DLEX file.
CutCut to clipboard.
CopyCopy to clipboard.
PastePaste from clipboard.
UndoUndo the last command.
RedoRedo the last command.
Zoom PercentageZoom by a percentage of 1 to 100.
View DLEX SourceView the DLEX file currently in Designer (read only).
Edit Layout DataEdit the JSON layout data or create new layout data.
Run ReportGenerate a PDF and display it in a separate browser window.
SettingsSettings.
HelpHelp documentation.

Switch the application you wish to work with by selecting the desired tool in the main navigation button (the DynamicPDF image). You can switch between DynamicPDF Designer, Portal, and API and Help Documentation.

Figure 4. DynamicPDF Designer's main navigation button.

TaskDescription
DynamicPDF DesignerOpens DynamicPDF Designer.
PortalOpens the Portal.
API and Help DocumentationOpens help documentation.

New and Open DLEX File

Selecting the New DLEX File button opens the File Explorer. Selecting Open DLEX File opens the File Explorer with the Create button replaced with an Open button.

Figure 5. DynamicPDF Designer's File Explorer, creating or opening a DLEX file.

tip

Right-click in the folder pane to create a new folder.

Adding a File

Drag resources from your local system to the Drag files here to upload to this folder button to add files to your cloud storage space using the File Manager.

Figure 6. Add resources to your API resources by dragging local files to the Drag files here... button.

info

If you add a DLEX file and there is a JSON data file of the same name, then Designer will automatically load the JSON data file for you.

View DLEX Source

Selecting the View DLEX Source button opens the DLEX Source View.

Figure 7. View your underlying DLEX file by selecting the DLEX Source View.

tip

The DLEX Source View is read only. You must download the DLEX file to your local system if you wish to edit manually.

Edit Layout Data

The Edit Layout Data is where you add or modify the DLEX file's JSON data. You can open a pre-existing JSON data file using the File Explorer and also save the JSON data.

Figure 8. The Layout Data Editor displays your JSON dataset for your DLEX file.

tip

Refer to JSON for more information on layout data.

Run Report

The Run Report button (the green arrow) will attempt to generate the PDF document from the DLEX file combined with the JSON dataset.

Figure 9. Create the PDF document by clicking the Run Report button.

Add Page and Add Report

The Add Page Button adds a new page to the Document Window while the Add Report button adds a new Report to the Document Window.

Figure 10. Create a new page or new report to a DLEX by selecting the Add Page or Add Report button.

Control Elements And Properties

You can add new pages and reports to the Document Window by selecting the Add Page or Add Report buttons.

Adding Elements to a Page or Report

You add elements to a page or report by right-clicking and making a selection from the context menu.

Figure 11. Add elements to a DLEX file through the context menu.

You add RecordBox elements by dragging and dropping the JSON field name from the Data Explorer.

Figure 12. Adding a new element from the Data Explorer.

Page

Upon creating a new page you are presented with a blank page. You can only add static elements and non-repeating top-level JSON fields to a page. Only valid selections are displayed in a page when you right-click and view the context menu (invalid choices are greyed-out).

Adding RecordBox or RecordArea

You can only add non-repeating top-level JSON fields to a page. For example, suppose you had the following simple JSON dataset.

{
"Title":"My Report",
"ReportCreatedFor": "Alex Smith",
"Products": [
{
"ProductID": 17,
"ProductName": "Alice Mutton",
"UnitPrice": 39
},
{
"ProductID": 3,
"ProductName": "Aniseed Syrup",
"UnitPrice": 10
}
]
}

You could only add the Title and ReportCreatedFor elements to the page as a RecordBox or RecordArea. The repeating elements in the Products array must be added to a report rather than a page.

Page Properties

Figure 13. The Page Properties explorer.

The Page Properties explorer contains formatting properties for a page.

PropertyDescription
bottomMarginThe bottom margin of the page dimensions in points (1/72 inches).
leftMarginThe left margin of the page dimensions in points (1/72 inches).
pageHeightThe page height in points (1/72 inches).
pageOrientationDrop-down with two choices: portrait or landscape.
pageSizeDrop-down list of most page sizes.
pageWidthThe width of the page dimensions in points (1/72 inches).
rightMarginThe right margin of the page dimensions in points (1/72 inches).
topMarginThe top margin of the page dimensions in points (1/72 inches).
templatePageNumberThe page to take from the template to add to the page/report.
templatePathThe path to the PDF template.

Report

You create a report by clicking the Add Report button. This adds a blank report with header, footer, and a body section. The header and footer contains non-repeating data fields and static data such as labels. The details contains the repeating report data from the JSON dataset.

Figure 14. The major sections of a report.

Report Properties

PropertyDescription
idThe identifier of the report.
bottomMarginThe bottom margin of the report dimensions in points (1/72 inches).
columnLayoutA value indicating how the data in the columns will be laid out.
columnSpacingThe amount of space between columns.
columnsThe number of columns the report will have.
leftMarginThe left margin of the report, dimensions in points (1/72 inches).
pageHeightThe report height in points (1/72 inches).
pageOrientationDrop-down with two choices: portrait or landscape.
pageSizeDrop-down list of most page sizes.
pageWidthThe width of the report dimensions in points (1/72 inches).
rightMarginThe right margin of the report dimensions in points (1/72 inches).
rowSpacingThe amount of space between consecutive rows in the report.
topMarginThe top margin of the report dimensions in points (1/72 inches).
dataNameThe name from the JSON data that repeats for each record.

Report Properties

Figure 15. The Report Properties explorer.

This property specifies the manner in which the columns will be populated. The three options are explained below (default for a Report is verticalUneven, default for a Subreport is verticalEven):

  1. horizontal – Records will appear horizontally across the columns. For instance, if a report has three columns, records will first be placed in column 1, then 2 then 3, then back to 1 and continue in this fashion. A column layout of horizontal will never be splittable.
  2. verticalUneven – Records will vertically fill column 1, then proceed to subsequent columns. This is the default layout.
  3. verticalEven – Records will vertically fill column 1, then proceed to subsequent columns. On the last page, the verticalEven option will layout the records so that they are as evenly displayed on the page as possible. For instance, if a report has three columns and the last page has 6 records to display, the verticalEven layout may display 2 records on each of the three columns. Where the verticalUneven layout may have just placed all 6 records in the first column.

Template

Templates are a powerful and easy way to add professional formatting to your reports. A template is added to a page or report. When added to a report, the template is divided into three sections, header, footer, and details in the report.

info

Refer to the tutorial, Creating a Report Using a Template, for a comprehensive example illustrating adding a template to a report.

Figure 16. A template displayed in a DLEX report.

Resizing Template

When loading a template, you must resize the dimensions. For example, in the previous template, we resize the report's header, footer, left and right margins. We then must resize the header, footer, and details section's widths.

Figure 17. A template that matches the report's sizing.

Resizing

Resize the report to use the appropriate dimensions for a template using the following properties.

Margin/SizeElementProperty
top marginReporttopMargin
bottom marginReportbottomMargin
left marginReportleftMargin
bottom marginReportbottomMargin
header heightReport (header)height
footer heightReport (footer)height
details heightReport (details)height

Template Properties

Figure 18. A template displayed in Designer.

PropertyDescription
idThe template's identifier.
templatePageNumberThe page number of the template.
templatePathThe path in File Manager to the PDF template.

Header/Footer/Details

A report's header, footer, and details are used to space the report to display correctly when the JSON data is applied to generate the report. Each report section is displayed using the following logic.

  • The header repeats for each page of data.
  • The footer repeats for each page of data.
  • The details repeats for each data row.

For example, suppose displaying all the data in a JSON dataset took three pages to display, the header and footer would be displayed three times. The details would be displayed for each row within the dataset.

PropertyDescription
idThe unique identifier of the header.
heightThe height of the header section.

Figure 19. A report's header and footer details displaying the Header Properties.

PropertyDescription
idThe unique identifier of the footer.
heightThe footer's height.

Figure 20. A report's header and footer details displaying the Footer Properties.

Body
PropertyDescription
idThe unique identifier of the body section.
autoSplit
heightThe height of the body section.

Figure 21. A report's Body and Detail Properties.