You are viewing limited content. For full access, please sign in.

Question

Question

Print from Workflow - Has anyone tried this

asked on September 15, 2015

Has anyone ever printed a Laserfiche document within a workflow to a print driver installed on the workflow server.

0 0

Replies

replied on September 15, 2015

You might get this to work, but be aware that printing from a service context is generally unsupported by Windows applications.

0 0
replied on September 17, 2015

This should get you started:

http://www.print-conductor.com/

 

It's easy to use - it essentially monitors a folder and prints any documents that come in. And it's a very inexpensive license. 

 

You just need to automate the export of either a tiff or PDF to that folder. 

 

 

0 0
replied on September 18, 2018

Hi all,

 

This is my script to print a Windows' file using Workflow.

You must to install Foxit Reader in your server First.

namespace WorkflowActivity.Scripting.Print
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.SqlClient;
    using System.Text;
    using Laserfiche.RepositoryAccess;
    using System.Diagnostics;

    //Pour impression
    using System.IO;

    /// <summary>
    /// Offre une ou plusieurs méthodes qui peuvent être exécutées au moment de l'exécution de l'activité de scriptage du flux de travail.
    /// </summary>
    public class Script1 : RAScriptClass102
    {
        /// <summary>
        /// Cette méthode est exécutée quand l'activité est effectuée.
        /// </summary>
        protected override void Execute()
        {
            // Rédigez votre code ici. La propriété BoundEntryInfo accèdera à l'entrée, RASession obtiendra la section de Repository Access
            Process process = new Process();
    process.StartInfo.FileName = "C:\\Program Files (x86)\\Foxit Software\\Foxit Reader\\Foxit Reader.exe";
    process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
    process.StartInfo.Arguments = string.Format("-p \"C:\\ForPrint\\File.pdf\" \"gdn02ptr006\"");
    process.Start();
    process.WaitForExit();


            //DEBUT Suppression du fichier imprimé
            if(File.Exists(@"C:\ForPrint\File.pdf"))
                {
                    File.Delete(@"C:\ForPrint\File.pdf");
                }
            //FIN Suppression du fichier imprimé

        }
    }
}

So :

1. : you must to export your file from Laserfiche to Windows (you should write the same name and path used in the script), then

2. : run the script. At the end of the print, the file will be destroyed.

 

Hope this could help.

Regards

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.