I'm working on a module to convert Drupal pages in PDF files via cloudconvert.

In this use case no files need to be uploaded to cloudconvert - instead an URL is provided in the convert task.
Currently the CloudConvertTaskInterface suggests that there will be a "original_file_id" tough it's not required.
So I think I can maneuver around this.
But CloudConvertProcessor::startProcess() requires to upload a file. Here my journey finds a stop.

Any chance to modify this module's structure to have CloudConvertTask more generic?

Comments

guedressel created an issue.

jefuri’s picture

Maybe a (sub)module to convert pages. Like cloudconvert_webpage. Which acts based on url to file in chosen file type. Could be pdf, image, etc.

I could make the base manager and services more generic for reusability.

Sounds like a good suggestion.

guedressel’s picture

@jefuri sound good!

You might take a look into our current pet module cloudconvert_pdf. There you'll find - besides a very minimalistic but runable implementation of the whole workflow - the class Drupal\cloudconvert_pdf\CloudConvertProcessor which was the solution we came up with to overcome this very issue's limitation.

jefuri’s picture

@guedressel, is it an idea to merge this? Though I would suggest to make it broader than just conversion to pdf.

https://cloudconvert.com/website-png-screenshot
https://cloudconvert.com/website-jpg-screenshot
https://cloudconvert.com/save-website-pdf