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!
![]() |
own viewer |
Post Reply ![]() |
Author | |
hloch ![]() Beginner ![]() ![]() Joined: 11 Aug 10 Location: prague Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3530 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
hloch ![]() Beginner ![]() ![]() Joined: 11 Aug 10 Location: prague Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3530 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
hloch ![]() Beginner ![]() ![]() Joined: 11 Aug 10 Location: prague Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
aha. o.k.
|
|
![]() |
|
hloch ![]() Beginner ![]() ![]() Joined: 11 Aug 10 Location: prague Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3530 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store