Could you describe how you are using the plugin and possibly send screenshots of your workflow. I can only give general answers based on that screenshot. That appears to be a cloudfront error and not a plugin code error, so I would need to look into it further.
I have a workflow with an API workflow in which I extract page selected by the user from a pdf.
Each page extracted is a one page PDF.
I store all theses pages in the database as list of files.
Then I use your plug-in to merge this list of files.
The error occurs during the step 4
The fun part is, when I upload the file stored in the List of files directly to a multi-Fileuploader and I use your plugin, it is working…
Assuming that “Result of step 2 (Create a new Test…)'s Tampon_page” is a single-page PDF file, then this object would only be one PDF File/Page, not a list. The best way to handle this would be to store all the Tampon_pages in an object (or their own individual objects), then do a search for them, and finally to merge them.
If I am wrong in my first bullet point, and “Result of step 2 (Create a new Test…)'s Tampon_page” is in fact a list of PDF Files, then my only other suggestion at this point would be to check your permission settings. See below.
The Error
This error is not being thrown from the plugin; it is being thrown from Bubble (by cloudfront). The run command is executing, but somewhere in cloudfront’s end (not the plugin’s) is throwing the error. If any of the files are private, the plugin may not be able to access them. You may need to adjust your privacy settings in Bubble to allow the plugin to access them.
Hope this helps!
I merge a list of pdf that are private. But the result of the merging is not a private file.
What should I do to get the generated file to be private ?
Hi @Mothman :
This plugin brings support for PDF-Lib.js to Bubble. The front-end/client-side version (what this plugin currently is) uses their CDN to load the required code onto your web-page (Bubble + the plugin handle all of this).
To run in the backend, the server would need to use npm. I’ve had a lot of difficulty building back-end plugins in bubble because debugging is so difficult. While PDF-Lib.js does have npm support, we don’t have the time to invest in open-source projects right now to develop and debug a back-end merger… if this is something you urgently need, we can discuss more over email (me@nicholasrbarrow.com).
@Mothman I stand corrected… converting the existing code doesn’t look that difficult. I hope to push a backend update so you can run this server-side/backend in the next day or two!!
Worry not. After a while you have an integrated debugger in your brain, muscle-memory coding structure in your fingers and as we all should, spend much more time on the third-party library code and documentation before declaring the first variable
I just pushed v3.0.0… now supporting backend merging (@Mothman by request)!!
Currently, to get this out as soon as possible, there is only a “Backend Merge Two PDFs” option, but more are planned soon.
@Mothman The problem with backend workflows is that there is no way to trigger an event when they finish, but the good news is, I believe that backend actions do not proceed until they have finished. The best thing to do is create a new workflow, with step 1 being the merge and step 2 being what to do with the merged file. The nice thing about the backend is that everything occurs synchronously/in-order. Below is an example of a backend workflow, but the same should work in the front.
Please note that backend actions take significantly longer… in my free app (not on a paid plan) for that example, it takes about 20 seconds to do the merging (the plugin is also in demo mode, as well as the page in preview mode, so it should be faster using the regular plugin and not test mode of the Bubble app). Also, more PDFs to merge will mean more time to do the merging.
@nicholasrbarrow sorry to be a pain. I see that you are running the “Backend Merge Two PDFs” action on the front end . I have tried the following on the backend on a dedicated server and am missing the key to this puzzle. Can you see any issues with this workflow on the back end. It is not saving to the user data.