IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#41097 - 10/19/12 04:54 PM Add Document Plugin Documentation
Uomo Del Ghiaccio Offline
OL Expert

Registered: 02/21/01
Posts: 669
The "Add Document" plugin does not appear to be outputting Optimized Postscript like is says in the documention.

Quote:
The output is an Optimized PostScript Stream job that is the combination of the data file and selected document.


I would really like Optimized Postscript.
_________________________
Uomo Del Ghiaccio
--------------------

Top
#41098 - 10/19/12 05:45 PM Re: Add Document Plugin Documentation [Re: Uomo Del Ghiaccio]
Yannick Fortin Offline
OL Expert

Registered: 08/25/00
Posts: 354
Loc: Objectif Lune Montréal
The documentation is wrong, this plugin creates a printer-centric job, although that would certainly be a good feature to add.

There is no direct way to get an Optimized PostScript job. The simplest way would be to use the printer output through a Send to Folder printer queue and capture the resulting file.
_________________________
Yannick Fortin, Team OL

Top
#41099 - 10/22/12 08:03 AM Re: Add Document Plugin Documentation [Re: Yannick Fortin]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1984
Loc: Objectif Lune, Montreal, Qc
I have requested that the documentation be modified. It should be online shortly.
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#41133 - 10/24/12 08:26 AM Re: Add Document Plugin Documentation [Re: Yannick Fortin]
Uomo Del Ghiaccio Offline
OL Expert

Registered: 02/21/01
Posts: 669
I'm trying to keep this all within the same process.

If I use a branch with a Send to Folder printer to create the Optimized Postscript file and then use a folder capture to pick up the file and continue on.

Is the Optimized Postscript file fully created before the process moves on to the next step of the workflow or will I need to use a script (example below) that checks for the existance of the file before proceeding to the next step?

Code:
Dim objExists
Dim sFileName, sFilePath, i

' Set initial variable values
sFilePath = "C:\Print2Folder\"
sFileName = sFilePath & Watch.GetVariable("sUnique")

' Use all UPPERCASE for constants
Const SCRIPTID = "FXST"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' Main
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
OpenFiles()
ProcessFile()
CloseFiles()

Call xWriteToLog("F", SCRIPTID, "Loop count = :" & i, 3)

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' Sub-Routines
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub ProcessFile()
    For i = 1 To 100
        If objExists.FileExists(sFileName) Then
           Exit for
        Else
           Watch.Sleep 100
       End If
    Next
End Sub

Sub OpenFiles()
    ' Startup FSO
    Set objExists = CreateObject("Scripting.FileSystemObject")
End Sub

Sub CloseFiles()
    ' Clean House
    Set objExists = nothing
End Sub

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' Functions
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function xWriteToLog(debug, scriptid, msg,level)

        ' Valid level values
        ' 1 = Error
        ' 2 = Warning
        ' 3 = Information
        ' 4 = Debug

        ' Gather current date from PlanetPress Watch
        Dim processDate
        processDate = Watch.ExpandString("SCRIPTLOG: %y-%m-%d - %h:%n:%s")
        ' Write entry to the PlanetPress Watch Log
        If debug = "T" then
                Watch.ShowMessage(processDate & " - " & scriptid & " - " & msg & " - " & level)
        Else
                Watch.Log processDate & " - " & scriptid & " - " & msg, level
        End If
End Function
 


I would also need to use a JobInfo along with a local variable to identify which file to pick back up.
_________________________
Uomo Del Ghiaccio
--------------------

Top
#41134 - 10/24/12 08:46 AM Re: Add Document Plugin Documentation [Re: Uomo Del Ghiaccio]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1984
Loc: Objectif Lune, Montreal, Qc
Control won't come back to the next task until the Optimized PS file has been completely generated, so no worries there.

In your branch, just set the value of some local process variable to the name of the PS file you created and you can then use it back in the main branch to specify which file to pick up in the Input folder task.
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top