Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
integer li_rc OLEObject ole_distill string ls_orig_printer, ls_ps_file, ls_pdf_file string ls_filename = 'C:\testapp\testapp' // Cleanup from previous run ls_ps_file = ls_filename + '.ps' ls_pdf_file = ls_filename + '.pdf' FileDelete(ls_ps_file) FileDelete(ls_pdf_file) // Create and connect to Distiller object ole_distill = Create OLEObject li_rc = ole_distill.ConnectToNewObject("PdfDistiller.PdfDistiller.1") If li_rc <> 0 Then Destroy ole_distill Return End if // Set distiller properties ole_distill.bShowWindow = False ole_distill.bSpoolJobs = True // Backup original printer and change to PS ls_orig_printer = PrintGetPrinter() PrintSetPrinter('Sybase Datawindow PS') // Print to postscript file dw_1.object.datawindow.print.filename = ls_ps_file dw_1.object.datawindow.print.printername = 'Sybase Datawindow PS' dw_1.Print() // Use Distiller to convert postscript file to pdf li_rc = ole_distill.FileToPdf(ls_ps_file, ls_pdf_file, 'Standard.joboptions') // Reset printer and cleanup PrintSetPrinter(ls_orig_printer) Destroy ole_distill
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.