Saving a PDF to Dropbox

Okay, I’ve finally managed to reproduce the issue.

Using http://www.annualreports.com/HostedData/AnnualReports/PDF/NASDAQ_AAPL_2017.pdf as my example, if I share sheet to print, then ‘expand’ and share on from there to a Shortcut that saves as PDF to Dropbox, I get the conversion error for failing to convert fro extension item to text.

If I view the content graph of the share I can see it coming through as an extension item two steps removed from a PDF on the graph.

If you put a Quick Look action in you just get a null from the extension item.

I’ve tried various action coercions around files, PDF and a variety of things in between, but nothing got me any further. It looks like it might be a limitation in the content graph engine … but at the same time I can’t see the pattern as to why the print-share is sometimes passing on as a PDF and sometimes as an extension item. The underlying issue for that may simply be there.

But overall, I don’t think this in anyway steers you away from the Copy To action really being your best option for your original scenario.

1 Like

Thank you for looking into this so deep! I’m not sure I understand that content graph thing, but I think you’re right that the copy to Dropbox action is probably best for this use case.

I have another use case where I want to scan documents and save them to Dropbox, but ideally without the Dropbox UI for that (I find it cumbersome to use.) I was playing around with scanning a document into Notes, and then opening the document from the note and sharing it from there to a shortcut that saves it to Dropbox - but even then I’m hitting a different weird error! See the screenshot below… but this doesn’t happen for the PDFs you linked above, for example…

(I just tried deleting and reinstalling the Shortcuts app, no change)

I use Scanbot for this generally - you can set up custom actions for new scans including moving to particular folders on Dropbox. The Dropbox app now has its own scanner, too.

Yes, that’s what I’m currently using - but I don’t like the Dropbox UI, it’s cumbersome to navigate through the folder hierarchy I have, and to rename the files in the format I want. Ideally, I want a Shortcut that can accept a PDF (or, even more ideally, scan the files to create the PDF itself), then ask me what kind of document it is (which will relate to a particular folder path), ask me a couple more questions relating to the filename, and then upload the file to Dropbox in the right place with the right name.

I’ll take a look at Scanbot, I have used it before - but perhaps I can use it purely for scanning, and then share that to a Shortcut that does what I’m after. Thanks!

Annoyingly Scanbot just posted an update going subscription for new feature and breaking the app for existing users. Hopefully the latter will be fixed soon.

Have you tried saving to Dropbox through the “Save to Files” option in the bottom row of the Share Sheet? That worked for me when I ran into a similar issue.

This happens because Dropbox’s extension tries to re-download the file instead of using the copy that Safari is already showing. Dropbox doesn’t have access to the authentication cookie that Safari received when you logged in, so from their perspective it looks like you’re trying to download again without being logged in.

When you use “Save to Files”, Safari just hands off the copy it already has, avoiding that problem.