<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT face=Tahoma size=2>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Boaz Bezborodko <boaz@mirrotek.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> filepro-list@lists.celestial.com<BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> Richard Hane <yoresoft@sbcglobal.net><BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Fri, November 6, 2009 10:17:34 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: Filepro-list Digest, Vol 70, Issue 3<BR></FONT><BR>
<BLOCKQUOTE type="cite"><PRE><DIV class=moz-txt-sig>From: Kenneth Brody <A class=moz-txt-link-rfc2396E href="mailto:kenbrody@spamcop.net" target=_blank rel=nofollow ymailto="mailto:kenbrody@spamcop.net"><kenbrody@spamcop.net></A>
To: Richard Hane <A class=moz-txt-link-rfc2396E href="mailto:yoresoft@sbcglobal.net" target=_blank rel=nofollow ymailto="mailto:yoresoft@sbcglobal.net"><yoresoft@sbcglobal.net></A>
Cc: <A class=moz-txt-link-abbreviated href="mailto:filepro-list@lists.celestial.com" target=_blank rel=nofollow ymailto="mailto:filepro-list@lists.celestial.com">filepro-list@lists.celestial.com</A>; Rick Hane <A class=moz-txt-link-rfc2396E href="mailto:rhane@deluxestitcher.com" target=_blank rel=nofollow ymailto="mailto:rhane@deluxestitcher.com"><rhane@deluxestitcher.com></A>
Sent: Thu, November 5, 2009 10:40:47 AM
Subject: Re: Print Wizard from -pq option
Richard Hane wrote:
</DIV></PRE>
<BLOCKQUOTE type="cite"><PRE><SPAN class=moz-txt-citetags>> </SPAN>System: fpODBC ver 5.0.15 , Windows 2003 network
<SPAN class=moz-txt-citetags>> </SPAN>
<SPAN class=moz-txt-citetags>> </SPAN>I have several forms that we regulaly print as a pdf via print wizard.? That works fine.
<SPAN class=moz-txt-citetags>> </SPAN>
<SPAN class=moz-txt-citetags>> </SPAN>However, I would like to give my users the option to do this on all forms and some reports as a regular option.? To do the above we have to use a batch file in addition to the printer definition.? Is there a way to do this with out a batch file?? IN short they could pick the pdf option as and other printer using the -pq flag.
</PRE></BLOCKQUOTE><PRE>Can you describe how, exactly, you "use a batch file in addition to the printer definition" to currently do the conversion?
What is the printer definition (specifically, the type and destination), and what is in the batch file?
-- Kenneth Brody
Morning Ken,
here is the printer definition and batch file.
Print Def....
printer12: rickpdf, printwiz, u:\pdfquote\quote.txt, Create PDF
Note: 'u' is a mapped dirve on all workstations as the users my documents file located on the main server.
and below 'v' is a mapped dirve on all workstations to the fpodbc folder?located on the main server.
Repair.bat file
@echo off
rem This File created by Rick Hane on 8-7-2009
set PATH=C:\WINDOWS\COMMAND
set PFDSK=V
set PFDATA=V:
set PFPROG=V:
set PFDIR=
set PFLMHOST=server2007
set PFMENU=V:\fp\menus\rick
set PFGLOB=
set PFCONFIG=
set pfpostprint=c:\program files\printwiz30\printwiz /fpDF://u:\pdfquote\quote.pdf /quiet
set PATH=%pfprog%;%PFPROG%\fp;%path%
echo stuff > fp$$$$$$.bat
del fp$$*.bat>NUL
%pfprog%\fp\p repair
Thanks
Rick</PRE></BLOCKQUOTE>Rick,<BR><BR>It seems to me that there are a few potential problems with your setup especially as you increase the number of users. First, you put all the output to the same file. If more than one person decides to print to a .pdf then you can have a conflict or force one to wait. Second, you require that each PC have a copy of PrintWiz installed in order to handle the .pdf.<BR><BR>I give people an option in some reports that requires me to put some lines of code into processing, but the code is portable from one program to another. <BR><BR>In the select processing I have:<BR>::DECLARE GLOBAL PrintSelPos(1,.0,g) 'Set 'Shipping' as the default:<BR>::DECLARE GLOBAL PrintFileOpt(1,yesno,g) 'Allow printing to file as an option:<BR>::DECLARE GLOBAL PrintToPDF(1,yesno,g) 'Pass whether PDF option was chosen:<BR>::DECLARE GLOBAL PrintFileName(25,*,g) 'Set the file name
prefix:<BR>::PrintSelPos ="1": 'Which is the default selection to be displayed<BR>::PrintFileOpt="Y": 'Some printouts should not be given the option of printing to a file<BR>::ab(6,mdy)=rd: 'Change for each report to an appropriate reference number (inv#,PO#, etc.)<BR>::PrintFileName="OpenAPCutOff-"&ab&"-": 'Change as needed for each report<BR>::CALL NOAUTO "H\fpro\filepro\invno\printsel":<BR>:PrintFileOpt eq "N" and PrintToPDF eq "Y":EXIT 'BRKY was pressed:<BR><BR>This is the "printsel" table:<BR>::DECLARE EXTERN PrintSelPos 'Should be defined as (1,.0):<BR>::DECLARE EXTERN PrintFileOpt ' Should be defined as (1,yesno):<BR>::DECLARE EXTERN PrintToPDF ' Should be defined as (1,yesno):<BR>::DECLARE EXTERN PrintFileName ' Should be defined as (25,*) - used for filename prefix:<BR>::DIM prnter[10](20,*):<BR>::prnter("2")="SHIPPING" ;
prnter("1")="OFFICE" ; prnter("3")="PDF-FILE":<BR>::DECLARE flname(63,*):<BR>:'Set filename for printer file name with username-date-time:aa(8,yymd)=@td ; ab(5,*)=GETENV("USERNAME"):<BR>:'Set filename for printer file name with username-date-time:flname="f/fpro/temp/"&ab{PrintFileName{aa:<BR>::CLS("21","4"):<BR>::SHOW "\r What printer should be used? \r":<BR>LIST:PrintFileOpt eq "Y":pr=LISTBOX(prnter,"1","3","20","56","","",PrintSelPos):<BR>:PrintFileOpt eq "N" or PrintFileOpt eq "":pr(1,*)=LISTBOX(prnter,"1","2","20","56","","",PrintSelPos):<BR>:@sk="SAVE":GOTO LIST:<BR>:@sk="BRKY" ' Signal that the BRKY was hit with an impossible:PrintFileOpt="N" ; PrintToPDF="Y" ; END 'combination.:<BR>::SHOW "":<BR>:pr eq "1" or pr eq "2":PRINTER NAME prnter(pr) ; END:<BR>:pr eq "3":PRINTER FILE flname{".txt" ; PrintToPDF="Y":<BR>::SHOW ("24","7") "FILE WILL BE
"&flname{".pdf":<BR>::END:<BR><BR><BR>The following is put at the end of report processing:<BR>@DONE::DECLARE EXTERN PrintToPDF:<BR>::DECLARE EXTERN PrintFileName:<BR>:PrintToPDF ne "Y":END:<BR>::CALL NOAUTO "H\fpro\filepro\invno\topdf":<BR>::END:<BR><BR><BR>This is the "topdf" processing table.<BR>::DECLARE EXTERN PrintFileName ' Should be defined as (25,*):<BR>::DECLARE flname(63,*) ; DECLARE flname2(55,*):<BR>::aa(8,yymd)=@td ; ab(5,*)=GETENV("USERNAME"):<BR>::flname="f\fpro\temp\ "{ab{PrintFileName{aa:<BR>::ad=flname{".txt":<BR>::ae=("!PDF /f\\mirrotek-server\data\fpro\temp\ "{ab{PrintFileName{aa{".pdf"):<BR>::af=("f\fpro\temp\temp"&ab{PrintFileName{aa{".txt"):<BR>::lookup ref = invno r=("1") -ep:<BR>::ai(30,*)="temp"{ref(168)&".pdf" ; ref(168)=ref(168)+"1" ; CLOSE ref:<BR>::EXPORT ASCII pdf = (af) R=\n:<BR>::pdf(1) = ae:<BR>::CLOSE pdf:<BR>::SYSTEM "TYPE "&ad&" >> "&af:<BR>::SYSTEM "ECHO !PDF
/f\\mirrotek-server\data\fpro\temp\ "{ai&" >> "&af:<BR>::SYSTEM "COPY "&af&" \\mirrotek-server\pw1":<BR>WAITLP:EXISTS("f\fpro\temp\ "{ai) eq "0" and zz lt "60000":SLEEP "500" ; zz(6,.0)=zz+"500" ; GOTO WAITLP:<BR>:zz ge "60000":SHOW "@TIMEOUT ERROR! PLEASE RETRY OR CALL AN ADMINISTRATOR" ; EXIT:<BR>::SYSTEM "START "&flname{".pdf > "&flname{".err 2>&1":<BR>::SYSTEM "ERASE "&ad:<BR>::SYSTEM "ERASE "&af:<BR>::SYSTEM "ERASE f\fpro\temp\ "{ai:<BR>::SYSTEM "ERASE "&flname{".err":<BR>::END:<BR><BR>This uses any Printwiz Server and keeps separate filenames per user and per document. Not completely fine-grain enough as it will error out if the same user prints out the same document while a previous version is still open on the screen. I could probably fix that by adding the time to the document name.<BR><BR>It creates a temporary pdf file at the end of the process to create a file for which it
can check if Printwiz has completed the pdf creation.<BR><BR>Aside from making a few changes you simply drop the lines you need into your processing where needed and it works.<BR><BR>I am open to any suggestions for improvements or easier ways to do the same thing.<BR><BR>Also, by printing all reports through Printwiz, I keep the printer definitions constant (Printwiz) no matter which printer it ctually gets printed to. I can change a printer to that of a different manufacturer and just change the drivers and Printwiz setup on the machine acting as the Printwiz server.<BR><BR>Boaz </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Boaz,</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Thanks for the reply. I see what you are doing but with hundreds of forms & reports and 16 users we are talking a lot of work.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">The initial premise of my question was to see if there was a way to do this without having to add or change all the processing. Possibly by just modifying the printer def. Obviously not. I have yet to find a pdf generator that can be called or pulled down like any windows printer can for filePro on a Windows system.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">BTW... I get around the file name problem by having a bat file that renames the pdf files by there control number and redirects the copy to the correct users document folder. I didn't mention that yesterday as I didn't think it made a differance.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Thank you,</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Rick Hane</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV></DIV><!-- cg8.c201.mail.mud.yahoo.com compressed/chunked Fri Oct 30 04:50:49 PDT 2009 --></div></body></html>