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
 Debenu QuickPDF Support
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mauriciopt

Portugal
34 Posts

Posted - Sep 12 2016 :  09:01:33  Show Profile  Reply
Hi,

can you add Debenu QuickPDF Support for loading pdf files like you do with WPCubed?

Thanks,
Mauricio

Mauricio
http://sourceforge.net/projects/tcycomponents/

xequte

38341 Posts

Posted - Sep 12 2016 :  19:58:26  Show Profile  Reply
Hi Mauricio

It is the developer of QuickPDF that needs to most of the work. The debenu products are very expensive compared to WPCubed so I don't think there would be much call for it. The cheapest WPCubed DLL is only 59 Euro.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

mauriciopt

Portugal
34 Posts

Posted - Sep 13 2016 :  04:13:47  Show Profile  Reply
Hi,

thanks for your answer.
I was thinking that you can just add a directive compilation that use QuickPdf in order to load a pdf file in ImageEnView like i do ...

Regards,
Maurício

Mauricio
http://sourceforge.net/projects/tcycomponents/
Go to Top of Page

xequte

38341 Posts

Posted - Sep 13 2016 :  04:56:45  Show Profile  Reply
Hi Mauricio

Can you show me your code?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

mauriciopt

Portugal
34 Posts

Posted - Sep 14 2016 :  04:42:36  Show Profile  Reply
Hi Nigel,

here a simple exemple:

procedure TForm3.BtnPdf2BmpClick(Sender: TObject);
var
  PDFLibrary: TDebenuPDFLibrary;
  UnlockResult, Option, Dpis, Page: Integer;
  PdfSourceFile, BmpOutputFile: String;
  TargetStream: TMemoryStream;
begin
  PDFLibrary := TDebenuPDFLibrary.Create;
  UnlockResult := PDFLibrary.UnlockKey(MyDebenuTrialKey);

  Dpis := 300;
  Page := 1;
  Option := 0;

    (* Options
    0 = BMP output
    1 = JPEG output
    2 = WMF output
    3 = EMF output
    4 = EPS output
    5 = PNG output
    6 = GIF output
    7 = TIFF (LZW) output
    8 = EMF+ output
    9 = HTML5 output
    10 = TIFF (G4) output     *)
	
  PdfSourceFile := 'D:\_OUTPUT\_IN\Color2BW.pdf';
  BmpOutputFile := 'D:\_OUTPUT\_IN\Color2BW ' + intToStr(Dpis) + ' dpis.bmp';

  try
    PDFLibrary.LoadFromFile(PdfSourceFile, '');

    if PDFLibrary.RenderPageToFile(Dpis, Page, Option, BmpOutputFile) = 1 then
      Caption := 'Ok';

    TargetStream := TMemoryStream.Create;
    PDFLibrary.RenderPageToStream(Dpis, page, Option, TargetStream);
    TargetStream.Position := 0;
    Image1.Picture.Bitmap.LoadFromStream(TargetStream);
    TargetStream.Free;

  finally
    PDFLibrary.Free;
  end;

  ShowMessage('Done.');
end;



Regards,
Mauricio

Mauricio
http://sourceforge.net/projects/tcycomponents/
Go to Top of Page

xequte

38341 Posts

Posted - Sep 14 2016 :  19:01:13  Show Profile  Reply
Hi Mauricio

You could add support for this by adding it as a "Custom File Format"

Please see the demo:

Demos\InputOutput\FileFormatPlugins\FPlug.dpr

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

mauriciopt

Portugal
34 Posts

Posted - Sep 15 2016 :  04:18:41  Show Profile  Reply
Hi Nigel,

thanks, i will.

Regards,
Mauricio

Mauricio
http://sourceforge.net/projects/tcycomponents/
Go to Top of Page

jromera

2 Posts

Posted - Oct 02 2019 :  09:28:54  Show Profile  Reply
Hi,

I am also using QuickPDF for reading multi-page PDF files. I managed to register a custom PDF file format to enable ImageEn read PDF files calling my existing read procedures which uses QuickPDF.

This works great when using TImageEnView component. Here an example of how I would read the page number 10 of a multi-page PDF file:

// load a specific page from PDF file
filename := OpenImageEnDialog.FileName;
ImageEnView.IO.Params.Dpi := 200;
ImageEnView.IO.Params.ImageIndex := 10;
ImageEnView.IO.LoadFromFileFormat(filename, ioCustomPDF);

However, what I am exploring to do now is to use a TImageEnMView component to load all the pages of the multi-page PDF as thumbnails. I would like to do this just by doing the following call:

ImageEnMView.MIO.LoadFromFileFormat(filename, ioCustomPDF);

Is the support for custom file formats only available for TImageEnIO? Is there any way to enable custom file formats for TImageEnMView?

Also, when I use:

ImageEnMView.LoadFromFileOnDemand(filename);

it appears to only load the first image. I am looking forward to use the ImageEn on demand capability to allow my application to load large PDF files.

I am using ImageEn 3.1.2.

Thanks in advance.

Regards,
Jordi
Go to Top of Page

xequte

38341 Posts

Posted - Oct 02 2019 :  21:12:57  Show Profile  Reply
OK, I'll add it to the to-do list.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

jromera

2 Posts

Posted - Oct 03 2019 :  03:59:12  Show Profile  Reply
Thanks Nigel
Go to Top of Page

Laser AOC

India
12 Posts

Posted - Oct 07 2019 :  10:52:02  Show Profile  Reply
From QuickPDF web site here is a code sample:

QP := TDebenuPDFLibrary1612.Create;

if QP.LoadFromFile(OpenImageEnDialog1.FileName, '') = 1 then
begin
   MS := TMemoryStream.Create;
   DPI := (4 * 25 * 300) div 100;
   QP.RenderPageToStream(DPI, 1, 0, MS);
   MS.Seek(0, soFromBeginning);
   //Now use the stream to load page in ImageEn as Image
   MS.Seek(0, soFromBeginning);
   ImageEnView.IO.LoadFromStream(MS);
   ImageEnView.Update;
   MS.Free;
end;


Hope this will give you some ideas.

For,
Laser AOC
Go to Top of Page

xequte

38341 Posts

Posted - Jan 25 2024 :  22:40:54  Show Profile  Reply
Hi

From v13.0.1, ImageEn will support adding of custom file formats with multiple frames.

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