File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ async function processActionFileReferences(action: Action): Promise<FileReferenc
8888 const fileReference = await processFileReference ( action . file )
8989 action . file = fileReference . key
9090 return fileReference
91+ } else if ( action . type === 'applyInstantJson' && 'file' in action && typeof action . file === 'string' ) {
92+ const fileReference = await processFileReference ( action . file )
93+ action . file = fileReference . key
94+ return fileReference
9195 }
9296
9397 // No need to parse files for the other actions
Original file line number Diff line number Diff line change @@ -290,6 +290,27 @@ export const applyXfdfExample: BuildAPIArgs = {
290290 outputPath : 'output_pdf.pdf' ,
291291}
292292
293+ // Example with applying Instant JSON
294+ export const applyInstantJsonExample : BuildAPIArgs = {
295+ instructions : {
296+ parts : [
297+ {
298+ file : 'example.pdf' ,
299+ } ,
300+ ] ,
301+ actions : [
302+ {
303+ type : 'applyInstantJson' ,
304+ file : 'example.json' ,
305+ } ,
306+ ] ,
307+ output : {
308+ type : 'pdf' ,
309+ } ,
310+ } ,
311+ outputPath : 'output_pdf.pdf' ,
312+ }
313+
293314// Example with redactions using preset
294315export const redactionsPresetExample : BuildAPIArgs = {
295316 instructions : {
You can’t perform that action at this time.
0 commit comments