Good morning,
I'm writing a script in workflow to export a Tiff file as a PDF in my computer. We are able to export the tiff, however we can't convert it. We looked for related questions here and found some examples where the programmers use the method ExportPdf of a DocumentExporter object. However we are having problems with its parameters, this example was taken from a old thread:
ExportDoc.ExportPdf(MyDocument,MyDocument.AllPages, PdfExportOptions.None, "C:\TestData\" + EntryName + ".pdf")
One of our problems is that we don't have the property "AllPages".
Could someone please help us with a sample code where we can see how this script should be, if possible with the references. I'm sorry for asking this much but we are literally running out of time and it's critical.
Below is our script:
namespace WorkflowActivity.Scripting.SecuenciadeComandosSDK { using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Text; using Laserfiche.RepositoryAccess; // using DocumentProcessor90; using LFSO90Lib; //using DocumentProcessor92; using Laserfiche.DocumentServices; /// <summary> /// Proporciona uno o más métodos que se pueden ejecutar al ejecutarse la actividad de secuencias de comando de flujo de trabajo. /// </summary> public class Secuenciadecomandosde1 : RAScriptClass92 { /// <summary> /// Este método se ejecuta cuando se ejecuta la actividad. /// </summary> protected override void Execute() { LFApplication app = new LFApplication(); LFServer serv = (LFServer)app.GetServerByName("LOCALHOST"); LFDatabase db = (LFDatabase)serv.GetDatabaseByName("Lasefiche"); //LFDatabase db = (LFDatabase)serv.GetDatabaseByName("Lasefiche"); LFConnection conn = new LFConnection(); conn.UserName = "admin"; conn.Password = "123"; conn.Create(db); //IDocumentContents doc = (IDocumentContents)db.GetEntryByID(4); LFDocument doc = (LFDocument)db.GetEntryByID(4); LFDocumentPages pages = (LFDocumentPages)doc.Pages; //pages.MarkPageByIndex(1); //DocumentExporter docuExport = new DocumentExporter(); DocumentExporter docuExport = new DocumentExporter(); docuExport.ExportPdf(doc, doc.Pages, PdfExportOptions.None, "C:\\Ricardo\\doc.pdf"); //docuExport.ExportPdf(doc, pages, PdfExportOptions.None,@"C:\Ricardo\doc.pdf");*/ /* codigo que borre */ // DocumentInfo docInfo = Document.GetDocumentInfo() doc.Dispose(); } } }
Thanks!!!