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.
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.
Yes.Quoteand that's what will be used by default, in the new version, to handle any other file typeYou 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.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.
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.
and that's what will be used by default, in the new version, to handle any other file typeYou mean the new version of the web interface?
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.
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.QuoteNot 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?
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.QuoteThe 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?
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?
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?
While exploring ideas I've stumbled upon questions:Not implemented. The file would need to be indexed and added to the grid. Something to look at...
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 modeThis usually corresponds to the grid active row file, so a command to get it should do the job.
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.
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.