Is it possible for appsheet to create a pdf by merging 2 existing pdf files in the app?

Is there a way for appsheet to create a pdf by merging 2 existing pdf files in the app ? for example, I have file A and B in my app and I want to create a file C by merging the said A and B.

Thanks

Solved Solved
0 9 2,321
1 ACCEPTED SOLUTION

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Sattavut_Sudarchim

Welcome to the community !

AppSheet is not a PDF-tool, the best you can do basically is to generate one.

View solution in original post

9 REPLIES 9

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Sattavut_Sudarchim

Welcome to the community !

AppSheet is not a PDF-tool, the best you can do basically is to generate one.

That's a shame as a I too have this requirement. I have a number of files between 5-15 that I want to merge into a single PDF creating a single bundle, with each page number sequentially and then print it or share it. At the moment this is an entirely manual tasks that takes several hours. Great shame as I considered whether it was possible to select the files and have a bot print to PDF possibly into one file, effectively merging. ๐Ÿค”

Curious why you'd even think this would be something AppSheet could do?

Hi @Steve  I have a property that app that captures, generates, uploads property related documents. Some of those documents can then be 'tagged' to be used as 'evidence' in litigation proceedings. So far so good. But to create a 'court bundle' the evidence has to be catalogued a certain way, be in chronological order and worse, each page in the 'bundle' has to be sequentially numbered in the bottom-right-corner. Logically in the app I have created the 'bundle' but they remain separate files, so physically printing it is still a nightmare.

Possible solutions could be:

  • a) call an API or google script to 'merge' all the files into one PDF (with pagination), then print the one file.
  • b) call and API to add annotation to each PDF in the logical bundle to add page numbers, then print each file in the correct order.
  • c) Print the bundle (since it is in the correct order in the app) in one action to a printer.... then manually add the page numbers

At the moment, this manually takes hours, is very prone to error and is made worse if you have to provide 3 separate printed copies. Now that AppSheet has better integration with Google scripts I was hoping there would be a method to automate this horrendous manual process. Afterall, isn't that what AppSheet is all about?

There is literally an infinity of things that can be automated with App Script. Your logic suggests you think AppSheet should be capable of all of them. I think that's unreasonable.

Not all. That is not what I am suggesting. In the app I already have the list of documents, URLs and FILE values so I know where the files are located. They are already categorised and ordered in the correct order.

All I am looking for in a script is to LOOP through this list and to either:

  • a) print them all in one action (print this bundle), even it creates separate print-jobs.
  • b) print all the files to a PDF file (effectively a merge)
  • c) call an API to annotate each page with a page number 

Just one of the options above would SAVE hours of effort. Working with legal firms, MOST have a junior member of staff painstaking write on EACH page by hand the page number of a court bundle.

Are you suggesting there are no scripting options for any of the proposed options above?

I.e.

  • It is not possible to PRINT a document from within AppSheet
  • It is not possible to call a script or use automation to loop through a list
  • It is not possible to call a script to add an annotation to a PDF file (e.g a page number)

It is not possible to print from AppSheet. You would have to devise a way to send your document to another service outside of AppSheet to print.

Automation can call a script, and a script can make API calls to AppSheet.

Scripts can do anything scripts can do. But a script doing something is not AppSheet doing it.

Could you accomplish what you want? Yes. Could AppSheet play a role? Yes. But AppSheet itself would be only a minor component, I'd think. The bulk of the work, both in development and processing, would be outside of the app, in the script(s) and external services to process and print the documents.

Hi @Steve  following on from this question: I have an AppScript which will merge PDF files when given a list of URLs as a parameter and will return a URL to the resulting merged PDF file.  What I would like to do is use the multi-select function (see screenshot) to 'tag' these files as the ones I would like to merge. Creating the action to 'tag' the files is fine, but the automation isn't since since I only want to call the AppScript once, not for every file selected. Is there a way to capture the IDs of the files selected and/or the number (in a virtual column or view) to enable it be passed to the AppScript?

The merge function is represented by the link icon button in the screenshot.

Screenshot 2022-11-13 at 22.43.03.png

Any suggestions on how to accomplish this or is this even possible?๐Ÿค”

 

 

Steve
Platinum 5
Platinum 5

@Harriswe wrote:

Is there a way to capture the IDs of the files selected and/or the number (in a virtual column or view) to enable it be passed to the AppScript?


Not in a single step. You'll have to use the bulk action in the screenshot to somehow capture the selected rows, either by marking the individual rows or by adding rows to another table. The user would then need to take another action to act on the captured rows. Alternatively, don't use bulk actions and instead devise your own row-selection interface.

Top Labels in this Space