cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Reclaiming Print Composer license during Editor session

DavidS.Taylor
1-Newbie

Reclaiming Print Composer license during Editor session



We’re moving to Arbortext Editor 5.2 (Editor) and want
to use Print Composer (PC) to create Postscript output. The platforms are
a mix of Solaris and Windows XP systems.








Our users (authors, editors and translators) will be ‘editing’
85-90% of the time and occasionally generating Postscript output of the file
they’re working on.








Editor and Print Composer have separate licenses and here is
the situation I’m trying to deal with…








We’re using concurrent licenses and when an Editor
session is started it takes a license from the pool. No problem.
However, if the user then composes their document, a PC license is also taken
from the pool. This PC license is attached to the edit session and will
not be returned until the edit session is closed, even if the composition processing
only takes one or two minutes. This prevents efficient sharing of the PC
license even though the usage of the PC license is only for a small percentage
of the usage time of the Editor license.








I’ve looked through the documentation for environment
variables and the resourceinfo file that sits in the license directory. I
don’t see a way to have the PC license returned separately once a
composition process has finished.








Has anyone done this before? Does anyone have any
suggestions on how to do this?








David







David S. Taylor







Project Manager, Structured
Information




Institute for Research in
Construction




National Research Council Canada



Bldg. M-23A, Room 239



<span<br/> lang=EN-CA style='font-size:8.0pt;font-family:"MS Sans Serif">1200 Montreal
Road
<span<br/> lang=EN-CA style='font-size:8.0pt;font-family:"MS Sans Serif">, Ottawa, ON
K1A 0R6
<font<br/>size=1 face="MS Sans Serif">







Tel: +1.613.990.2731



Fax: +1.613.952.4040



Email: David.S.Taylor@nrc-cnrc.gc.ca



Web: <a<br/>href="about:blankwww.irc.nrc-cnrc.gc.ca">www.irc.nrc-cnrc.gc.ca







5 REPLIES 5

Hello David



look to the acl function license_release.



This works in the command line or from a acl script.



I have made a menue, were the authors can release the pc license:



the line creating the menu entry to release the print composer:



menu_add .TANNER. "Release Print Composer" -cmd
license_release("PrintPublishing");



Jürgen

Hi David--


To make it even more transparent, you can use the print
complete hook in conjunction with license_release() to return the license as
soon as printing is complete:


# define function to return composer license
function
returnlicense() {
$result =
license_release("PrintPublishing");
}


# set hook to return PC license when done
printing
add_hook(printcompletehook,returnlicense);

There is one caveat with this: the print complete
hook doesn't get called if there is an error during printing. In that case,
you'd need to either close your Epic session or invoke license_release() in some
other way (via the menus as Jürgen recommends or from command
line). But in most circumstances this should work
fine.


class=596523521-21112006>
--Clay






From: Jürgen Schnurr

Sent: Tuesday, November 21, 2006



Thank-you Jürgen and Clay.  This is just
what I needed.







It's been one of those days…







Cheers,







David
















From:Sent: November 21, 2006 16:42

To: adepters@arbortext.com

Subject: RE: Reclaiming Print
Composer license during Editor session









Hi David--







To make it even more transparent, you can
use the print complete hook in conjunction with license_release() to return the
license as soon as printing is complete:





# define function to return composer
license

function returnlicense() {

$result = license_release("PrintPublishing");

}











# set hook to return PC license when done
printing

add_hook(printcompletehook,returnlicense);





There is one caveat with this: the print
complete hook doesn't get called if there is an error during printing. In that
case, you'd need to either close your Epic session or invoke license_release()
in some other way (via the menus as Jürgen
recommends or from command line). But in most circumstances this should work
fine.









--Clay
















<span<br/>style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:<font<br/>size=2 face=Tahoma>Sent: Tuesday, November 21, 2006
3:33 PM

To: adepters@arbortext.com

Subject: Re: Reclaiming Print
Composer license during Editor session



Hello David



look to the acl function license_release.



This works in the command line or from a acl script.



I have made a menue, were the authors can release the pc license:



the line creating the menu entry to release the print composer:



menu_add .TANNER. "Release Print Composer" -cmd
license_release("PrintPublishing");









<span<br/> style='font-size:10.0pt'>Germany<font<br/>size=2 face="Courier New"> <font<br/>size=2 face="Courier New"><font<br/>size=2 face="Courier New">





Taylor, David
S. wrote:






<font<br/>size=2 face=Arial>Our users
(authors, editors and translators) will be 'editing' 85-90% of the
time and occasionally generating Postscript output of the file they're
working on.




<font<br/>size=3 face="Times New Roman">Editor and
Print Composer have separate licenses and here is the situation I'm
trying to deal with…




<font<br/>size=3 face="Times New Roman">We're
using concurrent licenses and when an Editor session is started it takes a
license from the pool. No problem. However, if the user then
composes their document, a PC license is also taken from the pool. This
PC license is attached to the edit session and will not be returned until the
edit session is closed, even if the composition processing only takes one or two
minutes. This prevents efficient sharing of the PC license even though
the usage of the PC license is only for a small percentage of the usage time of
the Editor license.




<font<br/>size=3 face="Times New Roman">I've
looked through the documentation for environment variables and the resourceinfo
file that sits in the license directory. I don't see a way to have
the PC license returned separately once a composition process has finished.




<font<br/>size=3 face="Times New Roman">Has anyone
done this before? Does anyone have any suggestions on how to do this?




<font<br/>size=3 face="Times New Roman">David



<font<br/>size=3 face="Times New Roman">



<font<br/>size=3 face="Times New Roman">



<font<br/>size=1 face="MS Sans Serif">Institute for Research in Construction



<font<br/>size=1 face="MS Sans Serif">National Research Council

To cover Clay's possible print error, one of the things you could add to
your script would be an method to invoke either format stop or format quit
(see help 9052 for both). Then release your print license.

I have seen cases where a print function will lock up and then not allow
you to start a new print job. Restarting Epic is avoided using the format
quit command. It just closes the print function down.

Actually thinking of this in a concurrent license mode, I wonder if the
print license release would work if the print composer is still running in
the background (doing nothing except eating system resources)? But this
is only in the case of a print error. I am not sure of the command, but I
am sure you can evaluate whether the print function is working with the
'option' function (see help 928) and go from there.

Lynn

Hi Lynn--

Thanks for the clarification. My implementation of returnlicense() is admittedly pretty brain-dead. The license_release() function returns a status value to tell you if it was successful or not, so you could test that, something along these lines:

# untested code, debugging is left as an exercise for the reader
function smarterreturnlicense() {
$result = license_release("PrintPublishing");
if ($result != 1) {
# it didn't work, stop formatting and try again
format quit;
$result = license_release("PrintPublishing");
if ($result != 1) {
# still didn't work; report error
message "Couldn't return concurrent print license to license server: " . $ERROR;
}
}
}

Of course, you'd still have to invoke this manually in the case of a print error, because it still wouldn't invoke the print complete hook. But it would be easy enough to hang this off a menu item, so the user wouldn't have to worry about doing a "format quit" command before returning the license to the server.

--Clay
Announcements