Jump to content

Complex Scribe Process


This topic is 1263 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi everyone. I have a complex used of Scribe I need a little help on. I have a two page PDF tax form page 1 has static company information on it and page two places for 4 peoples names. What I need to do is loop through a found set up records and for the first pass through 4 records fill out both pages and then after the first 4 use the ScribeSplice function to grab just the second page of the PDF and use it to fill out X number pages with 4 records each and then use the ScribeMerge function to merge that second page with the first one. 

Lets say I have 40 records the end result I need is an 11 page PDF the first two pages using the full 2 page PDF and then 9 more pages (36 records) using just the second page merged into the first original form.  I have figured out how to pass many records to the same from but I need help using the splice and merge functions when looping thru the records to create one final compiled form as the end result.

I appreciate any guidance you can offer.

--
Mark Lemm
President
Lemm Tech Enterprises Inc.
24th year! 1996-2020

Claris FileMaker Partner
https://www.claris.com/filemaker/


image.png.85967b7a7cb4261b2d4f63c3e2ec0360.png

 

Link to comment
Share on other sites

Hi Mark,

the way I would approach this would be to have 4 containers. One for the original PDF with the two pages (container1), one for the first iteration where you fill out both pages(container2) this will also be where you save the merged PDF, one for "page 2" of the PDF(container3), and one to save the modified "page 2" of the PDF. The workflow would go something like this:

ScribeDocLoad(container1)

Fill out PDF save to container2

Set Field[someTable::Container3; ScribeSplicePDF(container1;2) ] //splices out "page 2" and saves to container3

loop

ScribeDocLoad(container3) //loads "page 2" 

fill out "page 2" with relevant info

Set Field[someTable::Container4; ScribeDocSaveContainer("ModifiedPage2.PDF") //saves the modified "page 2" to container4

Set Field[someTable::Container2; ScribeMergePDF(Container2;Container4)//Merges the current merged PDF with the modified "page 2" and saves it back to container2

exit loop after last record in found set

There is obviously some more logic that you will need to include there as far as iterating over records etc but I believe this should allow you to fill out the first two pages, save it as the master resulting PDF, split page 2 from the original PDF, fill out page 2 with the next 4 records, save it, then merge it to the master PDF, repeat for all records in found set

 

Link to comment
Share on other sites

  • Newbies

Thanks Ryan I did figure it out. I used a second container field for all the page 2's for the groups of 4 records each in the found set. Turns out splicing won't work you loose all the field name references on the new file something to keep in mind in a case like this. Attached is the final output for those that are interested. 

592pages.png

Edited by lemmtech
Link to comment
Share on other sites

This topic is 1263 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.