PDF.co PDF Editor is a web-based application that allows you to edit and modify PDF documents online without the need for any software downloads or installations. With PDF.co PDF Editor, you can perform various editing tasks such as adding text, images, and shapes, highlighting, underlining, striking out text, adding links, drawing and writing on PDF pages, and more.
One of the notable features of PDF.co PDF Editor is its ability to edit PDF forms. You can easily add, remove or modify form fields such as text boxes, checkboxes, radio buttons, and dropdown lists. Additionally, PDF.co PDF Editor also enables you to merge or split PDF files, password-protect your PDFs, and convert your PDFs to other formats such as Word, Excel, HTML, and JSON.
Today, we will show you how to generate an image using Dall E 2 by OpenAI & insert it into PDF using PDF.co and Zapier.
- Log into Zapier Account
- Google Drive App
- Setup Trigger
- Test Trigger
- Test Trigger Result
- Add OpenAI App
- Setup OpenAI Configuration
- OpenAI Test Action
- Test Action Result
- Generated Image from OpenAI
- Add PDF.co App
- Setup PDF.co Configuration
- PDF.co Test Action
- Test Result
We will use this sample PDF document to insert the generated image.
Here’s a simple step-by-step tutorial to generate an image with OpenAI and add the generated image to PDF using PDF.co.
Step 1: Log into Zapier Account
- First, log into your Zapier account and create a Zap.
Step 2: Google Drive App
- Next, search and select the Google Drive app. Then, choose the New File in Folder as a trigger.
Step 3: Setup Trigger
Let’s set up the trigger.
- First, let’s select the My Google Drive as a drive to be used.
- Next, choose the specific folder where the file is stored.
Step 4: Test Trigger
- Now, click the test trigger button to fetch the file from Google Drive.
Step 5: Test Trigger Result
- The test trigger was successful, we can now add another app.
Step 6: Add OpenAI App
- In this step, we will add the OpenAI app and choose the Generate Image option.
Note: To connect your OpenAI account to Zapier, add your API Key.
Step 7: Setup OpenAI Configuration
Let’s set up the OpenAI configuration.
- First, input a text in a Prompt to determine the subject, style, and other characteristics of the image to be generated.
- Next, add the number of image variations.
- Then, select the size of the image you’d like to generate.
Step 8: OpenAI Test Action
- Now, let’s send the prompt to OpenAI to process our request and generate an image.
Step 9: Test Action Result
- The OpenAI successfully process our request and generated an image. Kindly copy the URL and paste it into your browser to view the output.
Step 10: Generated Image from OpenAI
- Here’s the generated image from Dall E 2 by OpenAI.
Since we’re done generating the image, let’s add the PDF.co API tool to insert the generated image into the PDF document.
Step 11: Add PDF.co App
- Search and select the PDF.co app. Then, choose the PDF Filler so we can add the image to the PDF document.
Note: To connect your PDF.co account to Zapier, add your API Key. You can get the API Key in your PDF.co dashboard.
Step 12: Setup PDF.co Configuration
Let’s set up the PDF.co configuration.
- In the Source PDF field, enter the Web Content Link from your Google Drive.
- In the Images and PDF embeds field, add the
ycoordinate values that are used to locate a point to insert the image, and enter the
Data Urlgenerated image from OpenAI. You can easily get the coordinates using the PDF.co PDF Viewer tool.
- Then, add the PDF output file name.
Step 13: PDF.co Test Action
- Now, we will send the PDF Filler to PDF.co to process our request.
Step 14: Test Result
- Great! PDF.co successfully process our request and returned a temporary URL. Copy the URL and paste it into your browser to view the output.
Step 15: Output
- Here’s what the output looks like.
In this tutorial, you learned how to add an image to a PDF document with OpenAI using PDF.co and Zapier. You learned how to use OpenAI to generate an image. You also learned how to use the PDF.co PDF Viewer tools to easily get the x and y coordinates value.