Trying to Draw output

Trying to Draw output

Forum member · Mar 3, 2008
I am coding inside of an application that allows customization using vbscript. I need to draw the pdf but can't figure out how. The computer has acrobat ready and IE with the reader plugin. Don't really care how just need to display the generated pdf so it can be printed. I only see 3 methods (draw, drawtoweb and drawtofile).

Re: Trying to Draw output

Support · Mar 3, 2008
Maybe you can provide a little bit more clarification to your requirements and then we can point you in the right direction. Are you looking for an API to layout and create your PDF from within your VBScript application? Or are you just looking for a PDF viewer that will display any PDF documents from within your VBScript application? Or both? Or something completely different? Let me know and we can provide you with more direction. Thanks, ceTe Software Support Team

Re: Trying to Draw output

Forum member · Mar 4, 2008
We are using DynamicPDF Generator for COM/ActiveX v3 to create and save PDF files in an application using vbscript. That works fine by drawing the output to a file. I know need to create a mailing label pdf and send it to the printer. I have the code to generate the pdf by clicking a button in the software I will call the script to create the pdf based on the data displayed in the application. I need the output of the script to either open in acrobat reader or open in internet explorer. Since this script is not in an asp page I cannot use drawtoweb it gives me an MTS error. I can drawtofile but I don't know how from vbscript to open the saved file automatically or if there is a way to use draw and send the bytearray to acrobat reader. My goal is to allow the users to click a button in the application and have the resulting pdf display so they can print it. They really have no need to save it or anything else just print the labels.

Re: Trying to Draw output

Support · Mar 4, 2008
Hello, You can open the saved PDF document without any problem using Run method of the Shell object. Following is some sample line of code for this. Option Explicit Dim WshShell Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "C:\Temp\MyDocument.pdf" Thanks, ceTe Software Support Team.