I can compress a .jpg through browser as well as command prompt... but i can't convert a pdf to jpeg through browser . getting error Last OS error: No such file or directory..
System config
............................
windows server2008R2 and iis
php 5.5.11
pdf to jpeg conversion usin imagick
Re: pdf to jpeg conversion usin imagick
maybe it is helpfull for you.
#include <Magick++.h>
#include <string>
#include <iostream>
#include <sstream>
using namespace std;
using namespace Magick;
int main(int argc,char **argv)
{
vector<Image> imageList;
readImages( &imageList, "doc1.PDF" );
//
//for (int i = 0; i < imageList.size(); i++)
for (int i = 0; i < 10; i++) {
stringstream fileName;
fileName<<"FAX" << i << ".JPEG";
imageList.resolutionUnits(PixelsPerInchResolution);
imageList.density(Geometry(150,150)); // could also use image.density("150x150")
imageList.write(fileName.str());
}
return 0;
}
#include <Magick++.h>
#include <string>
#include <iostream>
#include <sstream>
using namespace std;
using namespace Magick;
int main(int argc,char **argv)
{
vector<Image> imageList;
readImages( &imageList, "doc1.PDF" );
//
//for (int i = 0; i < imageList.size(); i++)
for (int i = 0; i < 10; i++) {
stringstream fileName;
fileName<<"FAX" << i << ".JPEG";
imageList.resolutionUnits(PixelsPerInchResolution);
imageList.density(Geometry(150,150)); // could also use image.density("150x150")
imageList.write(fileName.str());
}
return 0;
}
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: pdf to jpeg conversion usin imagick
Does the file doc1.PDF exist?
ImageMagick uses Ghostscript as a delegate to read PDF images. Is GS installed?
Does your conversion work at the command level?
ImageMagick uses Ghostscript as a delegate to read PDF images. Is GS installed?
Does your conversion work at the command level?
Code: Select all
convert doc1.PDF FAX1.JPEG
snibgo's IM pages: im.snibgo.com