I'm using the PDF Viewer component from Retool to organize PDF's which are stored at a Supabase Bucket.
Retrieving the PDF's, showing them in the component, no problem.
But when I add the Rotate Button - it shows up, but it's disabled.
It's showing a forbidding symbol (hard to take a screenshot of it)
THe only way I can make this button work is with the demo file, also manual uploaded files won't allow to rotate.
Have you enable the rotate button into the inspect of add ons , if not then enable it. because in my app when i add the rotate button its working perfectly.
Hello,
We have run into this same issue. In our situation we are using manually uploaded files being displayed using the "url" specification of the pdf viewer component. All single page PDF documents have the rotate button blocked while multi-page PDFs work.
It's as if the rotate button is dependent on the "right" page arrow being enabled because scrolling farther into the PDF will disable the rotate button at the same time the right page arrow is disabled.
We deal with a lot of single page pdf documents that were input through a document scanner in large batches and we inevitably get documents that need to be rotated to be usable within our apps. If it was a design decision to block the rotate button on single page documents it would be excellent if it could be reconsidered as it would help tremendously to be able to rotate on any PDF document, regardless of size.
Can confirm from my testing that it seems only multipage PDFs can be rotated. Not sure if this was intentional or not but I can report this to our engineers and hopefully get this fixed quickly!
It sounds like the issue might be related to how the PDF files are being handled or stored in your Supabase bucket. Here are a few things you could check and try to resolve the issue:
File Permissions:
Ensure the files in your Supabase bucket have the correct read permissions. If the files aren’t publicly accessible or if there are restrictions, the Rotate Button in the PDF Viewer might not function properly.
File Format:
Double-check that the PDFs you’re using are valid and properly formatted. Corrupted or improperly encoded files might prevent certain functions (like rotation) from working.
Content Disposition:
When serving the PDF files from Supabase, verify that the Content-Disposition header is set correctly. If it’s being served as inline rather than attachment, it could potentially impact the viewer’s functionality.
Component-Specific Requirements:
Some components or libraries have specific requirements for enabling interactive features. Check the Retool PDF Viewer documentation to ensure your setup meets all prerequisites for the Rotate Button to work.
File Upload Method:
You mentioned manual uploads don’t work. Try re-uploading the files through a script or API call instead of manual upload to see if that changes the outcome. Sometimes manual uploads miss metadata or other configurations.
Compare with Demo File:
Since the Rotate Button works with the demo file, try inspecting its metadata (e.g., properties, encoding) and compare it to the files you’ve uploaded. You can use tools like pdfinfo or online PDF analyzers for this.
If none of these steps work, it might be worth reaching out to Retool support or posting an issue in their community forums or GitHub repository. They might have more insight into how the PDF Viewer component handles files from external storage like Supabase.