| Author |  Topic  |  | 
              
                | Pawel
   
 
                Poland33 Posts
 | 
                    
                      |  Posted - Jun 02 2016 :  09:49:42     
 |  
                      | Can anyone show me, how to open a *.PDF file and save all pages to images? I've installed ImageMagic and GhostScript and I don't know what to do next.
 |  | 
              
                | w2m
     
 
                USA1990 Posts
 |  | 
              
                | Pawel
   
 
                Poland33 Posts
 | 
                    
                      |  Posted - Jun 02 2016 :  12:24:03     
 |  
                      | I read the topic and I can't open pdf file. In ImageMagic demo I see 32bit Plug-In NOT FOUND, but it is installed.
 
 |  
                      |  |  | 
              
                | w2m
     
 
                USA1990 Posts
 | 
                    
                      |  Posted - Jun 02 2016 :  12:30:35     
 |  
                      | I have not used imagemagic much except for some testing years ago.  I get the same result... "32bit Plugin not found".  My dll was from 2005 so maybe the latest dll is required.  I too installed imagemagick and ghostscript. I will be discussing this with Nigel to see if we can get this working correctly. 
 Bill Miller
 Adirondack Software & Graphics
 Email: w2m@hughes.net
 EBook: http://www.imageen.com/ebook/
 Custom Commercial ImageEn Development
 |  
                      |  |  | 
              
                | Pawel
   
 
                Poland33 Posts
 | 
                    
                      |  Posted - Jun 03 2016 :  02:14:54     
 |  
                      | I downloaded imagemagic and ghostscript 2 days ago, so a version is the latest. |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jun 03 2016 :  03:46:16     
 |  
                      | Hi 
 Are you sure you downloaded the 32bit version of the ImageMagick DLL and not the 64bit one?
 
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | Pawel
   
 
                Poland33 Posts
 | 
                    
                      |  Posted - Jun 03 2016 :  06:52:21     
 |  
                      | Yes, I've installed 32bit version |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts |  | 
              
                | Pawel
   
 
                Poland33 Posts
 | 
                    
                      |  Posted - Jun 07 2016 :  03:01:14     
 |  
                      | I've installed older version of ImageMagic and now demo program works. But when I open any pdf file pages are poor quality (low resolution).
 How to increase quality?
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts |  | 
              
                | xequte
      
 
                39218 Posts |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jun 08 2016 :  21:46:11     
 |  
                      | Also, the ImageMagick version we tested against was: 
 ImageMagick-7.0.1-10-Q16-x86-dll.exe
 
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | Pawel
   
 
                Poland33 Posts
 | 
                    
                      |  Posted - Jun 09 2016 :  05:14:50     
 |  
                      | OK, now I can open a one page of *.pdf file. 
 
    ImageEnView1.IO.Params.ImageIndex := 1;
    ImageEnView1.IO.Params.Dict.Insert('PDF:Density', 200);
    ImageEnView1.IO.LoadFromFile(OpenDialog1.FileName);
But how to read count of pages from pdf file?
 Is it possible to load all pages at once?
 |  
                      |  |  | 
              
                | w2m
     
 
                USA1990 Posts
 | 
                    
                      |  Posted - Jun 09 2016 :  09:49:15     
 |  
                      | It is not possible to load all pdf pages or any multi-frame image into TImageEnView.  TImageEnView can display only one image at a time.  TImageEnMView was designed to hold multiple bitmaps of a multi-frame image, so this should be used instead of TImageEnView for this purpose.  When you select a frame in TImageEnMView it can be displayed in TImageEnView by copying the selected bitmap to TImageEnView for editing or viewing. 
 To load a multi-frame image into TImageEnMView:
 
 ImageEnMView1.MIO.LoadFromFile(iFileName); To display a TImageEnMView selected frame in TimageEnView:
 
 procedure TForm1.ImageEnMView1ImageSelect(Sender: TObject; idx: Integer);
begin
  ImageEnMView1.CopyToIEBitmap(idx, ImageEnView1.IEBitmap);
  ImageEnView1.Update;
end;
 How to read count of pages from pdf file?
 ImageEnMView1.ImageCount = count of pages.
 
 Bill Miller
 Adirondack Software & Graphics
 Email: w2m@hughes.net
 EBook: http://www.imageen.com/ebook/
 Custom Commercial ImageEn Development
 |  
                      |  |  | 
              
                | Pawel
   
 
                Poland33 Posts
 | 
                    
                      |  Posted - Jun 20 2016 :  03:28:41     
 |  
                      | Is I have to install imagemagick and ghostscript on all client machines or only once on a server machine where an exe file is? |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jun 20 2016 :  17:34:07     
 |  
                      | Hi 
 ImageMagick and GhostScript need to be installed on each system to use PDF.
 
 However we are expecting to see a new PDF DLL soon from a third party which you can just ship with your exe.
 
 
 
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | aruest
  
 
                Canada11 Posts
 | 
                    
                      |  Posted - Jul 15 2016 :  20:39:33     
 |  
                      | I've also installed the older version of ImageMagic but the demo still gives the message that the plug-in cannot be found. 
 Any ideas?
 |  
                      |  |  | 
              
                | aruest
  
 
                Canada11 Posts
 | 
                    
                      |  Posted - Jul 16 2016 :  09:52:33     
 |  
                      | I've solved the issue. I just rebooted the computer and now the demo does recognize the ImageMagick plug-in! |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jul 18 2016 :  01:24:08     
 |  
                      | Yes, that is true. I will add a reminder to restart to the install instructions. 
 
 
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | aruest
  
 
                Canada11 Posts
 | 
                    
                      |  Posted - Jul 19 2016 :  11:31:40     
 |  
                      | >function GetPDFPageCount(const FileName: WideString): Integer; >var
 >  iop : TIOParams;
 >begin
 >  Result := -1;
 >  iop := TIOParams.Create( Nil );
 >  If iop.ParamsFromFile( FileName ) then
 >    Result := iop.ImageCount;
 >  iop.Free;
 >end;
 
 
 
 Unfortunately, this code does not work.
 
 iop.Imagecount always returns a value of 1 even if there are multiple pages in the PDF file.
 
 Is there a way through the ImageMagick PlugIn to get the page count of a PDF file?
 
 Thank you.
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Jul 25 2016 :  05:38:33     
 |  
                      | Hi 
 For performance reasons, ImageCount isn't set when using the ImageMagick plug-in.
 
 Either use IEGetFileFramesCount():
 
 http://www.imageen.com/help/IEGetFileFramesCount.html
 
 (Which does not support all PDF file types).
 
 Or TIEMiscPluginsImageMagick_PDFFrameCount().
 
 
 From v6.3.1, you will be able to use IEGetFileFramesCount for all PDF types using whatever plug-in is available (Ghostscript or the new WP PDF support).
 
 
 
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 |  
                      |  |  | 
              
                |  |  Topic  |  |