This plugin is one of the best I’ve seen for PDF’s in Bubble and I can’t thank you enough for making it free! I’m having a small issue with the “insert an image on PDF” action… for some reason, it’s throwing a CORS violation error when I try to use a dynamic image in Chrome. This does not happen on Safari. The exact error is “…has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.” This does not occur with a static image (unfortunately, I’m loading barcodes onto pages which require a static image).
Any thoughts? Thanks so much! Happy holidays to you and your family!
Nick
So, I’ve checked all steps and looked OK. Then, I’ve deleted all flow, carefully did it again and it is working fine. Probably some parameter was missing. Thanks for your answer !
We’re using the most recent version (2.1.1)… I’ve already got quite a few workflows so I’m worried about reverting back to a 1.x (I saw in the dev. notes that there was a breaking change in version 2.0.1). It’s not the biggest deal so I can try to work around it.
I actually found the solution while working on a plugin to merge pdf’s… it’s because modern browsers use CORS and requests need to come through a CORS proxy (I used https://cors-anywhere.herokuapp.com). Essentially, all requests to Bubble URL’s (such as “http://s3.amazonaws.com/appforest_uf/f1609560050023x942210852846408200/file.pdf”) need to be made as “https://cors-anywhere.herokuapp.com/http://s3.amazonaws.com/appforest_uf/f1609560050023x942210852846408200/file.pdf” in .fetch(), etc…
If possible, could this be worked into the program? Thanks! I’m willing to help out where I can, so if I can be of service let me know. As a side note, I think you use PDF-lib to do all the work on PDF’s and I just figured out how to merge PDF’s using that same library. When I get it cleaned up, I’m going to make the plugin free. I’ll send you think link for you/others to use (it runs client-side so no external API’s to have to pay for and no server-side code).
Oh, I don’t really think using an external proxy is a good solution. We usually can solve the CORS issue somehow else. I’d just need to know how to reproduce the issue.
Anyway, on the other subject, while I don’t use PDF-lib, it’s cool to know that you implemented a merge solution (:
Definitely share the link here, I bet some people will be interested.
Maybe that’s currently possible already, isn’t it? I haven’t tested to be honest, I don’t know what the :imgix operators return. If they return a text like this //url.com/myfile.jpg which is the normal image format, then it’s fine. Else it would need adaptations.
Oh that’s something it would be awesome to do! I’m waiting until I can land an upgrade big enough on the plugin to fit this one in as a collateral, so to speak, so it’s a possibility in my map, yes.
Also one could sponsor that feature specifically
I tried using a dynamic image (User profile image) with Imgix but there’s no formating happening on the PDF. This whould be handy as images needs to be rendered as JPG and for best results.
Got it, yeah then I’d need to set apart some time to inspect the :imgix operator and see how exactly it works code-wise, so I can try to grab its result instead of the normal URL or see alternatives on doing so.
Hi, I’ve been getting this error since yesterday does anyone know how to solve it? Prior to yesterday I was able to download without any problem at all.
Hello! Can you see what values are being passed in the debugger to the create table action?
Also, did you upgraded your plugin version and found this bug? If so, downgrading it solves the issue?
Hi @vini_brito,
its been a while but back on hat topic
Thanks for not forgetting. However maybe I am blind but I cannot find any background element action or I don’t understand what you mean by “”…right where the header & footer checkboxes are"…
Okay, so I have managed to figure out how to make and save PDFs.
But how can I download the PDF from another page?
I made the PDF on one page and saved it to the database, but how can I download it from another page with the press of a button? I don’t see any commands for it in the workflow.
Oh and also how can I just get the PDF to open in a new tab w/o having to download it? Possible? @vini_brito
I went live with my site yesterday. Around 700 users need to enter orders for a project over the next two weeks through this. Accordingly, it is quite urgent. The bad thing is that most users use IE as default browser in an even older version 11.0.9600.19596. The error also occurs in Chrome 80.0.3987.106 (32-bit) and in Firefox 52.3.0 (32-bit).
New question!
Is there a way to create PDFs in a loop? The information has to change with every loop so every PDF created will be different. I tried to do it in the backend but you can’t place the PDFModel anywhere ofc so I don’t know how to do it.
My idea was to create a custom event that has the PDF steps and trigger the event in a loop, but since you can only trigger custom events on the page they were created on, then I can’t do it through backend.
Any ideas? Otherwise it’s just going to be a lot of repetitive code. @vini_brito