Exemplo n.º 1
0
        public InDesign.Document GetReportDocument(string templatePath)
        {
            InDesign.Application app =
                (InDesign.Application)COMCreateObject("InDesign.Application");

            // get a reference to the current active document
            return((InDesign.Document)app.Open(templatePath));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates the InDesign Application Class and sets the default web options
 /// (UTF-8, optimize for browser, etc.)
 /// </summary>
 private void CreateInDesignAppClass()
 {
     if (m_inDesignApp == null)
     {
         object obj = COMCreateObject(INDD_COM_STRING);
         m_inDesignApp = (InDesign.Application)obj;
         InitializeFontTable();
         m_log.Log("Create the " + INDD_COM_STRING + " successfully.");
     }
 }
Exemplo n.º 3
0
 public void CloseInDesignApp()
 {
     if (m_inDesignApp != null)
     {
         if (HasInDesignAppWindow())
         {
             m_inDesignApp.Quit(InDesign.idSaveOptions.idYes);
         }
         else
         {
             m_inDesignApp = null;
         }
     }
 }
        public void InitializeProvider()
        {
            var appType = Type.GetTypeFromProgID(InDesignProgId);

            application = appType != null ? (InDesign.Application)Activator.CreateInstance(appType) : null;
        }
Exemplo n.º 5
0
 public void ReopenInDesignApp()
 {
     m_inDesignApp = null;
     fontTable     = null;
     CreateInDesignAppClass();
 }