natedesigns

Forum Replies Created

Viewing 14 posts - 1 through 14 (of 14 total)
in reply to: Preview Images #22578

natedesigns
Member

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);
in reply to: Preview Images #22575

natedesigns
Member
This reply has been marked as private.
in reply to: Preview Images #22353

natedesigns
Member

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

in reply to: Preview Images #22319

natedesigns
Member

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

in reply to: Preview Images #22219

natedesigns
Member

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?

in reply to: Preview Images #22216

natedesigns
Member

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.

in reply to: Preview Images #22113

natedesigns
Member
This reply has been marked as private.
in reply to: Preview Images #22089

natedesigns
Member
This reply has been marked as private.
in reply to: Preview Images #22088

natedesigns
Member
This reply has been marked as private.
in reply to: Preview Images #22086

natedesigns
Member
This reply has been marked as private.
in reply to: Preview Images #22055

natedesigns
Member

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

in reply to: Preview Images #21929

natedesigns
Member

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

in reply to: Preview Images #21887

natedesigns
Member

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.

in reply to: Preview Images #21838

natedesigns
Member
This reply has been marked as private.
Viewing 14 posts - 1 through 14 (of 14 total)