natedesigns

Forum Replies Created

Viewing 14 posts - 1 through 14 (of 14 total)
Nov 16, 2014 at 3:03 am
#22578
Member
natedesigns
OP

I’ve managed to get it to work, someetimes if it’s a large Pdf it has difficulty.

I called GS directly:

    $quality=60;
    $res='72';
    set_time_limit(900);
    $image = exec("'gs' '-dNOPAUSE' '-dFirstPage=1' '-sDEVICE=jpeg' '-dUseCIEColor' '-dTextAlphaBits=4' '-dGraphicsAlphaBits=4' '-o$dest' '-r$res' '-dJPEGQ=$quality' '$source'",$output);
Nov 15, 2014 at 6:41 pm
#22575
Member
natedesigns
OP
This reply has been marked as private.
Nov 10, 2014 at 10:26 am
#22353
Member
natedesigns
OP

Many thanks Shaon – when is the next update due for?

Nov 8, 2014 at 5:32 pm
#22319
Member
natedesigns
OP

So really going around the houses here – I’ve found out that imageMagik is only available via the command line using the exec(); function. I’m going to have a go at re-writing the:

if(!class_exists('Imagick')) 
        echo "Imagick is not installed properly";
        return "Imagick is not installed properly";
    try{
    $image = new imagick($source);
    $image->setResolution( 800, 800 );
    $image->setImageFormat( "png" );
    $image->writeImage($dest);
    } catch(Exception $e){
        return '';
    }

part of the functions.php which converts the pdf to the png/jpg.

However, I’m sure I won’t be the only person who comes across this issue on shared hosting, as an author you would obviously know how best to write this as another function for users to have access to. If you’re able to help then thanks

Thanks

Nate

Nov 5, 2014 at 11:13 pm
#22219
Member
natedesigns
OP

Doing some research I believe that the server guys at my clients hosting, who informed us that imageMagik is installed, are not telling a porky. In fact I think it’s a php extension that’s required, but missing:

http://uk3.php.net/manual/en/book.imagick.php

Would this be correct, I assume this is how you hook into the imageMagic functionality?

Nov 5, 2014 at 8:21 pm
#22216
Member
natedesigns
OP

Silly.. cannot believe I didn’t think to look in your functions.php for a reference to that. I can see it’s just wrapped in an if statement looking for the class – so easy to test.

I’ll get onto them – thanks for looking into it though. Very much appreciated.

Nov 3, 2014 at 9:13 am
#22113
Member
natedesigns
OP
This reply has been marked as private.
Nov 1, 2014 at 8:02 pm
#22089
Member
natedesigns
OP
This reply has been marked as private.
Nov 1, 2014 at 7:58 pm
#22088
Member
natedesigns
OP
This reply has been marked as private.
Nov 1, 2014 at 7:47 pm
#22086
Member
natedesigns
OP
This reply has been marked as private.
Oct 31, 2014 at 1:36 pm
#22055
Member
natedesigns
OP

Hi Shaon,

I’ve just found out that the server does actually have imageMagik installed, however it’s shared hosting. Might this have something to do with it why it’s not working?

Version: ImageMagick 6.8.3-6 2013-03-15 Q16

Oct 26, 2014 at 10:32 am
#21929
Member
natedesigns
OP

Yes I don’t have that installed on the server. Once installed is there any configuration or pointing that needs to be done? Or should it just work?

As this is obviously the issue, I’ll halt on getting you admin access for now.

Thanks for the help

Oct 24, 2014 at 8:59 pm
#21887
Member
natedesigns
OP

Hi again.. so I’ve tried the function you reference from within the archive-wpdmpro.php, like:
<?php wpdm_pdf_preview($post->ID, 200, 200); ?>
This is within the loop, however I cannot get a preview to show. Looking at the source output all I get is
<img src="" alt="MY SITE TITLE">

I’ve checked that the #id passed into the function is correct to that post, which it is. To me it’s like the pdf preview creator isn’t functioning. To which i’ve looked in uploads and cannot see any png/jpg versions of the pdf uploaded.

Thanks.

Oct 23, 2014 at 9:16 am
#21838
Member
natedesigns
OP
This reply has been marked as private.
Viewing 14 posts - 1 through 14 (of 14 total)