Post reply

Name:
Email:
Subject:
Message icon:

Verification:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: RTT
« on: September 18, 2016, 11:25:18 PM »

Why not make the report in PDF format? You can easily merge the images with the IDocumentMerger object.
Posted by: Padanges
« on: September 16, 2016, 09:29:55 PM »

Quote
I've now set the host OpenFile command to open it even if not in the grid.
Will there be a possibility to get Opened File Name? If we activate PDF View mode from a PDF View with files selected we get opened the last file active (by the highlight) even if that file is not in current file selection list. After running a custom script with a hotkey we can't know the opened file File name just by taking first (was this "selection down" or "selection up") entry in this situation, we need either to get specifically Opened File Filename or at least the Last Selected (that which is under the current highlight) Filename.
Posted by: Padanges
« on: September 16, 2016, 05:34:59 PM »

Great, that's what I needed ;D now the last thing about different pdfe modes: how much can we mess with Images mode? I want to test out an idea where after generating a report document I can open it, let's say, in Images mode. But to see images being extracted each time I open that same file (even if the file has not been modified), or to be forced to wait for it to finish this task is not really serious. Can we save cache for a selected file for Images mode? How can we escape unnecessary loading times?
Posted by: RTT
« on: September 16, 2016, 04:04:57 PM »

Quote
and that's what will be used by default, in the new version, to handle any other file type
You mean the new version of the web interface?
Yes.
Quote
Current PDFe document handling is fine - Sumatra as a internal viewer covers all the most popular file types. To start fully appreciating it we only need to get more file types listed in the grid.
And I'm going to add support to specify more plugins. It will be able to handle view any file type, as long there is a lister or npapi plugin available.

Quote
Do I really must to include it to the grid just to have it removed (manually?) after checking it? This seems too restricting.
I've now set the host OpenFile command to open it even if not in the grid.
Posted by: Padanges
« on: September 15, 2016, 08:03:22 PM »

Quote
and that's what will be used by default, in the new version, to handle any other file type
You mean the new version of the web interface?
Current PDFe document handling is fine - Sumatra as a internal viewer covers all the most popular file types. To start fully appreciating it we only need to get more file types listed in the grid.
The thumbnail idea for PDFe is a different topic though. We will need to collaborate on this later.

Quote
For your scenario it's probably better to, a least, add the file reference to the grid.
But what if I want only to open a temporary document? For example, that which shows the resulting document but, for a better preview, as a handout, or as a report log? Do I really must to include it to the grid just to have it removed (manually?) after checking it? This seems too restricting.
Posted by: RTT
« on: September 15, 2016, 05:46:27 PM »

Quote
Not implemented. The file would need to be indexed and added to the grid.
I guess to open a file with an internal viewer you need to send a file path to it (perhaps the same is with Images mode too), then why this file path can't be for an unindexed file?
Yes, but then the Grid, InfoEdit tool, and any other GUI element that is showing information about the selected file, will be desynchronized with what's open in the viewer. It's already possible to have this situation, by changing from the PDFView to the grid PDFInfo view, select a different row and get back to the PDFView while pressing the CTRL key. But in this case it's a user choice, so he knows what's going on. For your schenario it's probably better to, a least, add the file reference to the grid.

Quote
Quote
The web interface already has this to handle the documents first page thumbnails.
I installed PDFe with web interface disabled. Can you get a first page thumbnail for any file type (which can be supported for exaple with SumatraPDF) or just a PDF file with web interface?
The web interface can use external renders, or the shell installed thumbnail handlers, to create the thumbnails (see here). The advanced web interface client installer configures the web interface to produce the thumbnails using an included external render (after installed, check the folder C:\MySite\utils), that generates PDF and CHM thumbnails.
Having it configured to use the shell thumbnail handler will enable thumbnails for any file type with a installed thumbnail handler, and that's what will be used by default, in the new version, to handle any other file type.
Posted by: Padanges
« on: September 13, 2016, 09:08:07 AM »

Quote
Not implemented. The file would need to be indexed and added to the grid.
I guess to open a file with an internal viewer you need to send a file path to it (perhaps the same is with Images mode too), then why this file path can't be for an unindexed file?

Quote
The web interface already has this to handle the documents first page thumbnails.
I installed PDFe with web interface disabled. Can you get a first page thumbnail for any file type (which can be supported for exaple with SumatraPDF) or just a PDF file with web interface?
Posted by: RTT
« on: September 13, 2016, 12:49:23 AM »

While exploring ideas I've stumbled upon questions:
1) how to open any file (not only in a grid) in a View/Images mode; I guess that's already implemented
Not implemented. The file would need to be indexed and added to the grid. Something to look at...
Quote
2) how to get the name of the file which is currently open in a View/Images mode
This usually corresponds to the grid active row file, so a command to get it should do the job.

Quote
3) how to save images cache for a selected file for Images mode (to save load time, if file has not been modified)
This is really not needed, for this specific extract images tool.
The web interface already has this to handle the documents first page thumbnails. If eventually a future version adds thumbnails view to the GUI, it will use the same technique/cached files.
Posted by: Padanges
« on: September 10, 2016, 07:24:31 AM »

While exploring ideas I've stumbled upon questions:
1) how to open any file (not only in a grid) in a View/Images mode; I guess that's already implemented
2) how to get the name of the file which is currently open in a View/Images mode
3) how to save images cache for a selected file for Images mode (to save load time, if file has not been modified)
Posted by: RTT
« on: September 10, 2016, 12:23:18 AM »

The above code is already implemented in my development version. Just asking for what other commands you think will be useful.
Posted by: Padanges
« on: September 09, 2016, 09:58:37 PM »

OK. This will be helpful, once the code will be implemented.
Posted by: RTT
« on: September 08, 2016, 11:59:59 PM »

I've now implemented a SendHostCommand method and some commands.
Here's some dumb test code, so you can get the idea how it will work.
Code: [Select]
function SelectFilesHostCmd() {
    this.Command = 'GridSelectFiles';
    this.Files = [];
    this.toString = function() {
        return JSON.stringify(this);
    }
};

function UnselectAllHostCmd() {
    this.Command = 'GridUnselectAll';
    this.toString = function() {
        return JSON.stringify(this);
    }
}

function OpenFileHostCmd() {
    this.Command = 'OpenFile';
    this.Filename = '';
    this.Mode = 0; //QuickPDFView=0,QuickPDFEdit=1,OnGridPreview=2,ViewImages=3,ExternalApp=4
    this.toString = function() {
        return JSON.stringify(this);
    }
}

UnselectAll = new UnselectAllHostCmd;
pdfe.sendhostcommand(UnselectAll);

var SelectFilesCmd = new SelectFilesHostCmd();
for (var i = 0; i < pdfe.SelectedFiles.Count; i += 2) {
    SelectFilesCmd.Files.push(pdfe.SelectedFiles(i).filename);
}

if (SelectFilesCmd.Files.length > 0) {
    var n = pdfe.sendhostcommand(SelectFilesCmd);
    if (n != SelectFilesCmd.Files.length) pdfe.echo('some not selected');
}

var OpenFileCmd = new OpenFileHostCmd;
for (var i = 0; i < pdfe.SelectedFiles.Count; i++) {
    var file = pdfe.SelectedFiles(i);
    if (file.filename.indexOf('moby') > 0) {
        OpenFileCmd.Filename = file.filename;
        OpenFileCmd.Mode = 0;
        pdfe.sendhostcommand(OpenFileCmd);
        pdfe.alert('Next');
        OpenFileCmd.Mode = 1;
        pdfe.sendhostcommand(OpenFileCmd);
        pdfe.alert('Next');
        OpenFileCmd.Mode = 2;
        pdfe.sendhostcommand(OpenFileCmd);
        pdfe.alert('Next');
        OpenFileCmd.Mode = 3;
        pdfe.sendhostcommand(OpenFileCmd);
        pdfe.alert('Next');
        OpenFileCmd.Mode = 4;
        pdfe.sendhostcommand(OpenFileCmd);
        break;
    }
}
Let me know about other commands you think will be useful.
Posted by: Padanges
« on: September 07, 2016, 11:14:33 AM »

Could you make it possible to send the "open in Images mode" command as well?
Posted by: Padanges
« on: September 06, 2016, 06:40:58 AM »

Do you consider it making a new feature for the next release? :)
Posted by: RTT
« on: September 06, 2016, 01:33:15 AM »

Technically possible to do it internally. Still not possible to do it from a script. I still need to implement the send command to host thing  :)