Convert pdf to image
Function: Convert PDF to Image
This function allows you to take a PDF document stored in your platform's media library and transform each of its pages into a separate image. This is useful when you need to display PDF content as images, extract specific pages, or integrate PDF content into other image-based workflows.
Input
- Media ID of the PDF file (Type: STRING) The unique identifier for the PDF file stored in your media library that you wish to convert into images. You can usually find this ID when you upload or manage files in your media library.
Output
- Result (Type: ARRAY) A list of the converted images. Each item in this list represents one page from your original PDF document, now in image format (e.g., PNG).
Execution Flow
Real-Life Examples
-
Displaying PDF Previews on a Web Page:
- Inputs:
- Media ID of the PDF file:
report_Q3_2023.pdf(assuming this is the ID for a quarterly report PDF)
- Media ID of the PDF file:
- Result: The function converts the "quarterly report" PDF into a list of images. These images can then be displayed as a gallery or carousel on a web page, allowing users to preview the document without downloading the full PDF.
- Inputs:
-
Extracting Specific Pages for a Presentation:
- Inputs:
- Media ID of the PDF file:
project_proposal_v2.pdf(ID for a draft project proposal PDF)
- Media ID of the PDF file:
- Result: The function converts the "project proposal" PDF into a list of images. A user can then select specific images (e.g., pages 3, 5, and 7) from this list to include in a new presentation slide deck or share as individual image files.
- Inputs:
-
Archiving Invoices as Image Records:
- Inputs:
- Media ID of the PDF file:
invoice_2023_08_001.pdf(ID for a customer invoice PDF)
- Media ID of the PDF file:
- Result: The function converts the "customer invoice" PDF into a list of images. These images can then be stored alongside the customer's record in a database, providing a visual archive of the invoice that is easily viewable across different systems, even if they don't natively support PDF viewing.
- Inputs: