Jump to content

Recommended Posts

Posted

Similar problem here: Fatal Error: Uncaught Error: Class 'Pagefiles' not found in site/modules/FieldtypePDF/FieldtypePDF/PagePDFs.php:37

Using PW ProcessWire 3.0.165

Posted

@erikvanberkum, I've merged your question from general support to the support thread of the FieldtypePDF module. You may also want to open an issue about this in the FieldtypePDF GitHub repository. Also, please make sure that you're running the latest version of the module ?

  • 3 years later...
Posted

It seems like I have a colour depth issue when trying to generate an image from an uploaded PDF file. Any clues how this can be corrected? Thanks.

z-petrol-lpg_compressed.640x480.jpg.e4e19c3ebdd0b1ed7633fc91ef09fa1d.jpg

 

Posted

Hi @kalimati, not exactly sure, but I guess it will be related to the colorspace the PDF is in? 🤔 I am no expert on this area and don't know if PDF can have different colorspace, but the field has an option to set the colorspace to be used for the image generating (on Details tab), so you can experiment with it. 

image.png.e83b6423ae0caa73ad1aa464457e6f27.png

 

You can also check https://github.com/uiii/ProcessWire-FieldtypePDF/blob/9f07314883cd281e09851f149b8889c1a3e8daa0/FieldtypePDF/PDFConverter.php#L149 where is the code to generate the image, and you can find a way how to use ImageMagick to generate image for your PDF, we may reflect it in the code after.

Posted
1 hour ago, Richard Jedlička said:

Hi @kalimati, not exactly sure, but I guess it will be related to the colorspace the PDF is in? 🤔 I am no expert on this area and don't know if PDF can have different colorspace, but the field has an option to set the colorspace to be used for the image generating (on Details tab), so you can experiment with it. 

image.png.e83b6423ae0caa73ad1aa464457e6f27.png

 

You can also check https://github.com/uiii/ProcessWire-FieldtypePDF/blob/9f07314883cd281e09851f149b8889c1a3e8daa0/FieldtypePDF/PDFConverter.php#L149 where is the code to generate the image, and you can find a way how to use ImageMagick to generate image for your PDF, we may reflect it in the code after.

Thanks for your reply, Richard.
I don't see the ImageMagick settings (advanced) in my installation. I am using Processwire 3.0.229 and module version 1.1.5 on Ubuntu with PHP 8.1.
 

Posted
6 hours ago, Richard Jedlička said:

It is in the field settings (Details tab) not the module settings.

I can't see it in my setup. Please see the attached screenshot.

FieldtypePDF-Details.png

  • 5 months later...
Posted
On 7/24/2021 at 8:27 AM, erikvanberkum said:

Similar problem here: Fatal Error: Uncaught Error: Class 'Pagefiles' not found in site/modules/FieldtypePDF/FieldtypePDF/PagePDFs.php:37

Using PW ProcessWire 3.0.165

Similar problem here: Fatal Error: Uncaught Error: Class 'Pagefiles' not found in site/modules/FieldtypePDF/FieldtypePDF/PagePDFs.php:37

ProcessWire 3.0.244

Posted
49 minutes ago, Sten said:

Similar problem here: Fatal Error: Uncaught Error: Class 'Pagefiles' not found in site/modules/FieldtypePDF/FieldtypePDF/PagePDFs.php:37

ProcessWire 3.0.244

Hi @Sten, can you please share what PHP and FieldtypePDF version do you use?

Posted

Thank you Richard. I have the last version of FieldtypePDF with PHP8.3.

I was able to correct this problem as I deleted the data in the FieldtypePDF row in the modules table in Mariadb.

{"-dups":["\/site\/modules\/ProcesswireFieldtypepdf\/FieldtypePDF.module.php","\/site\/modules\/ProcessWire-FieldtypePDF\/FieldtypePDF.module.php","\/site\/modules\/FieldtypePDF\/FieldtypePDF.module"],"-dups-use":"\/site\/modules\/FieldtypePDF\/FieldtypePDF.module"}

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...