preview the document

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
ddnwolff
Posts: 7
Joined: Thu Nov 21 2002
Location: Des Moines, Ia

preview the document

Post by ddnwolff » Tue Aug 10 2010

We setup the printer driver automatically using a vbs script. When we moved from version 2.5 to version 4.0 suite the preview the document option isn't gettig set anymore. Any ideas why that wouldn't work anymore?

Thanks

Dan

Code: Select all

                Const PostProcessing = 2429072 ' post process file using specified application
	Dim PDF
	On Error Resume Next
	Set PDF = CreateObject("cdintfex.cdintfex")
	If Err.Number <> 0 Then Set PDF = CreateObject("CDIntfEx.CDIntfEx.4")
	On Error GoTo 0
	PDF.DriverInit(amyuniname(i))
	PDF.PrinterParamStr("PostProcessing") = ins_loc & "\AcroRd32.exe"
	PDF.resolution = 150
	PDF.defaultdirectory = "c:\documents and settings\all users\desktop\"
	PDF.PaperSize = 1
	PDF.FileNameOptionsEx = PostProcessing
	PDF.DevModeFlags =  PDF.DevModeFlags Or 2 Or 4 Or 32 Or 128 Or 1024
	PDF.SetDefaultConfig  'To be called after setting all printer configuration
	Set PDF = Nothing

Jose
Amyuni Team
Posts: 550
Joined: Tue Oct 01 2002
Contact:

Re: preview the document

Post by Jose » Thu Jan 31 2013

Hello,

Below is complete VBS script that sets the PostProcessing option on the Amyuni PDF Converter.

This should help.

' This VB script can be used to configure the installed printer
Option Explicit
Dim PDF

Const NOPROMPT = 1 ' do not prompt for file name
Const USEFILENAME = 2 ' use file name set by SetDefaultFileName else use document name
Const PostProcessing = 65536 ' post process file using specified application
const ViewerExe = "c:\temp\PDFCreactiveDoc.exe"

'VERSION v4.5
'Set PDF = CreateObject("cdintfex.cdintfex.4.5")

'VERSION v4.0
Set PDF = CreateObject("cdintfex.cdintfex.4")

'Use your printer name here that you are installing
'This printer name should be unique to your application
PDF.DriverInit( "Amyuni PDF Converter" )

'Tells PDF Converter to call this EXE after printing
PDF.PrinterParamStr("PostProcessing") = ViewerExe

PDF.DefaultDirectory = "c:\temp"
PDF.DefaultFileName = "c:\temp\test.pdf"

'enable PostProcessing and convert hyperlinks
PDF.FileNameOptionsEx = NOPROMPT + USEFILENAME + PostProcessing

'Clean Up
Set PDF = Nothing

MsgBox "Printer Configured",vbInformation, "Amyuni Technologies"
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite

Post Reply