Debenu Quick PDF Library - UDF 0.8

   (0 reviews)

1 Screenshot

About This File

; #INDEX# =======================================================================================================================
; Title .........: UDF for "Debenu Quick PDF Library"
; AutoIt Version : 3.3.10.2++
; Language ......: English
; Description ...: A collection of functions for Debenu Quick PDF Library
; Author(s) .....: mLipok
; Modified ......:
; ===============================================================================================================================

Release note:

    2015/06/15
    v0.7

    QuickPDF.au3
    *    Added: many code descriptions
    *    Added: enums $__eQPDF_ERROR_* for error checking
    *    Added: error checking (each function should return @error @extended and ReturnValues )
    *    Added: New function __QPDF_ObjIsValid()
    *    Added: New function _QPDF_CreateObjectFromStream()
    *    Added: New function _QPDF_Display()
    *    Added: New function _QPDF_Display_PDFFile()
    *    Added: New function _QPDF_FolderExtractText()
    *    Added: New function _QPDF_GetInformation()
    *    Added: New function _QPDF_GetInformationEx_Lite()
    *    Added: New function _QPDF_GetPageMetricsToString()
    *    Added: New function _QPDF_MergeFiles_Lite()
    *    Added: New function _QPDF_Page_2in1()
    *    Added: New function _QPDF_Page_2in1_File()
    *    Added: New function _QPDF_PrintFromStream()
    *    Added: New function _QPDF_ReplaceFonts_in_File()
    *    Added: New function _QPDF_Rotate_Lite()
    *    Added: New function _QPDF_RotateFileLeft_Lite()
    *    Added: New function _QPDF_RotateFileRight_Lite()
    *    Added: New function _QPDF_SaveAndOpen()
    *    Added: New function _QPDF_StringInPDFFile()
    *    Added: New function _QPDF_StringInPDFStrem()
    *    Added: New function _QPDF_TextToHtml()
    *    Added: New function _QPDF_TXT_to_PDF()
    *    Added: New function _QPDF_TXT_to_PDF_Lite()
    *    Added: New function _QPDF_TXTFile_to_PDFFile()
    *    Added: New function _QPDF_UDF_ErrorDescription()
    *    Added: New function _QPDF_Html_Font_BackgroundColor()
    *    Added: New function _Matrix_Create()
    *    Added: New function _Matrix_Move()
    *    Added: New function _Matrix_Rotate()
    *    Added: New function _Matrix_Skew()
    *    Added: New function _Matrix_Zoom()
    *    Added: in _QPDF_A4toA5() Function added $oQP.NormalizePage(0)
    *    Added: in _QPDF_DrawText_Lite() Function added $oQP.NormalizePage(0)
    *    Added: _QPDF_ExtractTextFromFile() return values @Extended = $iTotalPages
    *    Added: in _QPDF_PrintPDFFile addded new parameter >>> $sPrinterName
    *    Added: __QPDF_NewLibraryPath_Commercial

    *    Changed: __QPDF_NewLibraryPath_Commercial() is now Internal Function
    *    Changed: __QPDF_UnlockKey() now have only one parameter
    *    Changed: _QPDF_CreateObject() rewriten to give complet Error Checking
    *    Changed: _QPDF_CreateObjectAndUnlock() rewriten to give complet Error Checking
    *    Changed: _QPDF_SetLicenseKey() rewriten to give complet Error Checking
    *    Changed: _QPDF_ExtractTextFromStream() use _QPDF_ExtractAllText()
    *    Renamed: $__fNotification_QPDF to $__bNotification_QPDF
    *    Removed: parameter $sLicenseKey from __QPDF_UnlockKey() function - is not needed as unlock is only for Commercial and License key is checked befor this function is called

    !!!!!!!!!!!!!!! SCRIPT BREAKING CHANGE !!!!!!!!!!!!!!!
    *    Removed: parameters $sPDF_Password from _QPDF_ExtractAllText() function
    *    Changed: $__eQPDF_ERROR_DebenuLicense >> $__eQPDF_ERROR_INVALIDLICENSEKEY
    *    Changed: _QPDF_ExtractTextFromFile(.. , $iExtractOptions --> default is 7 previously 8
    *    Changed: _QPDF_NewLibraryPath_Commercial($sDLL_FileFullPath) now have only ONE parameter
    *    Changed: _QPDF_RotateFile_Lite($sPDF_FileFullPath[, $iPageRotation = 0]) now have only ONE parameter

 

 

Erratum v0.7:

in examples there is:

; or just copy "c:\Program Files (x86)\Debenu\PDF Viewer SDK\TRIAL_LICENSE_KEY.TXT" to @ScriptDir & '\TRIAL_LICENSE_KEY.TXT'

but it should be:

; or just copy "c:\Program Files (x86)\Debenu\PDF Library\TRIAL_LICENSE_KEY.TXT" to @ScriptDir & '\TRIAL_LICENSE_KEY.TXT'

 

 

Forum link:

 

 


What's New in Version 0.8

Released

Quote

    ===================================================
    2015/08/xx
    v0.8 alpha-1
    *
    QuickPDF.au3
    *    Added: Function:  _QPDF_Arrow() - mLipok
    *    Added: ENUMS: $QPDF_EXT_ - mLipok
    *    Added: ENUMS: $QPDF_RET_DEFAULT = 0, $QPDF_RET_FAILURE = -1 - mLipok
    *
    *    !!!!!!!!!!!!!!! SCRIPT BREAKING CHANGE !!!!!!!!!!!!!!!
    *    Changed: ENUMS:  $__EQPDF_RETURN_ >> $QPDF_RET_ - mLipok
    *    Changed: ENUMS:  $__eQPDF_ERROR_ >> $QPDF_ERR_ - mLipok
    *    Changed: ENUMS:  $QPDF_ERR_ALL_IS_OK >> $QPDF_ERR_OK - mLipok
    *    Renamed: Function: __QPDF_ObjIsValid >> __QPDF_IsValidObject - mLipok
    *    Changed: ENUMS:  $QPDF_RET_  changed concept - ERRORS are < 0 - mLipok
    *            but if you want to check I function return with Succesc you must chceck
    *    Removed: ENUM: $QPDF_RET_OBJCREATE_ERROR - mLipok
    *    Removed: ENUM: $QPDF_RET_INVALID_COMMERCIAL_LICENSE_KEY - mLipok
    *
    *
    ===================================================
    2015/11/06
    v0.8 alpha-2
    *
    *    Added: support for QPDFLibrary 12.11 - now is default - mLipok
    *
    *
    ===================================================
    2015/11/17
    v0.8 alpha-3
    *
    *    New: Function: _QPDF_PageEnumerator - mLipok
    *    New: Function: _QPDF_Example_ExtractImages - mLipok
    *    Renamed: Enum: $QPDF_ERR_ISLITEINSTEADCOMMERCIAL >> $QPDF_ERR_ISLITE - mLipok
    *    Renamed: Enum: $QPDF_ERR_ISCOMMERCIALINSTEADLITE >> $QPDF_ERR_ISCOMMERCIAL - mLipok
    *    Renamed: Enum: $QPDF_ERR_ISNOTBEBENUOBJECT >> $QPDF_ERR_ISNOTBEBENU - mLipok
    *    Added: support for   DebenuPDFLibraryCPAX1211.dll  - mLipok
    *       http://labs.debenu.com/2015/11/09/debenu-quick-pdf-library-12-11-downloads/
    *       http://www.debenu.com/downloads/installers/debenu_quick_pdf_library_win.zip
    *    Changed: Function: _QPDF_Page_2in1_File - on succes return $sSAVE_FileFullPath - mLipok
    *
    *
    ===================================================
    2016/06/13
    v0.8
    *
    *     Added: support for DebenuPDFLibraryAX1212.dll - Now this is default setting - mLipok
    *    Added: #Au3Stripper_Ignore_Funcs=_QPDF_Shutdown - mLipok
    *    Changed: Refactored (If Then Else EndIf + Return) in many funciton - mLipok

 





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