[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

2916.0. "How to add a new print function?" by COPCLU::COPLE4::GLARGAARD (Allan Glargaard, DS @DMO) Fri Jun 25 1993 12:37

  Hi!

  I have a problem getting a print function to work, maybe you can
  help me with a working example.

  I created a new format called DYT with a print function DO
  OA$LIB:MINI.SCP.

  The DYT format actually is a copy of the WPSPLUS format, but with a
  print function defined.

  When I print a document with handling DYT to TERMINAL, it looks
  nice, but if I print to FILE or any printer type, I get garbage
  output.

  The MINI.SCP is included below. It is very dumb, but should work as
  an example before I create the real thing.

!
! MINI.SCP
!-----------------------------------------------------
! Format DYT document to WPSPLUS before print
!
!What is our target file:
GET #PRINT_OUTFILE = "OAUSER:T.WPL"
! How do we get it:
! Eg.:
! GET OA$DCL = "CONV/DOC " #PRINT_FILE "/FORM=DYT " #PRINT_OUTFILE "/FORM=WPL"
COPY "OA$LIB:RENDITION.WPL" #PRINT_OUTFILE
! Now we have it
! It's a WPS-PLUS file, so tell WPPRINT about it:
GET #PRINT_DSAB = "WPSPLUS"
! get on to WPPRINT...

T.RTitleUserPersonal
Name
DateLines
2916.1You are not FORMATTINGIOSG::NEWLANDRichard Newland, IOSG, REO2-G/L2Fri Jun 25 1993 16:1219
The purpose of a Print Function is to FORMAT a revisable format file to
create a final-form file.  Your script is just copying the revisable
WPS-PLUS file to another WPS-PLUS output file.  

When Print to TERMINAL lists the output files it does so using the ALL-IN-1
text dataset mechanism.  Your Print function will create a .WPL file, 
which the text dataset mechanism will be process as a WPS-PLUS file. 

When you Print to FILE or other destinations your Print Function will 
create a WPS-PLUS file, which is not suitable to be printed or viewed by 
anything which is unable to process WPS-PLUS files.

See Chapter 21 of the ALL-IN-1 Application Programming Guide, and in
particular section 21.3.3, for information on how to add Print Function
scripts.


Richard

2916.2Got it now (or did I?)COPCLU::COPLE4::GLARGAARDAllan Glargaard, DS @DMOFri Jun 25 1993 19:118
  Richard, I read the 21.3.3 section a lot of times, but missed the
  point you made.

  If I make #PRINT_OUTFILE = "OAUSER:T.LIS" and #PRINT_DSAB = "TEXT"
  instead I get much better results from my MINI.SCP

  Hope I understand it better now ? :-)

2916.3You've nearly got itIOSG::NEWLANDRichard Newland, IOSG, REO2-G/L2Fri Jun 25 1993 19:4917
Your new script will work better because the COPY from .WPL to .LIS will
convert the WPS-PLUS file to an ASCII file, and ASCII files can be printed
or viewed. 

It should not be necessary to set #PRINT_DSAB in your script.  The input
symbols listed in table 21-6 are set-up by WPPRINT before it calls the
print function.  The #PRINT_DSAB symbol will be set from the file cabinet
attributes for the document. 

You have commented out a line in your script which invokes CONV/DOCU from 
DCL.  If you are intending to use CDA conversions you could use the 
ALL-IN-1 CDA_CONVERT function instead, which will be more efficient because 
it does not require performing operations in the sub-process.


Richard

2916.4I think this is missing functionality ...COPCLU::RUNERune Gottschalk @DMOMon Jun 28 1993 13:4828
  Hi Ricard and Allan,
  
  I have done some testings on this in a customer project. We had a job 
  integrating a converter to handle MS-WORD documents from ALL-IN-1 (read, 
  print etc.).
  
  We found out, after having read the ALL-IN-1 documentation, that the print 
  function didn't act as we expected. We thought that it was possible to 
  create a simple script for converting an MS-WORD document to WPS-PLUS and 
  then call it as a print function - exactly as you did, Allan.
  
  We did the exact same observations and we sure expected WPPRINT to handle 
  the WPS-PLUS document for us. Actually we tried to do the formatting in our 
  script but then again, we didn't know what to format the document for 
  (PostScript, LN03, HP ...). Our customer didn't accept an ASCII output.
  
  Our workaround was to format the document before calling WPPRINT with 
  #PRINT_DSAB and #PRINT_FILE. We then had to change all document print 
  functions (Named data to WP, EM ...) to test for the MS-Word format and if 
  found, call a special print function. Our customer was not happy about this 
  because they run a standard ALL-IN-1 IOS system with only very few 
  customizations. Now they got additional 6 or 8 i think  ...
  
  My conclusion was that this was a bug or lack of functionality in ALL-IN-1 
  V3. I think this was possible in V2.4 ...
  
  Rune
  
2916.5Print functions did not changeIOSG::NEWLANDRichard Newland, IOSG, REO2-G/L2Mon Jun 28 1993 20:1510
The functionality of Print Functions did not change from V2.4 to V3.0, and 
anything that could be done in V2.4 can be done in V3.0.

What converter are you using to handle MS-WORD documents?  Is this 
converter able to perform formatting, or is this why you have to convert an 
MS-WORD document to WPS-PLUS in order to format it?


Richard

2916.6I Used the DES ConverterCOPCLU::COPRUG::RUNERune Gottschalk @DMOFri Jul 02 1993 11:395
I used the DES converter (Document Exchange System) developed by a compagny 
called Software Compatibility Centre Limited in UK. The DES converter can 
convert between MS-Word for Windows and DX. It really does a good job !

Rune
2916.7Missing symbolsIOSG::NEWLANDRichard Newland, IOSG, REO2-G/L2Mon Jul 05 1993 23:5025
The list of available symbols for Format Scripts as documented in the
Application Prgramming Guide and in comments in WPPRINT.SCP is incomplete,
and should include: 

    #PRINT_FINAL_FORM	the type of final form file to create

    #PRINT_DEVICE_TYPE	the device type value if the WPS-PLUS formatter
    			is being used


Therefore, a Format Script (or Print function) could do the following:

    o	use DES to convert from MS-Word to a temporary DX file

    o	use the WPS-PLUS Formatter to format the DX file to a final-form
	file in the format specified in #PRINT_DEVICE_TYPE

    o	delete the temporary DX file


and it should not be necessary to change any named data.


Richard