Merged PDF
Does anyone have a working workflow example of merged pdf's. To be clear I'm not referring to a multipage report, I am looking to compile a multi map document. I can do it in the old Essentials but don't want to revert to that.
I turn on layers and produce a print then change the layers and run another print etc. then run a server workflow to merge the pdf's. However, the actual pdf's don't seem to return, I get a ticket response which shows the pdf and I suspect that is my problem. Yes I have set expect to blob in my Send Web Request but I'm not convinced that I'm getting the pdf bytes as the only URL I have appears to be for the ticket response not the physical pdf.
I have had success merging existing pdf's but I haven't had success automating the saving of the ticket response pdfs so I can merge them and I don't know where VertiGIS Studio puts the temp files the ticket response references.
I am sure I'm being a plonker and missing a step but of course I don't know what I don't know.
-
Thank you for your question. I believe I can help clarify the issue you're experiencing with merging PDFs in VertiGIS Studio Workflow. First off, you're not a plonker—PDF workflows have stumped many people. The key step you might be missing is converting the blob from the web request into an "actual" blob using a Create File activity. This step, while not immediately obvious, is crucial for the process to work correctly.
I've prepared an example of a working solution that should address your needs. You can find it here. If you don't have SaaS access, I've also provided an exported version for your convenience.
Let me outline the workflow for you step by step:
- Create Value:$blobFiles // create a collection to hold the report files
- Run Report:$runReport1
- Run Report:$runReport2
- Send Web Request:$webRequest1 // download report 1 from URL
- Send Web Request:$webRequest2 // download report 2 from URL
- Create File:$file1 // convert arraybuffer result to real blob - the missing step!
- Create File:$file2 // convert arraybuffer result to real blob
- Add Item // add to files collection
- Add Item // add to files collection
- Merge PDFs:$mergePdfs1 // do the darn thing
- Download File
I hope this helps clarify the process for you. If you have any further questions, please don't hesitate to ask.
3 -
You're a legend! Still lots left to do to get the workflow where I had it in Essentials but this missing piece of the puzzle has me moving forward again. Thanks heaps.
0 -
Super welcome, Brett! Let us know if there are any other specifics you are stuck on.
0 -
Thanks for the kind offer. I think I should be good on most of it but will definitely keep that in mind for the future. One quick question though, is there a way of setting the resolution used by Run Print?
0 -
Brett Steele Keep an eye on this idea:
A way to set resolution with the Run Print activityIt will be included in Workflow 5.41, planned for release in a few weeks.
As always, there will still be a delay between then and VertiGIS Studio Web upgrading to the new version of Workflow.
1
Please sign in to leave a comment.
Comments
5 comments