Products | About Us

File type filter (deny printing)

First off, Print Distributor has been a great solution for my print capturing needs !!! I notice there are scripting options and was worndering if I could filter by file type to allow or deny a print.

Due to security my client is only allowed to print *.xls and *.csv files. Is there a way I can only allow these file types to be printed?

The file type appears using the ?DN? field but Im not sure how to write a script to allow only these file types to be printed.

Thanks Jamie.

Jamie King
2nd Mar 2009

Jamie,

Add a Reprint action to your list of actions in Print Distributor.

Select the action then click on the Condition button.

Enter the expression:

InStr(DocumentName, ".xls, 1) or InStr(DocumentName, ".csv", 1)

Now Print Distributor will only reprint jobs with .csv or .xls in the document name field.

Tony Edgecombe
2nd Mar 2009

Thanks I will give this a go... is there also a way of simply denying PDF's to be printed ?

Jamie King
3rd Mar 2009

Only if there is something in the document name you can pick up on.

Tony Edgecombe
3rd Mar 2009

All PDFs need to be denied and I have found that the the application my client is using names the print with "OSTX3" always in the document name.

I have tried the following:

InStr(DocumentName, "OSTX3", 0) or InStr(DocumentName, ".pdf", 0)

But this stops everything from printing ... any other options for denying ".pdf" & "OSTX3" documents from printing?

Jamie King
3rd Mar 2009

(InStr(DocumentName, ".csv", 0) or InStr(DocumentName, ".xls", 0)) and not (InStr(DocumentName, "OSTX3", 0) or InStr(DocumentName, ".pdf", 0))

Tony Edgecombe
3rd Mar 2009

Thanks for your reply ... however my clients are now allowed to print everything but "OSTX3" and ".pdf"

is there a way to only deny "OSTX3" and ".pdf" but allow all other prints?

Jamie King
3rd Mar 2009

not (InStr(DocumentName, "OSTX3", 0) or InStr(DocumentName, ".pdf", 0)

Tony Edgecombe
4th Mar 2009

Sorry but that script stops all files from printing.

This is how my printers are configured.

1. Virtual printer is shared to the users.
2. user sends a print job to the virtual printer
3. The virtual printer Writes to File.
4. The file is then reprinted to the physical printer with the conditional script listed below.

not (InStr(DocumentName, "OSTX3", 0) or InStr(DocumentName, ".pdf", 0)

Currently the file is being captured for all prints but the conditional filter is preventing all files from printing.

Please help me.

Jamie King
5th Mar 2009

Jamie,

Sorry I missed a bracket off, it should be:

not (InStr(DocumentName, "OSTX3", 0) or InStr(DocumentName, ".pdf", 0))

Tony Edgecombe
6th Mar 2009

This thread is closed to new posts.

Feed