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

Question

Question

Downloading only PDFs without the txt files

asked on November 22, 2016

Is there away that i can download a folder from the laserfiche without downloading the .txt files and only the pdf files. I would also need to keep the file structure.

0 0

Replies

replied on November 22, 2016

This is not possible out of the box. The alternative is to do Download->Folder Contents, then in Windows Explorer search the local folder for *.* and delete the non-pdfs. Another alternative is to use a custom toolbar button, but that is somewhat advanced and involves the SDK.

What is your use case for this? We could look into adding this functionality in a future version.

0 0
replied on November 22, 2016

Hi Rob,

There are several use cases for this. In this particular case, the customer just wants to download the content files for backup purposes. They're using Laserfiche Cloud, so they don't have back-end access. Other use cases i've seen in the past is exporting a file/folder structure to share it with another party, in which case you don't need the text files or metadata.

2 0
replied on November 22, 2016

Thanks, I have heard this requested before. I created an enhancement request, we will look into adding this to a future version (request# TFS-17619).

1 0
replied on November 22, 2016

Great thank you Rob! Is there any way for us to track this request if/when it gets added to the roadmap or into a product version?

0 0
replied on November 22, 2016

We will update this post if/when it gets added.

1 0
replied on November 22, 2016

OK thank you!

0 0
replied on December 22, 2016

Is there any documentation or tutorial that could point me in the direction on how to get only PDF's using a custom button and the SDK?

0 0
replied on December 22, 2016

The CustomButtonManager project in the SDK (in ClientAutomation Samples.zip) contains code for adding custom buttons, although it might be easier to just add a button manually if you don't need large-scale deployment. The button command would be something like ExportDocuments.exe -hwnd %(hwnd) -entries %(SelectedEntries), it would use %(hwnd) to find the window it was clicked from and get the serialized connection, then it would use the %(SelectedEntries) to get the list of entry IDs. With the SDK you can export each document like this:

foreach (string entryId in entryIds.Split(',')) // entryIds comes from the %(SelectedEntries) command line token
{
    EntryInfo entry = Entry.GetEntryInfo(entryId, session);
    if (entry.EntryType == EntryType.Shortcut)
        entry = Entry.GetShortcutTarget(entry.Id, session);

    if (entry.EntryType == EntryType.Document)
    {
        DocumentInfo doc = (DocumentInfo)entry;

        String localFolder = @"c:\\output";
        String localFile = Path.Combine(localFolder, doc.Name); // Append .pdf if necessary

        string contentType;

        using (var tempStream = File.OpenWrite(localFile))
        using (LaserficheReadStream readStream = doc.ReadEdoc(out contentType))
        {
            readStream.CopyTo(tempStream);
        }
    }
}

See this presentation for more information. If you hit a roadblock, post here and I'll try to help.

1 0
replied on December 22, 2016

My man! Thank You! I will try this and report back if I have issues.

0 0
replied on July 12, 2017

Just wondering if there has been an update to this and if this is connected to zip files in anyway: when I email a zip file, both the original file and the .txt file is there.

0 0
replied on July 13, 2017

The original request has been released with the 10.2.1 web client (see the "Additional Features Added in Laserfiche 10.2.1" section in the release notes pdf here), but it is for normal download (not emailing documents). The email issue is still pending (bug# 32680, more discussion here).

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

Sign in to reply to this post.