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 - PDF Viewer SDK - questions / comments
  FAQ FAQ  Forum Search   Register Register  Login Login

PDF Viewer SDK - questions / comments

 Post Reply Post Reply
Author
Message
abutler View Drop Down
Beginner
Beginner


Joined: 06 May 14
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote abutler Quote  Post ReplyReply Direct Link To This Post Topic: PDF Viewer SDK - questions / comments
    Posted: 14 Oct 15 at 9:39PM
Hi. I am reviewing the Debenu PDF Viewer SDK to see if it will work for the requirements of my current project.  It looks good, but is missing a few things that I am looking for.

1. I would like the ability to select text and then highlight that.  I did not see a way to get access to the text that is selected by the user.  I would want the coordinates and such so that I could store this information in a database so that it would be there next time the user views the document.

2. When searching, I would like to show all results and not just the first one.  I also want a list of pages and locations where the text is found.

3. Is it possible to use Debenu Quick PDF Library and Debenu PDF Viewer SDK at the same time?  That is, I could implemnent the additional functionality that I require by using the Debenu Quick PDF Library.  Is there an example showing how to do this?  The Viewer SDK does not seem to expose the data needed to call the Quick PDF SDK.  Or, do I need to modify the PDF document and refresh the page in the viewer?

4. If #1 is not possible, then I'll need to write my own mouse text selection code and possibly my own viewer.  Is there an example of this somewhere or hints as to how to do text selection via the mouse?

5. Given data from DAExtractPageText, how would I highlight that text in the document?

Thanks,

Arthur

Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 15 Oct 15 at 2:14PM
ad 1.
Good feature request.
I hope DevTeam can make it happen.

ad 2.
the same as ad 1.
I think the list of selections with coords, would be great. Then using QPDFLibrary you can make highlighting in your own way.

ad 3.
Yes.
I'm using ActiveX version so the only ones things I need to do is:

1. get Viewer Object Reference for Examlpe:  $oDPVS

and now 

2. you can use all QPDFLibrary function/methodes like this:    $oDPVS.DQPL...........

$oDPVS.DQPLSetOrigin($g__eQPDF_SORIGIN_TopLeft);
$oDPVS.DQPLSetMeasurementUnits($g__eQPDF_MUNITS_Milimeters)
$oDPVS.DQPLNormalizePage(0)

ad 4.
do not know - wait for answer to 1 Question from DevTeam

ad 5.
this is simple 
just use you can use the QPDFLibrary to make it happen.


HOWTO: "With QPDFLibrary you can make highlighting in your own way."

1. use my answer to Q3
2. Just get all text with coords using $oDPVS.DQPLGetPageText
3. Search only for yours text coords
4. make an SQUARE/BOX something like I make STAMP


EXAMPLE HOW I MAKE A STAMP

Func _Make_a_STAMP(ByRef $oDPVS, $iLeft, $iTop, $sOrganizationName, $sDate, $sTime, $iNoOfAttachments, $sSignID)
Local $iStampWidth = 75, $iStampHeight = 35
$iLeft = Number($iLeft)
$iTop = Number($iTop)
$oDPVS.DQPLSetOrigin($g__eQPDF_SORIGIN_TopLeft);
$oDPVS.DQPLSetMeasurementUnits($g__eQPDF_MUNITS_Milimeters)
$oDPVS.DQPLSetTransparency(20)
$oDPVS.DQPLSetLineWidth(1)
$oDPVS.DQPLSetLineColor(1, 0, 0)
$oDPVS.DQPLDrawBox($iLeft, $iTop, $iStampWidth, $iStampHeight, 0)
Local $iIDFont = $oDPVS.DQPLAddTrueTypeFont('Arial {1250}', 0)
$oDPVS.DQPLSelectFont($iIDFont)
$oDPVS.DQPLSetTextSize(10)
$oDPVS.DQPLSetTextAlign(1)
$oDPVS.DQPLDrawWrappedText($iLeft + 2, $iTop + 5, $iStampWidth - 4, $sOrganizationName)
$oDPVS.DQPLSetTextSize(11)
$oDPVS.DQPLDrawWrappedText($iLeft + 2, $iTop + 25, $iStampWidth - 4, 'received: ' & $sDate & '  time: ' & $sTime)
$oDPVS.DQPLDrawWrappedText($iLeft + 2, $iTop + 30, $iStampWidth - 4, '# of Attach.: ' & $iNoOfAttachments & '    Sign #: ' & $sSignID)
EndFunc   ;==>_Make_a_STAMP
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600
Back to Top
abutler View Drop Down
Beginner
Beginner


Joined: 06 May 14
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote abutler Quote  Post ReplyReply Direct Link To This Post Posted: 28 Nov 15 at 4:46AM
Thanks.  I am having no luck using the QPDFLibrary functions with the viewer (v12.11) in C#.  Most functions throw an exception.

                axDPVActiveX1.DQPLSetOrigin(1);
                axDPVActiveX1.DQPLSetMeasurementUnits(0);
                axDPVActiveX1.DQPLSetTransparency(20);
                axDPVActiveX1.DQPLSetLineColor(1, 0, 0);
                axDPVActiveX1.DQPLSetLineWidth(2);
                axDPVActiveX1.DQPLDrawBox(20, 20, 50, 50, 0);
                axDPVActiveX1.RefreshCurrentPages();

{"Parameter not optional. (Exception from HRESULT: 0x8002000F (DISP_E_PARAMNOTOPTIONAL))"}
or number of parameters do not match...

Anyone have success using the DQPL functions with the viewer control?
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 28 Nov 15 at 9:14PM
Yes I'm using it with ActiveX version with no problem (at yet).

I'm not familiar with C# but can you separate exactly which function fires event ?


EDIT:
I just discover the same problem.

$oDPVS.DQPLSetOrigin($g__eQPDF_SORIGIN_TopLeft);
$oDPVS.DQPLSetMeasurementUnits($g__eQPDF_MUNITS_Milimeters)


err.number is: 0x8002000F
err.windescription: Parametr nie jest opcjonalny. (Parameter is not optional)

err.description is:
err.source is:
err.helpfile is:
err.helpcontext is:
err.lastdllerror is: 0
err.scriptline is: 232
err.retcode is: 0x00000000





and:

$oDPVS.DQPLSetLineColor(1, 0, 0)


DPViewer_Example.au3 (236) : ==> COM Error intercepted !
err.number is: 0x8002000E
err.windescription: Nieprawidłowa liczba parametrów (Incorrect number of parameters)

err.description is:
err.source is:
err.helpfile is:
err.helpcontext is:
err.lastdllerror is: 0
err.scriptline is: 236
err.retcode is: 0x00000000



Edited by mLipok - 28 Nov 15 at 9:21PM
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600
Back to Top
abutler View Drop Down
Beginner
Beginner


Joined: 06 May 14
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote abutler Quote  Post ReplyReply Direct Link To This Post Posted: 29 Nov 15 at 12:24AM
Thanks for reproducing this.
Back to Top
Paul View Drop Down
Moderator Group
Moderator Group


Joined: 25 Jun 14
Location: Slovakia
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Paul Quote  Post ReplyReply Direct Link To This Post Posted: 01 Dec 15 at 5:02PM
Hi guys,

It seems that the binary published on 4. November 2015 has been corrupted. The Debenu team is working on the solution, the corrected version should be available in the next days. I will inform you about the updates. 

Paul 
Debenu Support
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 01 Dec 15 at 7:03PM
Thanks for information.

Edited by mLipok - 01 Dec 15 at 7:03PM
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600
Back to Top
Paul View Drop Down
Moderator Group
Moderator Group


Joined: 25 Jun 14
Location: Slovakia
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Paul Quote  Post ReplyReply Direct Link To This Post Posted: 09 Dec 15 at 12:41PM
Hi guys,

The above mentioned issues were corrected, the solution will be available on the website within few days.
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