lukeneo 0 Report post Posted August 16, 2006 Is it possible to convert html file tO Pdf with autoit ? are there available functions for autoit ? any free command line tool ? Thanks ! Share this post Link to post Share on other sites
dabus 0 Report post Posted August 16, 2006 (edited) I'm pretty sure you can do that whith gs(ghostscript). Don't ask me how. I would rather use PDFCreator or PaperlessPrinter (I think they use gs as a backend). Those tools are just virtual printers that can convert every printable "thing" into pdf(image,...)-format. If you want to do that with autoit, I would suggest you search the web how you could do that with these trio. Edited August 16, 2006 by dabus Share this post Link to post Share on other sites
NELyon 1 Report post Posted August 16, 2006 SciTE has an option to export to PDF, and if it's autoit code, it will keep it's color syntax. Share this post Link to post Share on other sites
blademonkey 4 Report post Posted August 16, 2006 Is it possible to convert html file tO Pdf with autoit ?are there available functions for autoit ?any free command line tool ? Thanks !Have you tried searching on google?I have and I found this:http://www.freedownloadscenter.com/Web_Aut...s/html2pdf.htmlI suggest picking up the Google Hacks Book (O'Reilly) isbn 0-596-00857-0 ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung Share this post Link to post Share on other sites
JSThePatriot 11 Report post Posted August 16, 2006 Or you could pay $99 to get the Adobe SDK, and really put AutoIt to work to convert an HTML document to PDF. JS AutoIt LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
bluebearr 1 Report post Posted August 16, 2006 I like to use one of the free PDF printers to convert any doc to PDF. I use PrimoPDF myself. BlueBearrOddly enough, this is what I do for fun. Share this post Link to post Share on other sites
autosc 0 Report post Posted August 17, 2006 Have you tried searching on google?I have and I found this:http://www.freedownloadscenter.com/Web_Aut...s/html2pdf.htmlI suggest picking up the Google Hacks Book (O'Reilly) isbn 0-596-00857-0dead link of Download ! Do you have a copy to share ? Share this post Link to post Share on other sites
randallc 0 Report post Posted August 17, 2006 (edited) Hi,This has been discussed; PDF document, PDF@bluebearr, I think you discussed primo before; do you have an autoIt script to show?Best, randall Edited August 17, 2006 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Share this post Link to post Share on other sites
bluebearr 1 Report post Posted August 18, 2006 No, I don't have a script. Basically would involve printing your document from the app of your choice (in this case, your web browser). I'm not sure much is to be gained by scripting it, unless you need to batch convert a number of documents. BlueBearrOddly enough, this is what I do for fun. Share this post Link to post Share on other sites
pionner 0 Report post Posted March 13, 2014 (edited) maybe this can help. at any issue, please post you error message. expandcollapse popupFunc Htmltopdf($your_fullpath_HTML_file) Const $maxTime = 10 ; in seconds Const $sleepTime = 250 ; in milliseconds Dim $fso, $WshShell, $PDFCreator, $DefaultPrinter, $ReadyState, $c, $Scriptname, $Scriptbasename, $URL $URL = StringReplace( "file:///" & StringReplace($your_fullpath_HTML_file,"\","/"), " " , "%20") $fso = ObjCreate("Scripting.FileSystemObject") $WshShell = ObjCreate("WScript.Shell") $PDFCreator = ObjCreate("PDFCreator.clsPDFCreator") if IsObj($PDFCreator) then ProgressSet(20, "creación de objetos ") Else msgbox(48, "SACLIS - Impresión PDF","No se puede crear Objeto PDF!") EndIf $PDFCreator.cStart ("/NoProcessingAtStartup") $ReadyState = 0 With $PDFCreator .cOption("UseAutosave") = 1 .cOption("UseAutosaveDirectory") = 1 .cOption("AutosaveDirectory") = @ScriptDir & "\test" .cOption("AutosaveFilename") = "html_" & $DNI .cOption("AutosaveFormat") = 0 ; 0=PDF, 1=PNG, 2=JPG, 3=BMP, 4=PCX, 5=TIFF, 6=PS, 7= EPS, 8=ASCII $DefaultPrinter = .cDefaultprinter .cDefaultprinter = "PDFCreator" .cClearcache() ;$helpstring = StringReplace(@Desktopdir,"\","/") .cPrintURL($URL,250) .cPrinterStop = 0 EndWith ProgressOff() $c = 0 Do $c = $c + 1 Sleep ($sleepTime) Until ($ReadyState = 0) and ($c < ($maxTime * 1000 / $sleepTime)) With $PDFCreator .cDefaultprinter = $DefaultPrinter Sleep(200) .cClose() EndWith If $ReadyState = 0 then Consolewrite ("Creating test page as pdf." & @CRLF & @CRLF & "An error is occured: Time is up!"& @CR) ProcessClose("PDFCreator.exe") EndIf EndFunc Pionner Edited March 13, 2014 by pionner Share this post Link to post Share on other sites
Melba23 2,630 Report post Posted March 13, 2014 pionner,You do realise that the post above yours is 8 years old? In future please engage your brain before hittng the "Submit" button. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Share this post Link to post Share on other sites