Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print to TIFF
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Titre:
Versions des environnements
OS:
Windows Server 2003
Database:
MS SQL Server
Divers
Thread ID:
01534868
Message ID:
01535554
Vues:
51
J'aime (2)
>We need to print multiple reports silently to a tiff in a specified location on the network.
>MODI: Cannot find a way to make it go to file silently (without asking for location)
>
>VFP Report Listener: It outputs to 100 dpi and the output is not acceptable at this setting. Cannot figure out how to change that.
>
>XFRX: Using demo prints nicely but the file is huge and too slow on our production mapped drive. We can change the dpi but the bit depth setting doesn't affect anything which we believe should allow us to along with dpi control file size. Have E Mailed eques no response yet.
>
>FRX2any: Can't see a way to control any thing that might affect file size.
>
>Any suggestions would be appreciated.

XFRX never responded to any E Mails.
FRX2Any responded with some work on fixes but we needed a solution last week so we continued with Modi


We finally solved all of our problems using modi. Here is the code below we came up with:
    DECLARE INTEGER GetDefaultPrinter IN winspool.drv;
       STRING  @ pszBuffer,;
       INTEGER @ pcchBuffer

    DECLARE INTEGER SetDefaultPrinter IN winspool.drv;
       STRING pszPrinter

     *---------------------------------------------------------------
      *-- Set Default Windows Printer to MODI
      *---------------------------------------------------------------
      nBufsize = 250
      cPrinter = REPLICATE(Chr(0), nBufsize)
      = GetDefaultPrinter(@cPrinter, @nBufsize)
      cOldPrinter = SUBSTR(cPrinter, 1, AT(Chr(0),cPrinter)-1)
      = SetDefaultPrinter("Microsoft Office Document Image Writer")
 
      *---------------------------------------------------------------
      *-- Set OpenInMODI reg value to 0
      *---------------------------------------------------------------
      oShell = CREATEOBJECT("wscript.shell")
      nOldOpenInMODI = 0
      TRY 
         nOldOpenInMODI = oShell.RegRead("HKCU\Software\Microsoft\Office\12.0\MODI\MDI writer\OpenInMODI")
      CATCH 
      ENDTRY 
      oShell.RegWrite("HKCU\Software\Microsoft\Office\12.0\MODI\MDI writer\OpenInMODI", 0, "REG_DWORD")
     
      *---------------------------------------------------------------
      *-- Save the SOA reports to the specified destionation folder
      *---------------------------------------------------------------       
      IF lPrintDet
         SELECT csNonCovList1
         REPORT FORM 'Non_Det' TO FILE (cFileNameDet + cExt)
      ENDIF
            
      IF lPrintSumm
         SELECT csNonCovList2
         REPORT FORM 'Non_Summ' TO FILE (cFileNameSum + cExt)
      ENDIF 

      *---------------------------------------------------------------
      *-- Set OpenInMODI reg value back to what it initially was
      *---------------------------------------------------------------
      oShell.RegWrite("HKCU\Software\Microsoft\Office\12.0\MODI\MDI writer\OpenInMODI", nOldOpenInMODI, "REG_DWORD")
                  
      *---------------------------------------------------------------
      *-- Set Default Windows Printer back to what it initially was
      *---------------------------------------------------------------            
      = SetDefaultPrinter(cOldPrinter)
What ben makes tracks for what wil be. Words in the air pirnt foot steps on the groun for us to put our feet in to.

Riddley Walker
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform