Questions tagged [adobe-documentgeneration]

Adobe Document Generation is an API that lets developers use Microsoft Word documents as templates that merge with their data to create dynamic PDFs and Word docs. Find out more at our docs: https://opensource.adobe.com/pdftools-sdk-docs/docgen/latest/index.html

8 questions
1
vote
1 answer

How do I work with a list of simple, not-complex, values?

When looking at the docs for Lists (https://opensource.adobe.com/pdftools-sdk-docs/docgen/latest/templatetags.html#lists), it demonstrates an array of objects: { "products": [ { "productName": "Adobe Photoshop" }, { …
Raymond Camden
  • 10,661
  • 3
  • 34
  • 68
1
vote
1 answer

How can I conditionally show a section based on if a filtered array would show items?

I'm using Document Generation and have used filtering in lists like so: {% repeating-section cats[weight > 5] %} This will loop over a cats array and only show items where the weight property is over 5. This works fine, but I'm using it in a…
Raymond Camden
  • 10,661
  • 3
  • 34
  • 68
1
vote
1 answer

Formatting calculated values in Adobe Document Generation API

In the template language docs for Adobe Document Generation, mathematical expressions can be done using tags like below... {{expr(revenue - expenditure)}} This works and outputs a number, but is there any way to apply formatting to the number, for…
joelgeraci
  • 4,606
  • 1
  • 12
  • 19
0
votes
1 answer

AssetID auto deleting somehow | Adobe PDF Services API

I'm having issue where my assestID of a file uploaded via the assets api, deletes/expires somehow? I'm using the Adobe pdf services api (https://pdf-services-ue1.adobe.io) to upload a .docx file to then perform the document generation. At first the…
0
votes
1 answer

Json with Nested Array Schema

I have the below JSON and when I use it in Adobe Document Generation API, it gives an error as below. I'm not sure whats the issue with the JSON scheme. [ { "OwnerID": "L001", "Properties": [ [ { …
0
votes
1 answer

$formatNumber outputs NaN when used in table array

I'm applying number formatting to a PDF document, which works fine in a 'parent' record in the JSON data, but fails when used inside a table. How can I get the $formatNumber expression to work inside an array of data? The data is being merged into…
Greg J
  • 3
  • 1
0
votes
1 answer

How do you use a complex, or multi part conditional with Adobe Document Generation?

When using the Word add-in, I can create a condition on one value (if some property is greater than, less than, etc to some value) but I can't check multiple values. So for example: if name is "ray" and age > 48. How do you do that?
Raymond Camden
  • 10,661
  • 3
  • 34
  • 68
0
votes
2 answers

Conditional logic on the same line in Adobe Document Generation is not recognizing template tags

I have a json field that is either absent or is set to true. But in my document I want it to show up as "Yes" or "No". I tried the following conditional expression (): {% conditional-section expr(`my_field` = true) %}Yes{% end-section %}{%…