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

Question

Question

Laserfiche Workflow

asked on September 29, 2014

I want to read the contents from a pdf file inside the script editor in workflow. The pdf is in the repository. I tried using find entry to find the entry and then use that token in the script. It does not work. Please provide me a sample.

 

Thanks

Priya

0 0

Replies

replied on September 30, 2014

You're more likely to get help faster if you start out by posting your code and explaining where you're having issues. It's not clear if you're just trying to export the PDF. The following snippet of code will export the PDF associated with entry ID 25753 as Doc1.PDF to C:\temp.

 

            Laserfiche.DocumentServices.DocumentExporter DocEx = new Laserfiche.DocumentServices.DocumentExporter();
            // Sets SourceDocument property.
            DocumentInfo DI = Document.GetDocumentInfo(25753, RASession);
            // Exports electronic document.
            DocEx.ExportElecDoc(DI, "C:\\temp\\Doc1.pdf");

 

1 0
replied on September 30, 2014

This is the code I use to read pdf file from repository in the script editor. When I run this workflow, why does it ask for authentication? I am already logged in at the LF server.

 

          string docName = ((string)GetTokenValue("FindEntry_OutputEntry_FullPath")) + ".pdf";
          FileStream fileStream = File.OpenRead(docName);
          SetTokenValue("Test",fileStream.Length);

 

0 0
replied on September 30, 2014

FindEntry_OutputEntry_FullPath is the path of the document in Laserfiche, not on disk. FileStream requires a file on disk.

Which line asks you for authentication?

 

What are you actually trying to do?

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

Sign in to reply to this post.