With an application using Layout Utilities, speed in first printing is made faster.


Try it in two ways below.
Note that the ways may not be effective depending on the environment of your computer.

Plan 1.
Delete a printer you have not used with your PC.
Fewer installed printers can make processing time shorten.

Windows 7
  "Start" -> "Devices and Printers" -> Right-click the printer ->  "Remove device" -> "Yes"

Windows XP
  "Start" -> "Faxes and Printers" -> Right-click the printer ->  "Delete" -> "Yes"

Plan 2.

Call "BeforePrintAppStart()" to read beforehand a library or CLF layout file prepared by an application.

--[C#]--
    [System.Runtime.InteropServices.DllImport("kernel32", CharSet =

System.Runtime.InteropServices.CharSet.Unicode, SetLastError = true)]
    extern static IntPtr LoadLibrary(string lpLibFileName);

    [System.Runtime.InteropServices.DllImport("kernel32", SetLastError = true)]
    extern static bool FreeLibrary(IntPtr hLibModule);

    private IntPtr[] pDLLs;
    private string[] libs = {
                        "AxInterop.QRMAKERADLib.dll",
                        "Citizen.LayoutUtilities.Common.dll",
                        "Citizen.LayoutUtilities.Printing.dll",
                        "GrapeSystems.Core.Common.dll",
                        "GrapeSystems.Core.Drawing.Fx20.dll",
                        "GrapeSystems.Core.Parts.dll",
                        "GrapeSystems.Core.Parts.Frames.dll",
                        "GrapeSystems.Library.BarcodeAd.dll",
                        "GrapeSystems.Library.Controls.dll",
                        "GrapeSystems.Library.Image.dll",
                        "Interop.QRMAKERADLib.dll",
                        "System.Drawing.dll",
                    };

    // Instance of LayoutPrintEngine
    private Citizen.LayoutUtilities.Printing.Controller clpc;

    // CLF file password
    private const string CLF_FILE_PATH = "Layout1.CLF";

    /// <summary>
    /// Before the processing of printing application
    /// </summary>
    private void BeforePrintAppStart()
    {
        //
        loadLibrarys();
        //
        loadClfFile(CLF_FILE_PATH);
    }

    /// <summary>
    /// After the processing of printing application
    /// </summary>
    private void AfterPrintAppExit()
    {
        //
        freeLibrarys();
    }

    /// <summary>
    /// load related library
    /// </summary>
    private int loadLibrarys()
    {
        int count = 0;

        if (libs == null) return count;

        pDLLs = new IntPtr[libs.Length];

        int index = 0;
        foreach (string lib in libs)
        {
            IntPtr ptr = pDLLs[index++] = LoadLibrary(lib);
            if (ptr != IntPtr.Zero)
            {
                count++;
            }
        }
        return count;
    }

    /// <summary>
    /// Release a related library
    /// </summary>
    private int freeLibrarys()
    {
        int count = 0;

        if (pDLLs == null) return count;

        int index = 0;
        foreach (IntPtr ptr in pDLLs)
        {
            if (ptr != IntPtr.Zero)
            {
                FreeLibrary(ptr);
                pDLLs[index] = IntPtr.Zero;
                count++;
            }
            index++;
        }
        return count;
    }

    /// <summary>
    /// CLF file dammy load
    /// </summary>
    private int loadClfFile(string clfFile)
    {
        int result = -1;

        if (clpc == null)
        {
            clpc = new Citizen.LayoutUtilities.Printing.Controller();
        }

        result = clpc.Open(clfFile);
        if (result == 0)
        {
            clpc.BeginPrint();
            clpc.EndPrint();
            clpc.Close();
        }

        return result;
    }
--[C#]--

You cannot comment on this entry