Uniface User Forum

 View Only
  Thread closed by the administrator, not accepting new replies.
  • 1.  Uniface 9: pdfcreator alternative

    ROCKETEER
    Posted 11-19-2018 11:39
    Edited by Daniel Iseli 07-08-2022 05:15
    No replies, thread closed.

    pdfcreator alternative

    Author: mps59@orange.fr (mpservices)

    Hi Im' using pdfcreator with the com interface, do you know alternatives products or ways to do the same need to generate without end-user interaction   Thanks Dominique



  • 2.  RE: Uniface 9: pdfcreator alternative

    ROCKETEER
    Posted 11-19-2018 11:39
    No replies, thread closed.

    Hi Dominique, We used gs (ghostscript)  and redmon (redirecction port) . If i remenber correctly : - install redmon . - install a pdf printer with driver ghostpdf.inf - Modify printer port to  RPT1:  - Configure RPT1 to run gs.exe: D:\gs\gs9.00\bin\gswin64c.exe @d:\gs\gs.ini -sOutputFile="%1" - - Configure Uniface to use this printer ....  Gilles.


    Author: Gilles (gls.tools@free.fr)


  • 3.  RE: Uniface 9: pdfcreator alternative

    ROCKETEER
    Posted 11-19-2018 11:39
    No replies, thread closed.

    Thanks Gilles worked ok when I put an output file direct into the port configuration   -sDEVICE=pdfwrite -r300 -dBATCH -dNOPAUSE -dSAFER -sPAPERSIZE=a4 -sOutputFile="testpdf.pdf" -c .setpdfwrite -f -   But using %1 as variable, how do you give this variable to the printer   Dominique


    Author: mpservices (mps59@orange.fr)


  • 4.  RE: Uniface 9: pdfcreator alternative

    ROCKETEER
    Posted 11-19-2018 11:39
    No replies, thread closed.

    Hi Dominique, we implement a similar solution using MultiFilePortMonitor instead of redmon. MultiFilePortMonitor con be found on SourceForge HERE. Regards, Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)


  • 5.  RE: Uniface 9: pdfcreator alternative

    ROCKETEER
    Posted 11-19-2018 11:39
    No replies, thread closed.

    Hi Dominique, Sorry , we have modify redmon to add one more option (Registry Value for Filename).  We put the name of the file in a registry value (HKCU) before printing and redmon read this registry value . Gilles.


    Author: Gilles (gls.tools@free.fr)


  • 6.  RE: Uniface 9: pdfcreator alternative

    ROCKETEER
    Posted 11-19-2018 11:39
    No replies, thread closed.

    Thanks to both of you is it possible to have an example of the code you are using ?   Dominique


    Author: mpservices (mps59@orange.fr)


  • 7.  RE: Uniface 9: pdfcreator alternative

    ROCKETEER
    Posted 11-19-2018 11:39
    No replies, thread closed.

    Hi Dominique, using MultiFilePortMonitor a long list of options is available to define output filename; for this reason different configurations can be used depending on various needs. The simplest one is: 1) MultiFilePortMonitor port config: define output filename as %t.pdf 2) Uniface basic code: call getDefaultPrinter(myActualDefaultPrinter) call getUniqueInstanceName("componentToBePrintedToPDF", myUniqueInstanceName) call setDefaultPrinter("GhostscriptPDF") ; GhostscriptPDF is the name of the installed ghostpdf printer using port configured with MultiFilePortMonitor newinstance "componentToBePrintedToPDF", myUniqueInstanceName activate myUniqueInstanceName.exec() ; print instruction in the exec trigger is generating myUniqueInstanceName.pdf in the configured folder call reuseGeneratedPdfFile(myUniqueInstanceName.pdf, actionToBeApplied, otherParams) call setDefaultPrinter(myActualDefaultPrinter) All $status/$procerror checks after each call instruction were obviously stripped out. This solution can be either implemented on each single PC or with a shared PDF server. Hope it helps. Regards, Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)