Miraplacid Publisher 2007 Howto
|
1. How to make page numbered images to be sorted properly (format page numbers in filenames)
You can use a special post-processor to rename your files properly.
Look at the following two post-processor scripts.
1. Check "Open with" checkbox. Fill out "Open with" editbox with
cscript.exe
In "Parameters" type rename1.js (with a full path to it), "Every page" should
be unchecked.
Here is the script - it is intened for use to documents with page numbers
up to 1000.
==================== rename1.js =================
var fso;
function RenameFile(fn) {
var f,newfn;
newfn=fn;
if(fn.search(/_\d\./)!=-1) {
newfn=fn.replace(/_(\d)/,"_00$1");
} else if(fn.search(/_\d\d\./)!=-1) {
newfn=fn.replace(/_(\d\d)/,"_0$1");
}
if(newfn!=fn) {
f = fso.GetFile(fn);
f.Move(newfn);
WScript.Echo(fn+" -> "+newfn);
}
}
var objArgs = WScript.Arguments;
if(objArgs.Count()!=1) {
WScript.Echo("Invalid arguments");
} else {
fso = WScript.CreateObject("Scripting.FileSystemObject");
var ts = fso.OpenTextFile(objArgs(0),1,false,-2);
while (!ts.AtEndOfStream) {
RenameFile(ts.ReadLine());
}
ts.Close();
}
=======================================
2. Check "Open with" checkbox. Fill out "Open with" editbox with
cscript.exe
In "Parameters" type rename2.js (with a full path to it), "Every page" should
be checked.
Here is the script - it is intened for use to documents with page numbers
up to 1000.
==================== rename1.js =================
var fso;
function RenameFile(fn) {
var f,newfn;
newfn=fn;
if(fn.search(/_\d\./)!=-1) {
newfn=fn.replace(/_(\d)/,"_00$1");
} else if(fn.search(/_\d\d\./)!=-1) {
newfn=fn.replace(/_(\d\d)/,"_0$1");
}
if(newfn!=fn) {
f = fso.GetFile(fn);
f.Move(newfn);
WScript.Echo(fn+" -> "+newfn);
}
}
var objArgs = WScript.Arguments;
if(objArgs.Count()!=1) {
WScript.Echo("Invalid arguments");
} else {
fso = WScript.CreateObject("Scripting.FileSystemObject");
RenameFile(objArgs(0));
}
=======================================
The difference between these scripts is: the first one will be called after the
whole job is done and rename all files at once, while the second will be called once
per each page.
2. How to generate grayscale TIFF files with inverted colors
This is a common problem with TIFF format.
Some applications treat 1's as black color, some - as white.
Our implementation behaves like most serious graphics software (like
Photoshop).
If you still need to invert colors, just check "Colors and Gamma" -> Invert
checkbox in the Settings dialog.
|
|