ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 PDF file to another format?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

maseline_98

7 Posts

Posted - Feb 12 2015 :  09:51:34  Show Profile  Reply
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

Posted - Feb 12 2015 :  13:16:40  Show Profile  Reply
Hi,

To be able to load PDF into ImageEn, you must enable ImageMagick plugin
and also, GhostScript must be installed on your PC.
Here is a topic with more details:

http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=1464
Go to Top of Page

maseline_98

7 Posts

Posted - Feb 13 2015 :  10:34:52  Show Profile  Reply
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...
Go to Top of Page

xequte

38613 Posts

Posted - Feb 13 2015 :  14:03:58  Show Profile  Reply
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
Go to Top of Page

xequte

38613 Posts

Posted - Feb 13 2015 :  14:38:04  Show Profile  Reply
Hi

Also there are ImageMagick images and a test project at:

www.imageen.com/files/Other/ImageMagickDemo.zip

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: