I created a function on Google Cloud that manipulates images once they are uploaded to Google Cloud Storage.
The function works well with nearly all the images types I require to support, except when I get to PDF handling. I am trying to convert PDFs to Images and I get the following error:
Failed to resize path/75/ae4d8a49-ea8e-4473-a679-14a372e2afba_rear.pdf. Error: Command failed: identify-im6.q16: not authorized `/tmp/ae4d8a49-ea8e-4473-a679-14a372e2afba_rear.pdf' @ error/constitute.c/ReadImage/412.
Upon googling this error, I found out is related to policies and suggest editing a policy.xml file (https://cromwell-intl.com/open-source/pdf-not-authorized.html). However, this does not seem to be possible within Google Cloud Function.
Any ideas on how I can manipulate PDFs within Google Cloud Functions?
Note: This may be related to Google cloud function permission problems