Author |
Topic |
|
maseline_98
7 Posts |
Posted - Feb 12 2015 : 09:51:34
|
I'm attempting to create multiple JPG files from a PDF file. I don't see how I'm even able to load the file.
var io: TImageEnIO; count : integer begin io.LoadFromFile(PDFFileName); count := IEGetFileFramesCount(filename);
It doesn't seem to be loading anything into the io. I'm a little confused by this. I'm able to save files to pdf, but I can't seem to load them. Should I be using a stream or another object(other than TImageEnIO)?
Thanks in advance.
|
|
spetric
Croatia
308 Posts |
|
maseline_98
7 Posts |
Posted - Feb 13 2015 : 10:34:52
|
I followed the directions and, installed both ImageMagick and Ghostscripts. I was able to the conversion from the command line, but couldn't get the calls to work via delphi application. I downloaded and build the "PascalMagick-4.0" .pas libraries, but if I try to incorporate the Demonstration Program 1 here: http://wiki.freepascal.org/PascalMagick#Download
If I use any reference to the library code, the program crashes immediately with no error message at all. It's really strange.
I have even tried:
cmd := 'C:\Program Files\ImageMagick-6.9.0-Q16\convert.exe'; //debug input := '"c:\temp\temp.pdf" "c:\temp\temp2222.jpg"'; cmd := cmd + ' ' + input;
FillMemory( @si, sizeof( si ), 0 ); si.cb := sizeof( si );
CreateProcess( nil, // path to the executable file: PChar(cmd),
Nil, Nil, False, NORMAL_PRIORITY_CLASS, Nil, Nil, si, pi );
// "after calling code" such as // the code to wait until the // process is done should go here
CloseHandle( pi.hProcess ); CloseHandle( pi.hThread );
I'm beginning to think it's just not compatible with Delphi... |
|
|
xequte
38613 Posts |
Posted - Feb 13 2015 : 14:03:58
|
Hi
You do npt need to interact with ImageMagick directly. Once you have installed ImageMagick and Ghostscript, then ImageEn should be able to load PDF files.
Please ensure you read the tip regarding 32/64bit at:
http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=1464
Then try loading ImageMagick only formats (such as SVG) and then PDF into ImageEn.
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
xequte
38613 Posts |
|
|
Topic |
|
|
|