# Cover Generator Dependencies

**URL:** <https://pressbooks.community/t/cover-generator-dependencies/1705>\
**Category:** Troubleshooting Installation/Upgrades\
**Created:** [July 7, 2021, 2:14pm UTC](https://pressbooks.community/t/cover-generator-dependencies/1705 "2021-07-07T14:14:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjones](https://pressbooks.community/letter_avatar_proxy/v4/letter/j/df705f/32.png) [@jjones](https://pressbooks.community/u/jjones)\
**Post date:** [July 7, 2021, 2:14pm UTC](https://pressbooks.community/t/cover-generator-dependencies/1705/1 "2021-07-07T14:14:16Z")

</div>

Hello,

I am attempting to get the Cover generator feature running. I have installed all of the dependencies that are available when I click on the " Some dependencies for Cover Generator exports could not be found. Please verify that you have completed the [installation instructions](http://docs.pressbooks.org/installation)." error banner. But I still get this error. My only guess is that I do not have access to the appropriate versions of the dependencies in rhel 8 and Pressbooks 5.22. Is there a work around or any other updated instructions that I could possible use to get this feature running? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jjones](https://pressbooks.community/letter_avatar_proxy/v4/letter/j/df705f/32.png) [@jjones](https://pressbooks.community/u/jjones)\
**Post date:** [July 7, 2021, 4:20pm UTC](https://pressbooks.community/t/cover-generator-dependencies/1705/2 "2021-07-07T16:20:28Z")

</div>

edit… I have uninstalled and reinstalled the 3 dependencies for cover generator and I still cannot generate a cover. Is there another dependency that is missing? Also when I try to upload an image, it says" The image must have an aspect ratio of 0 to 0." Is this an acceptable aspect ratio for an image?

---

<div class="post-metadata">

**Author:** ![SteelWagstaff](https://pressbooks.community/user_avatar/pressbooks.community/steelwagstaff/32/1280_2.png) [@SteelWagstaff](https://pressbooks.community/u/SteelWagstaff)\
**Post date:** [July 7, 2021, 7:03pm UTC](https://pressbooks.community/t/cover-generator-dependencies/1705/3 "2021-07-07T19:03:46Z")

</div>

Hi @jjones – the cover generator dependencies are those described here:

> - Ghostscript 9.18: `sudo apt-get install ghostscript`
> - ImageMagick 6.8.9: `sudo apt-get install imagemagick`
> - PdfToPpm and PdfInfo 0.41.0: `sudo apt-get install poppler-utils`  
> See [pressbooks/inc/covergenerator/class-covergenerator.php at dev · pressbooks/pressbooks · GitHub](https://github.com/pressbooks/pressbooks/blob/dev/inc/covergenerator/class-covergenerator.php#L76-L108).

The cover generator feature can also be used to generate PDF files (to be used with PDF exports), which means that you also need to be able to produce PDFs, which necessitates the presence of XMLlint and one of the PDF creation dependencies in place (PrinceXML or DocRaptor are the recommended tools). See [pressbooks/inc/modules/export/prince/class-filters.php at f64934981efa7b0f4e8e40c271eec292052f7cd2 · pressbooks/pressbooks · GitHub](https://github.com/pressbooks/pressbooks/blob/f64934981efa7b0f4e8e40c271eec292052f7cd2/inc/modules/export/prince/class-filters.php#L106-L114)

As for the image upload message – we validate the dimensions and ratio of the image you’re uploading against the PDF page height and width (as defined in your PDF theme options)  
 ![Screenshot from 2021-07-07 12-01-30](https://pressbooks.community/uploads/default/original/2X/6/6cefe88b73ab17e060a70bab69e2fb2b46b4a9d3.png)

so that the cover is designed to fix the actual PDF you’re trying to produce. See [pressbooks/inc/admin/covergenerator/namespace.php at f64934981efa7b0f4e8e40c271eec292052f7cd2 · pressbooks/pressbooks · GitHub](https://github.com/pressbooks/pressbooks/blob/f64934981efa7b0f4e8e40c271eec292052f7cd2/inc/admin/covergenerator/namespace.php#L707-L773). You should check there first, I’d think.

---

<div class="post-metadata">

**Author:** ![jjones](https://pressbooks.community/letter_avatar_proxy/v4/letter/j/df705f/32.png) [@jjones](https://pressbooks.community/u/jjones)\
**Post date:** [July 21, 2021, 3:12pm UTC](https://pressbooks.community/t/cover-generator-dependencies/1705/4 "2021-07-21T15:12:41Z")

</div>

Hello,

Thanks for your help. This information has solved the problems that I was experiencing.
