Eddie Monster
14th December 2001, 17:59
Regarding ~Vamsi's solution...
Go here (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=590) to see Vamsi's code.
What do the following lines of code do?
server2client(tmp.file1, "c:\temp\_.vamsi1", 1)
server2client(tmp.file2, "c:\temp\_.vamsi2", 1)
server2client(tmp.file, "c:\temp\" & local.path(1;(len(local.path)-3))&"ps",1)
ret = app_start("d:\ghostscript\gs7.03\bin\gswin32c.exe @_.vamsi1 @_.vamsi2", "c:\temp\","","","")
mark_h
14th December 2001, 20:10
server2client(tmp.file1, "c:\temp\_.vamsi1", 1)
server2client(tmp.file2, "c:\temp\_.vamsi2", 1)
server2client(tmp.file, "c:\temp\" & local.path(1;(len(local.path)-3))&"ps",1)
These three lines copy the temp files down to the client. Here is the format:
function extern long server2client(
const string source(),
const string dest(),
long text.mode,
[ long progress.window ] )
ret = app_start("d:\ghostscript\gs7.03\bin\gswin32c.exe @_.vamsi1 @_.vamsi2", "c:\temp\","","","")
This line starts ghostscript with parameters. Here is the format of this:
function extern long app_start(
const string commandline(),
const string directory(),
const string stdin(),
const string stdout(),
const string stderr() )
Mark
Eddie Monster
14th December 2001, 20:19
Mark,
Thanks for the assistance... Here is the set-up I have for the device. I think that I am missing something because when I use this device it doesn't appear to access Ghostscript at all. Any suggestions?
Device: PDF_Writer
Desc: Creates PDF Format
Device Type: Rewrite
4GL Program: ttstpconv
Argument: POSTSCRIPT
Path: filename.pdf
Change Allowed: Yes
Page Length: 66
all other fields are left blank.
mark_h
14th December 2001, 20:31
Change the 4gl program to be the new version of ttstpconv. If you look at the sample attached in my version you will see otuddconv3 in my device as the 4gl program.
If you used Vamsis post then you created and compiled a script - now just call it in the device.
Mark
Eddie Monster
14th December 2001, 22:11
I have replaced the ttstpconv with my script (pobgacrobat). When I try to test it by running a report and selecting my new device to print PDF, I receive an error stating that I don't have permission for pobgacrobat. I tried to go to User Authorizations, but it doesn't show up there. Where else can I set up such permissions?
mark_h
14th December 2001, 22:26
I am not sure about this, but on Unix check the directory $BSE/application. Go into the package and VRC combination. Make sure all directories and files have at least RW permissions(owner and group). I am not sure if it is this. I developed my version as a 3GL script in the package tu and module ddc. I do not know of any user permissions that have to be granted.
I changed my permissions on the file to 000 and got the error "Cannot read session or object". Have you developed other things in the pobga package and module?
With all these good questions I think I will split this thread and put it back in the tools forum. Maybe someone else has an idea about the permissions. I also added a link so others could see the code you referenced.
Thanks
Mark
Eddie Monster
17th December 2001, 17:38
Regarding the 4GL Program field:
I have modified Vamsi's script to suit my own needs in order to print in a PDF file format. When I run the script tfobgacrobat -(not pobgacrobat- my typo in a previous message - my apologies to all)... from form 2 of the Maintain Program Scripts Session (ttadv2130m000) everything appears to work fine. However, when I run it (indirectly) by selecting my Device for printing nothing happens. Does my tf-obg-acrobat script need to be placed in specific directory or do I need to use some sort of a reference for a path to my script?
In the field mentioned above I have the following:
tfobgacrobat
mark_h
17th December 2001, 19:41
Did I understand correctly? You have tfobgacrobat in the 4gl of the device. It should point to the object otfobgacrobat. The object is what needs to be run.
Give that a try.
Mark