I’ve tried to modify the built-in shortcut to scan a QR code and open the page. I want to download a PDF from a QR code, save it to ‘Files’ and then open it. The problem appears to be that the PDF is served out by a CMS, so the URL in the QR code is a .apx file, and the ‘download content’ shortcut action only gets the .apx reference, not the PDF!
An example URL from a QR code is https://kingsgateuk.com/Publisher/File.aspx?id=217755
Can anyone help me discover how to download and save the referenced PDF? This is what I have got so far…
how about the following Shortcut:
If you take the „Create PDF“ (hope this is the correct english name for the action) Shortcuts should be able to convert it into a pdf.
Does this solve your Problem?
Using that URL works fine for me with the sort of setup you have. But, I am running the latest beta for Shortcuts, so maybe there’s a bug fix I have that you might not?
It might be useful if someone else could check on a non-beta version?
I already tried that and couldn’t get it to work.
Thanks for the suggestion though.
Ooh! That’s encouraging
I’ve just installed 12.0.1, so I’ll have to check if it’s fixed in that version.
OK, I just checked using 12.0.1
The same thing is happening - the HTML is downloaded, which is rendered like the PDF version, but isn’t the same. For example, opening the HTML does not allow the use of markup tools, whilst the PDF does.
Is this what you are seeing? In the ‘Files’ app, the preview just has ‘html’ as the preview icon, not an actual preview of the PDF file.
If I manually scan the code, open the web page, use the share sheet to save the file to ‘Files’, I get a true PDF that can be annotated. I can’t seem to be able to do that through Shortcuts.
I’m still on 2.0 (700), so it looks like they’ve fixed a bug!
I’ll wait until 2.1 is released and check again.
thanks for checking
If you want to try debugging in the meantime, try adding the Content Graph action after Get Contents of URL. If it is returning more than one data type, you will need to add the ‘get file of type action’ and add ‘com.adobe.pdf’