• bing4

    (@bing4)


    Hello.

    How can we use a plugin like screenshot maker via Cron to schedule the saving of some custom URLs/divs to be saved as an image?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pdfcrowd Dev Team

    (@pdfcrowd)

    Hi,

    It could be possible to call the underlying HTML to Image API, which the plugin uses, directly from a cron job. You can check out the documentation here for more details:
    <a href=” https://pdfcrowd.com/api/html-to-image-api/”&gt;
    https://pdfcrowd.com/api/html-to-image-api/

    If you need any help with the implementation, feel free to ask.

    Thread Starter bing4

    (@bing4)

    Hello.

    >>If you need any help with the implementation, feel free to ask.

    Can you, please, give an example of how to do smth like browsershots to create and post screenshots for https://example.com/#div using shortcodes every 1 minute? And clean screenshots older than X days from the media folder.

    Also Is it possible to specify the Google Drive folder as storage if we use the G Drive Integration plugin? This may be more useful than the Browsershots plugin because it can only take 1 screenshot per day. It has a very limited time to receive relevant data

    Plugin Author Pdfcrowd Dev Team

    (@pdfcrowd)

    Hello,

    To achieve this task it’s easier to use PDFCrowd API direclty, you would need to:

    1. Use the PDFCrowd API to convert a URL to a PNG file.
    2. Use the Google Drive API to upload the PNG file to Google Drive.
    3. Set up a cron job to run the script every minute.
    4. Maintain only the 10 latest images.

    Here’s a step-by-step guide to building the PHP script:

    https://chatgpt.com/share/66e7e135-ed90-800e-bb29-f8e8ba1a5d2f

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use plugin like screenshotmaker via Cron’ is closed to new replies.