My workflow requires that I combine multiple PDF modules per customer request. I need to replace images in each of these modules based on customer’s requirements. Replacing images in each module before combining them works but it wouldn’t be cost effective given the number of API calls it would require.
Since the images to be changed are exactly the same in each one of the PDF modules, I figured I could combine all modules and then simply replace the images in the combined PDF. However, even though each module had the exact same image id prior combination, after combining them they acquire new images id which makes it impossible to target them all at once using the same API call
PDF modules prior combination ModuleA.pdf Target image Id: 'GM5TIMBUGU3DWMRZHAWDKOBXFQZTCMBMGU4TS' ModuleB.pdf Target image Id: 'GM5TIMBUGU3DWMRZHAWDKOBXFQZTCMBMGU4TS' ModuleC.pdf Target image Id: 'GM5TIMBUGU3DWMRZHAWDKOBXFQZTCMBMGU4TS'
Once I combine the different modules using ‘putMergeDocuments’ the images change their id as follows (I used ‘getImages’ to find them):
Images id in CombinedModules.pdf Target image id from module A: 'GM5TIMBUGU3DWMRZHAWDKOBXFQZTCMBMGU4TS' (stays the same) Target image id from module B: 'GEYDAOZUGA2DKNR3GI4TQLBVHA3SYMZRGAWDKOJZ' (changed) Target image id from module C: 'GE4TOOZUGA2DKNR3GI4TQLBVHA3SYMZRGAWDKOJZ' (changed)
Since the combined PDF module has the same image but with different ids, is there any way I can use ‘putReplaceImage’ to change a single image but to target multiple image ids so I can use a single API call? Are there alternative solutions?
The example I gave above is simplistic but serves to explain my point, in reality, replacing images per module prior combination would require 200 API calls per combined document. This wouldn’t work.
Thank you in advance for your help.