Jump to content

Search the Community

Showing results for tags 'pdf'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • Forum
  • AutoIt


  • Community Calendar

Found 31 results

  1. First of all IDK if it's OK to post this topic here and if not I'm asking to move it to the right place. Anyway I ask for help in the PDF UDF main thread but nobody has answer me yet and I really need help on this. See the problem started when I upgraded Autoit to its new version you can see the thread in the following link
  2. Hi, I am trying to find more information on generating PDF files from AutoIT and found the UDF topic Also found some info on creating .FDF file and use PDFTK for merging, but i can't find info about a custom based layout. What i trying to find out is, if it is possible to generate a variable layout. For an example i created a script which is based out 20 fields and every field can contain information. If one of those fields are not filled, it shouldn't be printed on the PDF either. To make it more difficult, the PDF should contain a heading, the first 10 fields and then a horizontal line across the PDF and then a new heading and then show the last 10 fields. But only the fields which are filled. Is this possible?
  3. Hello everyone, I'm working on a task where, a PDF file is opened (in IE browser) when I click a link in a website. I have to read the first page of the PDF to find particular strings. Can you please share some ideas?
  4. Here: https://github.com/nachbar/TRichViewToPdfUsingDebenu/blob/master/Unit1.cpp I found a code in C++ for file format conversion from RTF to PDF with using Debenu QuickPDF. I know how to use Debenu QuickPDF in AutoIt . My question is about RTF part of this code: HDC hdcNew = debenu->GetCanvasDC( RTFPRINTINGDOTSPERINCH * RTFPAGEWIDTHININCHES, RTFPRINTINGDOTSPERINCH * RTFPAGEHEIGHTININCHES); canvas = new TCanvas; canvas->Handle = hdcNew; RVReportHelper1->DrawPage( PageCounter, canvas, true, RTFPRINTINGDOTSPERINCH * RTFPAGEHEIGHTININCHES); // LastPageHeight); First there is hdcNew declaration , and this is not the problem. My problem is in converting the following code snippet, to AutoIt canvas = new TCanvas; canvas->Handle = hdcNew; RVReportHelper1->DrawPage( PageCounter, canvas, true, RTFPRINTINGDOTSPERINCH * RTFPAGEHEIGHTININCHES); // LastPageHeight); If you remember, I created RTFPrinter sometime ago. But it was some time ago , and created by trial and error, rather than in-depth analysis. Also, it was just a modification of another script, not my own work from scratch. So now I'm looking for help how to adapt this code snippet to AutoIt. Any tips ? Regards, mLIpok
  5. Hi guys, I am trying to read a pdf file with unstructured data. I dontot know how to handle pdf activities in AutoIt, Can you help me with any UDF to open the PDF and read the doc. Thanks for your time.
  6. Hey Community, cause im too new in the Auto it world i will try it with the your help. hopefully. I woud like to know how i can handle my Problem. ---- I have a Excel Data with 362 random numbers. For Example: 1166642335374 1172899897343 ..... this numbers are a part of the filepath ...example D:\Projekte\1166_64233_5374 as u can see its the first number of the Excel data. After the first 4 numbers it shoud make a "_" than another 5 "_" This is my first question. How can i handle this to make it Shell execute. -------- Second question: If i am in the path. For Example: D:\Projekte\1166_64233_5374 the code shoud search for specific PDF Files. They are named like: 0050569E364B1ED79B900F73E62660EC.pdf the first 15 letters are always the same 0050569E364B1ED when he found this data he has to copy it on a Folder on the Desktop. (There can also be 2 or 3 pdfs in one Folder with this letters) ---- Please give me some help :-)
  7. Hey Everybody, as you know im on a very low autoit-level. My question is: How can i read all PDFs from a Folder wich is open and copy them to a Folder on a Desktop. The Folder wich contains the PDFs is variable Z:\Projektls\"*"*"*EVERYTIME ANOTHER ENDING"*"*"*"*" There can be 1 PDF or even 15 PDFs. i tried it with _FileListToArray and _FileCopy but i Need some help to understand this language THANKS!
  8. GUI tabs to PDF

    Hi Guys, I've been reading this post ... When I came accross the examples, non of them had what I was looking for. I basically want to "snapshot" my GUI's multiple tabs and send them into the pdf. A little nudge from you guys would be great. Im really stuck with this one, therefore I have no code. Lets discuss or point me in a right direction... thanks alot
  9. Good morning I was looking around the forum if there were some customizable solutions about creating a PDF from "0" to something like a report... What I'd like to do is something with a header ( 2 logos and a title ), with a table which contains data read from a file At the moment, I was working with HTML, since I know it and it's very simple to do a table with some data inside... But know, I'm a bit stuck about the exporting the HTML page to PDF... And, here too, if someone knows how to do it, please, I'm here listening Thanks guys
  10. Good morning guys I'd like to know if there is a way to convert a PDF in CSV or, eventually, in TXT, in order to read from it, like a database... I have a PDF and I think ( I dind't search a lot on the forum ) with AutoIt, but I'd like work with Excel styles... Does anyone know a good program which convert PDF to CSV? PS: the PDF file is 5 MB, and it contains 439 pages... Thanks everyone for the help
  11. Hi guys Looking to automate...I have PDF files...Need to convert them all to 2 pages each but more specifically, retain only the first and last. Searched a lot and hitting the wall....Any ideas? Just directions would do... Not sure how to "print to file" and I believe |ShellExecuteWait($sFilePath, " /h /p", "", "print", @SW_HIDE)| doesn't give options of what pages...
  12. ; #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
  13. 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.
  14. 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.
  15. 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) endwithand 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") endwithBut 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
  16. WKHtmkToX

    Version 1.0.0


    Class using AutoItObject to generate PDF or image (JPG, BMP, GIF, PNG...) files from webpages or HTML files through wkhtmltopdf and wkhtmltoimage.
  17. Debenu Quick PDF Library - UDF

    Version 0.9


    ; #INDEX# ======================================================================================================================= ; Title .........: UDF for "Debenu Quick PDF Library" ; AutoIt Version : ; Language ......: English ; Description ...: A collection of functions for Debenu Quick PDF Library ; Author(s) .....: mLipok ; Modified ......: ; =============================================================================================================================== Release note: Erratum v0.7: Forum link:
  18. PDFCreator

    Version 0.1a


    Title: UDF for PDFCreator 1.x.x Filename: PDFCreator.au3 Description: A collection of functions for PDFCreator 1.x.x Author: mLipok Modified: Version: 0.1 Last Update: 2015/05/21 Requirements: this UDF is for PDFCreator 1.x.x not for 2.x.x FORUM LINK:
  19. A long time I was using "PDFCreator - Print2PDF" made by @ptrex Thanks to @ptrex for this UDF: which was for me an inspiration, not only for PDFCreator, but to learn ActiveX controls. I many times modified @ptrex UDF, but recently more and more felt the need to write it almost from scratch. Here it is: How to use it ? There is a region "Example Init" so you need just to run this UDF. #Region PDFCreator.au3 - Example Init If Not @Compiled And @ScriptName = 'PDFCreator.au3' Or @ScriptName = 'PDFCreator_DebugIt.au3' Then $g__oPDFCreator_ErrorHandler = ObjEvent("AutoIt.Error", "__PDFCreator_ErrFunc") #cs Not working yet _PDFCreator_ConvertDocument(@ScriptDir & '\PDFCreator.rtf',@ScriptDir & '\PDFCreator_2.pdf') ShellExecute(@ScriptDir & '\PDFCreator.rtf') ShellExecute(@ScriptDir & '\PDFCreator_2.pdf') MsgBox(0, 'END', '_PDFCreator_ConvertDocument()') #ce _PDFCreator_Example_1_RTF2PDF() MsgBox(0, 'END', '_PDFCreator_Example_1_RTF2PDF()') _PDFCreator_Example_2_COMBINEALL() MsgBox(0, 'END', '_PDFCreator_Example_2_COMBINEALL()') _PDFCreator_Example_3_COMBINEALL() MsgBox(0, 'END', '_PDFCreator_Example_3_COMBINEALL()') MsgBox(0, 'EXIT', 'Close this MsgBox to exit example script.') ;~ MsgBox(0, '$g__oPDFCreator.cWindowsVersion', $g__oPDFCreator.cWindowsVersion) Exit EndIf #EndRegion PDFCreator.au3 - Example Init REMAKRS: this UDF is for PDFCreator 1.x.x not for 2.x.x some reference and examples for PDFCreator 2.x.x Best regards, mLipok
  20. Debenu PDF Viewer SDK - UDF

    Version v0.3


    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 2015/05/18 v0.3
  21. Hello! Sorry to ask this, I'm sure this is a pretty low level question, but can't figure it out by my own. I found plenty of threads, and I know that there is UDFs for this (my request to download Scite Config to try and implement it was denied...) I'm automating a program, to test it. I have basicly everything set by now (thanks to not small part to this forum) or what I miss I already know how to handle. My only remaining thing I want to achive is to communicate with PDFCreator with COM, not using its UI. In a specific part of the automatization the PDFCreator pops up (it saves/print the bills if neceserry) what I would like to achive is to tell the PDFCreator to rename and save the document to a folder. I know this should be done with Obj functions, but I don't know where can I find the "commands". I have read ptrex PDFCreatur UDF, but still I just don't get it. Right now I think I need to "create" an ObjCreate to the poping up window as a variable, and then communicate what I want it to do with it somehow. I don't know the commands, and not even sure what to use other then ObjCreate. Thank you for your help!
  22. 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
  23. Hello all. I am trying to figure out the best approach to compare PDF outputs for consistency. Currently, this is a human task where PDFs are held up to a light to see if all the values line up exactly with test data. I have to believe there is a better way. That said GDIPlus is a bit of a mystery to me - I have looked at some of the functions - and I stumbled upon >this very useful script in my forum search. My question is: would converting the PDF to an image and comparing the image with GDIPlus be the way to go or is there a different more efficient approach that you would recommend? Any guidance would be greatly appreciated. JFish
  24. I would like to present, the UDF for Debenu PDF Viewer SDK You can also find more info here: Debenu Quick PDF UDF In order to download the current version of the UDF, vist download section.
  25. Hello all I am trying to create img2pdf program using The >MPDF UDF. The base of my code is dirived from the img2pdf example. I can make the image itself the a custom size but not the page itself. Any ideas? #include "..\MPDF_UDF.au3" _SelectImages() Func _SelectImages() Local $var = FileOpenDialog("Select images", @ScriptDir & "\", "Images (*.jpg;*.bmp;*gif;*png;*tif;*ico)", 4) If @error Then MsgBox(4096, "", "No File(s) chosen") Else Local $aImgs = StringSplit($var, "|", 3) Dim $cHeight[1] $cHeight[0] = 0 Dim $cWidth[1] $cWidth[0] = 0 _GDIPlus_Startup() For $i = 1 To UBound($aImgs) - 1 $oGdi = _GDIPlus_ImageLoadFromFile($aImgs[0] & "\" & $aImgs[$i]) If @error Then MsgBox(0, "Error", @error) Exit EndIf _ArrayAdd($cWidth, _GDIPlus_ImageGetWidth($oGdi)) _ArrayAdd($cHeight, _GDIPlus_ImageGetHeight($oGdi)) Next _GDIPlus_Shutdown() _OpenAfter(True);open after generation _SetUnit($PDF_UNIT_PT) _SetZoomMode($PDF_ZOOM_CUSTOM, 90) _SetLayoutMode($PDF_LAYOUT_CONTINOUS) ;initialize the pdf _InitPDF(@ScriptDir & "\Image2PDF.pdf") If UBound($aImgs) <> 1 Then ;=== load resources used in pdf === For $i = 1 To UBound($aImgs) - 1 _LoadResImage("img" & $i, $aImgs[0] & "\" & $aImgs[$i]) Next ;load each image on it's own page For $i = 1 To UBound($aImgs) - 1 _SetPaperSize("CUSTOM",$cWidth[$i],$cHeight[$i]) _BeginPage() _InsertImage("img" & $i, 0, 0,$cWidth[$i], $cHeight[$i]) _EndPage() Next Else _LoadResImage("taietel", $aImgs[0]) _BeginPage() ;scale image to paper size! _InsertImage("taietel", 0, 0, _GetPageWidth() / _GetUnit(), _GetPageHeight() / _GetUnit()) _EndPage() EndIf ;then, finally, write the buffer to disk _ClosePDFFile() EndIf EndFunc ;==>_SelectImages ps I have included the my source the udf and the images I am using to test it. Img2Pdf.zip