Debenu PDF Viewer SDK - UDF v0.3

   (0 reviews)

1 Screenshot

About This File

This is a UDF for use Debenu PDF Viewer SDK - ActiveX component.

You can read more about this ActiveX component here:

http://www.debenu.com/products/development/debenu-pdf-viewer-sdk/

 

v 0.2

The main change is to add an event handler for followed events:

void zoomChanged( Double zoom);
Fired when current zoom is changed. Zoom value is passed in percent / 100. For example: 0.5 = 50%.

void vScrollbarChanged( Long max, Long value);
Fired when internal Vertical Scrollbar properties change, these values can be used to set external Vertical Scrollbars.

void hScrollbarChanged( Long max, Long value);
Fired when internal Vertical Scrollbar properties change, these values can be used to set external Vertical Scrollbars.

void pageChanged( Long currentPage);
Fired when current page has changed.

void pageCountChanged( Long pageCount);
Fired when current page count has changed. Usually after opening new Document.

void FocusGained( Long pOldWnd)
Fired when DPVS gains input focus and provides handle to focus loosing window.

void FocusLost( Long pNewWnd)
Fired when DPVS looses input focus and provides handle to focus gaining window.

void pageMouseDown( Long pageNum, Double xPos, Double xPos);
Fired when mouse button is pressed while hovering over PDF page. Provides page number and position transformed to PDF coordinates.

void pageMouseUp( Long pageNum, Double xPos, Double xPos);
Fired when mouse button is released while hovering over PDF page. Provides page number and position transformed to PDF coordinates.

void pageMouseMove( Long pageNum, Double xPos, Double xPos);
Fired when mouse pointer is moving over PDF page. Provides page number and position transformed to PDF coordinates.

 

 

2015/05/18   v0.3

added Function Header
added _DPVS_Button_End()
added _DPVS__GUI_FileName()
modified _DPVS__GUI_ChangeTitle()
modified error checking to _DPVS_OpenFile()
added _DPVS_CloseFile()
added _DPVS_OpenedFile()
modified _DPVS_SaveToFile()
added _DPVS_EventConsoleNotification()
modified all functions _DPVS_EVENT_..... - now using _DPVS_EventConsoleNotification()
added $g__fn_DPVS_EVENT_.....
modified all functions _DPVS_EVENT_..... - now using $g__fn_DPVS_EVENT_.....
Rename all functions _DPVS_Button..... >> _DPVS_Button_.....

 


What's New in Version v0.3

Released

    2015/05/18
    v0.3
        added Function Header
        added _DPVS_Button_End()
        added _DPVS__GUI_FileName()
        modified _DPVS__GUI_ChangeTitle()
        modified error checking to _DPVS_OpenFile()
        added _DPVS_CloseFile()
        added _DPVS_OpenedFile()
        modified _DPVS_SaveToFile()
        added _DPVS_EventConsoleNotification()
        modified all functions _DPVS_EVENT_..... - now using _DPVS_EventConsoleNotification()
        added $g__fn_DPVS_EVENT_.....
        modified all functions _DPVS_EVENT_..... - now using $g__fn_DPVS_EVENT_.....
        Renamed all functions _DPVS_Button..... >> _DPVS_Button_.....

 

 





User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

  • Similar Content

    • mLipok
      _html2pdf - Convert HTML file to PDF file with htm2pdf.exe by Synopse
      By mLipok
      ; #FUNCTION# ==================================================================================================================== ; Name ..........: _html2pdf ; Description ...: Convert HTML file to PDF file with htm2pdf.exe by Synopse ; Syntax ........: _html2pdf($sHTML_FileFullPath[, $sPDF_FileFullPath = Default[, $bDeleteHTML = False]]) ; Parameters ....: $sHTML_FileFullPath - a string value. HTML file full path. ; $sPDF_FileFullPath - [optional] a string value. Default value is Default -> $sHTML_FileFullPath & '.pdf' ; $bDeleteHTML - [optional] a boolean value. Default is False. ; Return values .: $sPDF_FileFullPath or set @error to 1 ; Author ........: mLipok ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: http://blog.synopse.info/post/2010/07/14/htm2pdf-free-tool ; Example .......: No ; =============================================================================================================================== Func _html2pdf($sHTML_FileFullPath, $sPDF_FileFullPath = Default, $bDeleteHTML = False) If $sPDF_FileFullPath = Default Then $sPDF_FileFullPath = $sHTML_FileFullPath & '.pdf' Local $sINI_FileFullPath = @ScriptDir & '\htm2pdf.ini' IniWrite($sINI_FileFullPath, 'Settings', 'HTML', $sHTML_FileFullPath) IniWrite($sINI_FileFullPath, 'Settings', 'PDF', $sPDF_FileFullPath) IniWrite($sINI_FileFullPath, 'Settings', 'OpenAfterSave', '0') IniWrite($sINI_FileFullPath, 'Settings', 'ScaleToFit', '1') IniWrite($sINI_FileFullPath, 'Settings', 'Orientation', 0) IniWrite($sINI_FileFullPath, 'Settings', 'PaperSize', 0) IniWrite($sINI_FileFullPath, 'Margins', 'Left', 2) IniWrite($sINI_FileFullPath, 'Margins', 'Top', 1) IniWrite($sINI_FileFullPath, 'Margins', 'Right', 1) IniWrite($sINI_FileFullPath, 'Margins', 'Bottom', 1) ShellExecuteWait(@ScriptDir & '\htm2pdf.exe', '/silent', @ScriptDir) If Not FileExists($sPDF_FileFullPath) Then Return SetError(1, 0, '') Else If $bDeleteHTML Then FileDelete($sHTML_FileFullPath) Return $sPDF_FileFullPath EndIf EndFunc ;==>_html2pdf  
      http://blog.synopse.info/post/2010/07/14/htm2pdf-free-tool#main
      http://blog.synopse.info/post/2010/07/14/htm2pdf-free-tool
      http://synopse.info/forum/viewtopic.php?pid=187
      http://synopse.info/files/pdf/htm2pdf.zip
      mLipok
       
    • ur
      Convert office documents and pdf to images
      By ur
      Is there any API or functions to convert all office documents(excel,word,ppt,etc) and pdf to images (jps,bmp or convert any animation in ppt to swf or gif).
      It should convert all the pages in the document to individual image files.
       
      Please help me on this.
    • mLipok
      How to get reference to PDF object embeded in IE
      By mLipok
      I was allways wondering How to get reference to AcrobatReader  object and after all to the PDF file embeded in IE.
      Today I was here:
      http://www.vitoplantamura.com/index.aspx?page=axvncviewer
       
      there is such a interesting html:
       
      When I analyze this then I start to wonder about this line:
       
      EDIT: above fraction was only an introduction, describing where it came my question.
       
      And now then the question arise :
      How I can use document.all to get the refrence to specified AxObject in this Case I mean to AcrobatReader opened in IE ?
      EDIT: of course I mean a case when I have opened document in IE.
       
       
    • Jewtus
      Inserting a PDF as object in word
      By Jewtus
      I'm trying to attach a file to a word document (the same way you would if you click insert --> Object --> Create from file --> Display as icon)
      I've tried to do:
      $oWord=ObjCreate("Word.Application") $oWord.Visible = True $oDoc=$oWord.Documents.Add('',False,0) ;$WdNewBlankDocument $oSelection=$oWord.Selection With $oSelection .InsertFile($filename,Default,False,False,True) endwith and that works but it doesn't create the icon style (so not really what I'm trying to do.
       
      I did some hunting around and I found this:
      https://msdn.microsoft.com/en-us/library/office/ff195728.aspx
      Which appears to be the correct function but it doesn't seem to work when I try it:
      $oWord=ObjCreate("Word.Application") $oWord.Visible = True $oDoc=$oWord.Documents.Add('',False,0) ;$WdNewBlankDocument $oSelection=$oWord.Selection With $oSelection .OLEObjects.Add(Default,$filename,Default,Default,True,"File") endwith But I get an unknown name error (80020006). Any idea what I'm doing wrong??
       
       
      EDIT Upon further investigation it looks like the type is ignored if a file name is given and vice versa. I'm not sure how I need to do this, but everything I'm reading says that this:
                  .OLEObjects.Add Filename:={Filename}, Link:=False, DisplayAsIcon:=True, IconFileName="ThisIsATest"
      should work, I just don't know how to make that execute in autoit
    • Chimp
      Perpetual Calendar (generated in pdf format)
      By Chimp
      This script generates a calendar of 12 pages in pdf format (ready to be printed if you want)
      it include for each month also the previous and the next month on the same page.
      It makes use of the "MPDF_UDF.au3" udf by taietel from >this topic
      you must download that udf and save it in the same folder with this script.
      (it seems that the version modified by bdr529 from post #231 is more updated.
      I used that one with my script.)
      Happy new year
      ; Create a Calendar in pdf ; ; download the "MPDF_UDF.au3" udf from here: http://www.autoitscript.com/forum/topic/118827-create-pdf-from-your-application/?p=1158973 ; it is at the bottom of post #231. Download and save it in the same path of this script. #include "MPDF_UDF.au3" ; #include <date.au3> $sYear = "2015" ; <--- change the year if you need another $sMonths = "January,February,March,April,May,June,July,August,September,October,November,December" $sDaysOfWeek = "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday" ; --- just change above names to localize (following names are italian for example) --- ; $sMonths = "Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre" ; $sDaysOfWeek = "Lunedì,Martedì,Mercoledì,Giovedì,Venerdì,Sabato,Domenica" ; ------------------------------------------------------------------------------------- Local $aMonths = StringSplit($sMonths, ","), $aDaysOfWeek = StringSplit($sDaysOfWeek, ",") Local $aPreviousMonth, $aNextMonth, $iDayOfWeek, $aColors[2] = ["0x000000", "0xFF0000"], $aDummy ; ;set the properties for the pdf _SetTitle("Calendar " & $sYear) _SetSubject("Calendar made with AutoIt (www.autoitscript.com)") _SetKeywords("calendar, pdf") _OpenAfter(True);open after generation _SetUnit($PDF_UNIT_CM) _SetPaperSize("A4") _SetZoomMode($PDF_ZOOM_FULLPAGE) _SetOrientation($PDF_ORIENTATION_PORTRAIT) _SetLayoutMode($PDF_LAYOUT_CONTINOUS) ;initialize the pdf _InitPDF(@ScriptDir & "\Calendar_" & $sYear & ".pdf") ;=== load used font(s) === _LoadFontTT("_TimesNR", $PDF_FONT_TIMES) _LoadFontTT("_TimesNRB", $PDF_FONT_TIMES, $PDF_FONT_BOLD) ; For $Month = 1 To 12 ; Generate 12 months _BeginPage() ; begin page ; --- create areas that will contains days ----------------------------------------------- _InsertTable(00.50, 00.50, 20.00, 28.50, 1, 1, 0xB0B0B0, 0xB0B0B0) ; background _InsertTable(00.80, 26.10, 19.40, 02.60, 1, 1, 0xFF0000, 0x000000, 0.03) ; main month title _InsertTable(00.80, 00.80, 02.70, 25.00, 1, 1, 0xFFFFFF, 0x000000, 0.03) ; previous month (the little on the left) _InsertTable(00.80, 25.01875, 02.70, 00.78125, 1, 1, 0xFF0000, 0x000000, 0.03) ; title of previous month _InsertTable(03.80, 00.80, 13.40, 25.00, 2, 16, 0xFFFFFF, 0x000000) ; this month _DrawLine(03.80, 00.80, 17.20, 00.80, "0X2", 0, 0.03, 0x000000, 0, 0) ; border of this month _DrawLine(17.20, 00.80, 17.20, 25.80, "0X2", 0, 0.03, 0x000000, 0, 0) _DrawLine(17.20, 25.80, 03.80, 25.80, "0X2", 0, 0.03, 0x000000, 0, 0) _DrawLine(03.80, 25.80, 03.80, 00.80, "0X2", 0, 0.03, 0x000000, 0, 0) _InsertTable(17.50, 00.80, 02.70, 25.00, 1, 1, 0xFFFFFF, 0x000000, 0.03) ; next month (the little on the right) _InsertTable(17.50, 25.01875, 02.70, 00.78125, 1, 1, 0xFF0000, 0x000000, 0.03) ; title of next month ; --- now fill the areas with the dates -------------------------------------------------- _InsertRenderedText(10.5, 27, StringUpper($aMonths[$Month]) & " " & $sYear, "_TimesNR", 50, 100, $PDF_ALIGN_CENTER, 0xffffff, 0xffffff) ; Main Month _DateTimeSplit(_DateAdd("M", -1, $sYear & "/" & $Month & "/1"), $aPreviousMonth, $aDummy) ; Previous Month _InsertRenderedText(2.15, 25.28, StringUpper($aMonths[$aPreviousMonth[2]]) & " " & $aPreviousMonth[1], "_TimesNRB", 8.5, 100, $PDF_ALIGN_CENTER, 0xffffff, 0xffffff) ; Previous Month _DateTimeSplit(_DateAdd("M", 1, $sYear & "/" & $Month & "/1"), $aNextMonth, $aDummy) ; Next Month _InsertRenderedText(18.85, 25.28, StringUpper($aMonths[$aNextMonth[2]]) & " " & $aNextMonth[1], "_TimesNRB", 8.5, 100, $PDF_ALIGN_CENTER, 0xffffff, 0xffffff) ; Next Month For $i = 1 To 31 If _DateIsValid($aPreviousMonth[1] & "/" & $aPreviousMonth[2] & "/" & $i) Then ; previous month $iDayOfWeek = _DateToDayOfWeekISO($aPreviousMonth[1], $aPreviousMonth[2], $i) _InsertRenderedText(01.80, 24.4 - 0.78125 * ($i - 1), $i, "_TimesNR", 12, 100, $PDF_ALIGN_RIGHT, $aColors[$iDayOfWeek = 7], $aColors[$iDayOfWeek = 7]) ; Previous Month's days _InsertRenderedText(02.00, 24.4 - 0.78125 * ($i - 1), StringLeft($aDaysOfWeek[$iDayOfWeek], 3), "_TimesNR", 10, 100, $PDF_ALIGN_LEFT, $aColors[$iDayOfWeek = 7], $aColors[$iDayOfWeek = 7]) EndIf If _DateIsValid($aNextMonth[1] & "/" & $aNextMonth[2] & "/" & $i) Then ; next month $iDayOfWeek = _DateToDayOfWeekISO($aNextMonth[1], $aNextMonth[2], $i) _InsertRenderedText(18.50, 24.4 - 0.78125 * ($i - 1), $i, "_TimesNR", 12, 100, $PDF_ALIGN_RIGHT, $aColors[$iDayOfWeek = 7], $aColors[$iDayOfWeek = 7]) ; Next Month's days _InsertRenderedText(18.70, 24.4 - 0.78125 * ($i - 1), StringLeft($aDaysOfWeek[$iDayOfWeek], 3), "_TimesNR", 10, 100, $PDF_ALIGN_LEFT, $aColors[$iDayOfWeek = 7], $aColors[$iDayOfWeek = 7]) EndIf If _DateIsValid($sYear & "/" & $Month & "/" & $i) Then ; main month $iDayOfWeek = _DateToDayOfWeekISO($sYear, $Month, $i) _InsertRenderedText(05.30 + (06.70 * Int($i / 17)), 26.30 - 1.5625 * ($i - (16 * Int($i / 17))), $i, "_TimesNRB", 24, 100, $PDF_ALIGN_RIGHT, $aColors[$iDayOfWeek = 7], $aColors[$iDayOfWeek = 7]) _InsertRenderedText(05.60 + (06.70 * Int($i / 17)), 26.30 - 1.5625 * ($i - (16 * Int($i / 17))), $aDaysOfWeek[$iDayOfWeek], "_TimesNR", 22, 100, $PDF_ALIGN_LEFT, $aColors[$iDayOfWeek = 7], $aColors[$iDayOfWeek = 7]) EndIf If $i < 31 Then ; separator line between days in previous and next month _DrawLine(01.00, 25 - 0.78125 * $i, 03.30, 25 - 0.78125 * $i, 2, 10, 0.02, 0x000000, 0, 0) _DrawLine(17.70, 25 - 0.78125 * $i, 20.00, 25 - 0.78125 * $i, 2, 10, 0.02, 0x000000, 0, 0) EndIf Next _EndPage() ; next month will be in a new page Next ; next month ;write the buffer to disk _ClosePDFFile() ; --- Functions --- Func _InsertTable($iX, $iY, $iW = 0, $iH = 0, $iCols = 0, $iRows = 0, $lFillColor = 0xFFFFFF, $lBorderColor = 0x000000, $fThickness = 0.01) Local $iPgW = Round(_GetPageWidth() / _GetUnit(), 1) Local $iPgH = Round(_GetPageHeight() / _GetUnit(), 1) If $iW = 0 Then $iW = $iPgW - $iX - 2 If $iH = 0 Then $iH = $iPgH - $iY - 2 Local $iColW = $iW / $iCols Local $iRowH = $iH / $iRows _SetColourStroke($lBorderColor) For $i = 0 To $iRows - 1 For $j = 0 To $iCols - 1 _Draw_Rectangle($iX + $j * $iColW, $iY + $iH - ($i + 1) * $iRowH, $iColW, $iRowH, $PDF_STYLE_STROKED, 0, $lFillColor, $fThickness) Next Next _SetColourStroke(0) EndFunc ;==>_InsertTable Func _Iif($fTest, $vTrueVal, $vFalseVal) If $fTest Then Return $vTrueVal Else Return $vFalseVal EndIf EndFunc ;==>_Iif edit:
      p.s. if you get this error: ERROR: _Iif() already defined.
      then just remove the _Iif() function from the bottom of this script
      this occurs with older AutoIt versions