Company portals
Import template fields from JSON or a fillable PDF
Reuse named text fields and measured positions without scanning flattened printed text.
Guide source reviewed for PressFlow 2.0.5.
Requires PressFlow 2.0.2 or later. Enable B2B storefronts and Locked brand templates in PressFlow settings > Features & integrations.
Open PressFlow > B2B storefronts, manage the company and choose Brand templates > Create an approved brand template. Select the approved product specification first. Its finished size, bleed and artwork page count determine the template geometry. Imports do not resize a product or publish a template.
Fastest setup: background PDF and JSON
- Choose a background PDF containing the fixed logo, graphics and text. Leave the areas customers will personalise blank. Use an unencrypted PDF 1.4 without object streams, up to 5 MB, with the full bleed included.
- Expand Import or reuse text fields. Choose a JSON field-settings file or paste its contents, then select Review JSON fields.
- Check the field names, pages and positions. Choose Replace current fields to use the imported definitions. Alternatively, Update matching positions only changes page, left, top, width and height for existing matching IDs; it retains their font, size, colour, defaults, required setting and limits.
- Review the editable controls. Enter a template name and choose Check PDF preview. Inspect every page and test realistic names, addresses and long text.
- Publish only after that review. Check the result as a company purchaser.
Reading a file or selecting Review does not replace fields. Cancel import leaves them unchanged. Undo last import restores the previous field list until you manually edit fields or change the selected specification/background. Export current fields as JSON saves a reusable copy, including geometry.
Use a PDF with named text form fields
An actual editable PDF text field supplies a reliable name, page and rectangle.
In your PDF form editor, create a text field called employee_name, for example,
and place it where that customer's name belongs. Use a unique name for each area.
Set its example text, point size, alignment and required/multiline properties.
Keep fixed artwork in the page itself; avoid placing fixed content in annotations.
Choose this PDF as the background, then select Read text fields from background PDF. Review the detected fields and apply them as above. If you have existing PressFlow fields, match their IDs exactly and use Update matching positions only to retain the approved brand styling. Otherwise, replace the list and review the suggested bundled font and all limits before previewing.
PDF font names are suggestions, not embedded font imports. PressFlow uses its bundled fonts for the generated text. Only writable text widgets are imported; buttons, signatures, password fields and read-only fields are ignored. Repeated names are rejected so that separate areas cannot silently become one field.
The generated print PDF imports the fixed page artwork and writes the approved text once. Source form widgets and their example appearances are omitted. Do not flatten example variable text into the background first: it would remain visible.
Plain employee_name is the recommended field name. A $ marker is not required.
Visible {{employee_name}} placeholders can help while preparing a design, but
PressFlow does not search and erase arbitrary flattened, outlined or scanned text.
A visible marker alone is not an editable PDF form field.
JSON format for developers
{
"format": "pressflow-b2b-text-fields",
"version": 1,
"units": "mm",
"origin": "top-left-full-bleed",
"spec": {"width_mm": 85, "height_mm": 55, "bleed_mm": 3, "pages": 2},
"fields": [{
"id": "employee_name", "label": "Employee name",
"default": "Alex Morgan", "required": true,
"page": 1, "x": 10, "y": 29, "width": 65, "height": 7,
"font": "Roboto Bold", "size": 12, "color": "#001326",
"align": "left", "lines": 1, "max_chars": 45
}]
}
Coordinates start at the top-left of the complete PDF page including bleed.
Width/height in spec describe the finished flat sheet. A two-sided A4 leaflet
folded to DL normally has two A4 artwork pages, not six small pages. No automatic
scaling is applied. Geometry declared in JSON must match the selected product.
Files can contain 1–40 fields and be up to 100 KB. Field IDs start with a lowercase
letter and contain lowercase letters, digits and underscores, up to 40 characters.
IDs must be unique. Labels allow 100 characters; examples and customer limits
allow up to 500. Examples support line breaks. Page numbers start at one, up to
16; rectangles must fit inside the full page. Font sizes are 6–60 pt, line limits
1–6, minimum area width 1 mm and height 2 mm. Colours are six-digit hex values;
alignment is left, center or right. Required is a JSON boolean.
Use the font names offered by the editor, or obtain the bundled catalogue from
assets/vendor/pdfme/fonts/catalogue.json. External font paths, URLs, scripts,
company membership, product prices and permissions cannot be imported here.
Bare arrays of native field definitions and the earlier PressFlow demo-pack JSON
are also accepted. Export writes the versioned format above.
Troubleshooting
- No writable named text fields: use actual PDF form text widgets, import JSON or add fields manually. A flattened PDF cannot supply editable rectangles.
- Size, bleed or page count does not match: select the matching approved specification or re-export the PDF. Include bleed in its visible page area.
- No matching IDs: use matching names or review a full replacement instead.
- Font is unavailable: choose an offered bundled font. PDF font suggestions need review; importing a form does not install its embedded font.
- Text does not fit: shorten the example, enlarge the approved area or review its line limit. PressFlow does not silently shrink the brand font.
- Preview cannot import the PDF: export unencrypted PDF 1.4 without object streams. Check that PHP mbstring is enabled and the upload is within host limits.
- Text appears twice: remove variable text flattened into the fixed background. Use a clean background or the supplied named-form sample, not a filled example.
Parsing JSON and scanning fields happen locally in the browser. The normal protected preview/publish requests upload the chosen PDF and validate definitions again on the server. Existing manager permissions, product access and immutable published-template rules continue to apply. This is not a public import endpoint.
Need a hand?
Contact the PressFlow team with details of what you are trying to do.