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

Question

Question

Export Workflow creates PDF with no text elements??

asked on December 18, 2019

I need some clarification on how Laserfiche exports Tiff's as PDF's. When I take my Tiff that has 20 pages and drag and drop to my desktop, the PDF that is created is exactly what I want. You can highlight the text which is what I need since I'm sending this to DocuSign and using Auto-place. 

I have a Workflow that can export Tiff's as PDF's and it works, however, the resulting PDF does not have the text elements. I can NOT select the text which then breaks the DocuSign Auto-Place feature. 

DocuSign must use the text in a PDF instead of OCRing the document. 

Why would my drag and drop from the client work but not the WF?

Here are my setting from the client 10.4,

Here is the script from my workflow,

 

    using System;
    using System.IO;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.SqlClient;
    using System.Text;
    using Laserfiche.RepositoryAccess;
    using Laserfiche.DocumentServices;

    /// <summary>
    /// Provides one or more methods that can be run when the workflow scripting activity is performed.
    /// </summary>
    public class Script1 : RAScriptClass102
    {
        string DocExt;
        string DocName;
        string ExportPath;
        string FullExportPath;




            ///
        /// </summary>
        protected override void Execute()
        {
            DocumentInfo DI = Document.GetDocumentInfo(BoundEntryId, RASession);
            DocName = GetTokenValue("Entry ID").ToString();
            ExportPath = "C:\\LF Export For WindBid\\".ToString() ;
            DocExt = GetTokenValue("FindEntry_OutputEntry_Extension").ToString();
            if (Directory.Exists(ExportPath)== false)
            {
                Directory.CreateDirectory(ExportPath);
            }

            if (GetTokenValue("FindEntry_OutputEntry_HasImage").ToString() == "True")
            {
                DocumentExporter IE = new DocumentExporter();
                PageRange Range = new PageRange(GetTokenValue("FindEntry_OutputEntry_PageCount").ToString());
                PageSet Set = new PageSet(Range);
                IE.IncludeAnnotations = true;
                DocExt = "PDF";
                FullExportPath = ExportPath + "\\" + DocName + "." + DocExt;
                IE.ExportPdf(Document.GetDocumentInfo(BoundEntryId, RASession), DI.AllPages, PdfExportOptions.PdfAConformance, FullExportPath);
            }
            else
            {
             DocumentExporter EDE = new DocumentExporter ();
            FullExportPath = ExportPath + "\\" + DocName + "." + DI.Extension;
            EDE.ExportElecDoc(DI, FullExportPath);

            }



            }
        }

Since the PDF's are so huge, I uploaded them to my Gdrive and here are the links.

First one is the export from the client

https://drive.google.com/file/d/1piIm4rLh-EV1ZxwjIK7BYyxLrZ-dGg4O/view?usp=sharing

Second one is from the WF. 

https://drive.google.com/file/d/1v2FHLT7hn46UsmC6pbJtneCebk2nimp4/view?usp=sharing

Thank you!

0 0

Answer

SELECTED ANSWER
replied on December 18, 2019 Show version history

Text is not included by default and needs to be specified as part of the PdfExportOptions.

Instead of setting the value directly in the .ExportPdf method, I set them as a separate variable.

To include multiple settings (text, PDF/A conformance, etc.) separate each with a pipe character.

For example,

// Set PDF export options to flatten annotations and include searchable text
PdfExportOptions ExportOptions = PdfExportOptions.PdfAConformance | PdfExportOptions.RenderAnnotationsAsImage | PdfExportOptions.IncludeText;

// Export PDF
dExp.ExportPdf(doc, doc.AllPages, ExportOptions, exportPath);

 

6 0
replied on December 18, 2019

Thanks Jason, 

After I posted this, I found the include text option. Classic case of figuring out my own problem after asking for help! lol. 

0 0
replied on December 18, 2019

No worries, I do that all the time lol. The part that usually trips people up at first is how to include multiple export options.

0 0

Replies

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

Sign in to reply to this post.