Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - own viewer
  FAQ FAQ  Forum Search   Register Register  Login Login

own viewer

 Post Reply Post Reply
Author
Message
hloch View Drop Down
Beginner
Beginner
Avatar

Joined: 11 Aug 10
Location: prague
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote hloch Quote  Post ReplyReply Direct Link To This Post Topic: own viewer
    Posted: 11 Aug 10 at 9:10AM
Please help,

I would like to try use QuickPDF ActiveX in my app as PDF viewer.
How to do it? I can not found any example for this situation.
I use Delphi/C++Builder.
I can LoadFIle with
QP->LoadFromFile(WideString(OpenDialog1->FileName));
but what to do next?

Thank you very much

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 11 Aug 10 at 9:34AM
Hi hloch!

Why you didn't use the search-function above (with the advanced option)?
Here are two helpful links for you:
http://www.quickpdf.org/forum/a-pdf-viewer-built-using-powerbasic-and-quick-pdf_topic1050.html
http://www.quickpdf.org/forum/pdf-view_topic329.html

Normally it goes this way:
Get each page - convert pagecontent to stream - convert stream to jpeg - load the jpeg into an imagecomponent - ...

Cheers and welcome here,
Ingo

Back to Top
hloch View Drop Down
Beginner
Beginner
Avatar

Joined: 11 Aug 10
Location: prague
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote hloch Quote  Post ReplyReply Direct Link To This Post Posted: 11 Aug 10 at 1:43PM
O.K. I can render to Image or PaintBox now, but tell me how to use SetViewerPreferences?
I really dont understand how work QuickPDF library. I thought that I can use it as visual component for preview PDF files with Toolbars for zoom, moving, etc. ?

Thank you
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 11 Aug 10 at 2:14PM
Hi!

"SetViewerPreferences" has nothing to do with YOUR pdf-viewer.
SetViewerPreferences on a loaded document before SaveToFile will manipulate a pdf-reader while displaying your document.
With
SetViewerPreferences for example it's possible to determine that your document shall be opened on the third page and that the reader-menu shall be hidden.
If you've done the SaveToFile and opened the document with a pdf-reader the starting page will be the third one and the menu will be hidden.

Cheers, Ingo

Back to Top
hloch View Drop Down
Beginner
Beginner
Avatar

Joined: 11 Aug 10
Location: prague
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote hloch Quote  Post ReplyReply Direct Link To This Post Posted: 11 Aug 10 at 2:16PM
aha. o.k.

Back to Top
hloch View Drop Down
Beginner
Beginner
Avatar

Joined: 11 Aug 10
Location: prague
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote hloch Quote  Post ReplyReply Direct Link To This Post Posted: 12 Aug 10 at 2:45PM
And please tell me how to render into stream when I used ActiveX. Is it possible and how?
In manual is information for RenderPageToStream: This function is only available in the Delphi edition.

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 12 Aug 10 at 9:07PM
Hi!

You can try something similar to the following code:

   try
      QP.UnlockKey('...');
      QP.LoadFromFile(ipfliste[di]); //fneu);
      pmax := QP.PageCount;
      Form1.Label1.Caption := title;
      QP.CombineLayers;
      test_stream := TMemoryStream.Create;
      QP.RenderPageToStream(zoom,page,1,test_stream,1,0);
      Form1.Show;
   finally
      QP.Free; 
   end;

   Form1.Repaint;

   try
      test_stream.Seek(0,0);
      jpg := TJPEGImage.Create;
      jpg.LoadFromStream (test_stream);
      Form1.Image1.Picture.Assign(jpg);
      Form1.Caption := title;
      Form1.Label1.Caption := 'Document 1 of ' + IntToStr(rcount);
      Form1.Label3.Caption := 'Page 1 of ' + IntToStr(pmax);

   finally
      Form1.Show;
      test_stream.Free;
      jpg.Free;
      result := 0;
   end;

I don't use ActiveX. If you wanna use it
you should change from RenderPageToStream
to RenderPageToFile.

As file you can choose jpeg or bmp for example
and this image you can display in your image component.

Here is the online reference:
http://www.quickpdflibrary.com/help/quickpdf/FunctionGroups.php

Cheers, Ingo

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store