Downloading a PDF

I am trying to download a PDF file that is returned from a 3rd party API. The PDF is returned from the API in the following format:

%PDF-1.4\n1 0 obj\n<<\n/Title (��Invoice)\n/Creator (��wkhtmltopdf\n/Producer (��Qt 4.8.6)\n/CreationDate (D:20210303185413Z)\n>>\nendobj\n3 0 obj\n<<\n/Type /ExtGState\n/SA true\n/SM 0.02\n/ca 1.0\n/CA 1.0\n/AIS false\n/SMask /None>>\nendobj\n4 0 obj\n[/Pattern /DeviceRGB]\nendobj\n7 0 obj\n<<\n/Type /XObject\n/Subtype /Image\n/Width 400\n/Height 102\n/BitsPerComponent 8\n/ColorSpace /DeviceGray\n/Length 8 0 R\n/Filter /FlateDecode\n>>\nstream\nx��]y|E�r��+���pI8\pEA�T�E/@��0�+,\nQA ,�@@ ��ܒ@�[ @�3Q�#$��L������gfc~���/�����zS�u|�̈́��3T�3�O@虮�Θ3�*$�6�����J�aB��N�\b�!n�K��̸o\te�\nq�3T(4<+y������:��5�b��e��\r’�����U4<\t+�k���"�\b���L=�B�|ǂtǭc�p��e���� ��\b�an�av�+y�N")\u000bb�����`fo�x��BC��R\u000b�y],{f�����y4��4�^�u�~f4\bPM=�G"d����M�:^�� 9�SU<�0\tǠ _=a_�e/�Lބy���g�H8+�\fZ��,�\t�򄇟����QX��X�� �j’?G�A}������߆�˦.#��9n�������1?C��A�^�IaC�%S�;B��[�\u000b0� …

How can I download this file in appgyver? Is there some way to do this using JS?

Hi Adam, you can use the Write file flow function to generate the PDF, and then use Export to downloads to get it on the user’s device.

Hello, i would like to generate a PDF from Appgyver but i don’t know how to use API could you assit me please and show me how to do it. Thank you

This was answered here :slight_smile:


Where is that flow function?

Hi @Makanaka_Dumbu, you can find all available flow functions via the Marketplace in the Logic editor at the bottom of the screen.