You are here

README.txt in PDF to ImageField 7.2

Same filename and directory in other branches
  1. 6.2 README.txt
  2. 6 README.txt
  3. 7 README.txt
= PDF To Image =

The PDF To Image module provides automatic conversion of
uploaded PDF files to images.
It can be used either to create a snapshot of the front page,
or to generate a gallery of images from each page in the document.

The module is implemented as field widget where PDFs are uploaded to.
It places generated images into a Image Field on the same content type.

== Requirements ==

  File field, Image field and Imagemagick modules.
  ImageMagick toolkit to be available on server via command-line interface.

== Installation ==

Once the module is enabled, check your site status at /admin/reports/status
You should see a message that will tell you if your system is ready to run.
If not, you need to check the requirements, and the ImageMagick settings
at admin/settings/imagmagick.
See the ImageMagick project docs for troubleshooting that.

If ImageMagick appears to be available but still does not convert PDFs, it
could be it wasn't installed with 'Ghostscript' libraries or other required
dependencies. You'l have to go to the ImageMagick forums for help with that.

== Configuration ==

- First, add an image field on your chosen content type. This is where the
  generated images will be stored.
- Set the allowed fields to 1 if you just want a cover page, direct number to
  store only some count of pages or 'unlimited' if you want all pages
  to be generated.
- Next add a filefield to your chosen content type and choose
  'pdf_to_image' as the renderer.
- When configuring this field, you will be required to link the uploaded file
  field with the target image field.
- You can add imagecache handling to the image field rendering as normal to
  adjust the size of the results and how they display on the page.

== Processing ==

Processing of PDF may take some time.
Larger documents use the 'batch' process to generate each page.

== Use of ImageMagick ==

Actual processing is perfomed using ImageAPI's ImageMagick toolkit.
GD is not supported.

=== Dev notes ===

The only candidate function from ImageAPI which may perform PDF to image
convertion is _imageapi_imagemagick_convert(). Unfortunately, it can't pass
arguments to 'convert' tool of ImageMagick *before* source file specification,
which is needed to change default density of 100x100dpi.
On this reason, a custom functionis included in the module's source:

function pdf_to_image_generate_page($params, $page_number = 0) {
  . . .
}

File

README.txt
View source
  1. = PDF To Image =
  2. The PDF To Image module provides automatic conversion of
  3. uploaded PDF files to images.
  4. It can be used either to create a snapshot of the front page,
  5. or to generate a gallery of images from each page in the document.
  6. The module is implemented as field widget where PDFs are uploaded to.
  7. It places generated images into a Image Field on the same content type.
  8. == Requirements ==
  9. File field, Image field and Imagemagick modules.
  10. ImageMagick toolkit to be available on server via command-line interface.
  11. == Installation ==
  12. Once the module is enabled, check your site status at /admin/reports/status
  13. You should see a message that will tell you if your system is ready to run.
  14. If not, you need to check the requirements, and the ImageMagick settings
  15. at admin/settings/imagmagick.
  16. See the ImageMagick project docs for troubleshooting that.
  17. If ImageMagick appears to be available but still does not convert PDFs, it
  18. could be it wasn't installed with 'Ghostscript' libraries or other required
  19. dependencies. You'l have to go to the ImageMagick forums for help with that.
  20. == Configuration ==
  21. - First, add an image field on your chosen content type. This is where the
  22. generated images will be stored.
  23. - Set the allowed fields to 1 if you just want a cover page, direct number to
  24. store only some count of pages or 'unlimited' if you want all pages
  25. to be generated.
  26. - Next add a filefield to your chosen content type and choose
  27. 'pdf_to_image' as the renderer.
  28. - When configuring this field, you will be required to link the uploaded file
  29. field with the target image field.
  30. - You can add imagecache handling to the image field rendering as normal to
  31. adjust the size of the results and how they display on the page.
  32. == Processing ==
  33. Processing of PDF may take some time.
  34. Larger documents use the 'batch' process to generate each page.
  35. == Use of ImageMagick ==
  36. Actual processing is perfomed using ImageAPI's ImageMagick toolkit.
  37. GD is not supported.
  38. === Dev notes ===
  39. The only candidate function from ImageAPI which may perform PDF to image
  40. convertion is _imageapi_imagemagick_convert(). Unfortunately, it can't pass
  41. arguments to 'convert' tool of ImageMagick *before* source file specification,
  42. which is needed to change default density of 100x100dpi.
  43. On this reason, a custom functionis included in the module's source:
  44. function pdf_to_image_generate_page($params, $page_number = 0) {
  45. . . .
  46. }