Forum Replies Created
-
AuthorPosts
-
January 14, 2016 at 7:57 am in reply to: Recurrent Open And Save Indd Files In a Whole File Tree using JS #80782
Keith GilbertParticipantCheck out Peter Kahrel’s “Batch-process” script here: https://www.kahrel.plus.com/indesign/batch_convert.html
It will do what you need. It will process subfolders, and will allow you to run a second script on the files it processes.
Keith GilbertParticipantUnfortunately, there isn’t any simple way to do this with InDesign scripting. The InDesign scripting DOM doesn’t “talk” to the scripting capability of Acrobat, so there isn’t an easy way to pull this off.
I think this is a good example of how even though both InDesign and Acrobat are from the same company (Adobe) and both a part of Creative Cloud, they are developed by completely separate teams in separate business units. Someday I’m going to go to Adobe and create a lunchtime 3-on-3 basketball tournament or something to get the teams talking to each other! (I know it isn’t this easy…the teams are in separate cities…separate countries even, with their own agendas and goals). But we are so close to being able to do some cool things that I fear will never see the light of day.
Keith GilbertParticipantHi Nilesh: A couple of thoughts:
1. copy/pasting JavaScript code isn’t always reliable…sometimes special characters change during copy/paste to the forum, etc. You can download a zipped copy of the script here https://gilbertconsulting.filecamp.com/public/file/257r-5i208rjn and then unzip the script and install it.
2. This script is just a quick snippet. In other words, it doesn’t have any error checking built in. There might be some circumstances I haven’t thought of that would cause an error. Test the script on a simple, new file that contains just a couple of new swatches you’ve created. See if it works there, and then start testing it on more difficult files.
Keith GilbertParticipantThis should do it, Nilesh. Note that this script snippet assumes that all the swatches are CMYK already:
var myDoc = app.activeDocument;
var mySwatches = myDoc.swatches;
for (var s = mySwatches.length-1; s >= 0; s--) {
var mySwatch = myDoc.swatches[s];
var name = mySwatch.name;
if (name != ""){
try {
var myColorValueArray = mySwatch.colorValue;
mySwatch.name = "C="+Math.round(myColorValueArray[0])+" M="+Math.round(myColorValueArray[1])+" Y="+Math.round(myColorValueArray[2])+" K="+Math.round(myColorValueArray[3]);
}
catch(myerror) {
}
}
}
December 16, 2015 at 9:17 am in reply to: Script to copy pages from multiple IDML files into a single IDML or INDD #80239
Keith GilbertParticipantHi Justin. The script by Tomoaki Oshima “merge-idml-files.js” located at https://github.com/mindboard/indesign-extendscript/tree/master/05 may do what you need. I just tested it and it works for me. Install the script, and then make a folder named “res” alongside the script (in the scripts panel, right next to where you installed the script). Then, copy your .idml files into this folder, and run the script. All the IDML files will be merged together into a new, untitled document.
Keith GilbertParticipant@AM: I just did a couple of simple tests, and you’re correct, Publish Online is converting the text to SVG. So, it isn’t using the same engine (at least not entirely) as the “secret” publish to FXL HTML that is exposed by my script. So, you are correct–the number of fonts should NOT affect Publish online file sizes.
Keith GilbertParticipantI can’t really think of any document construction strategies that would affect file size, other than
1. paying attention to the image settings in the Publish Online Options dialog
2. Limiting the number of fonts used in the document, keeping in mind that bold, italic, etc. are all separate fonts, and each font ends up embedded in the document
As far as I know, InDesign’s Object Export Options for individual images are ignored by Publish Online, so that doesn’t help.
Keep in mind that for certain animated effects and transparent effects, InDesign will rasterize regions of the page in order to reproduce these accurately, and this may affect file size in unexpected ways.
I do think that for testing purposes, using the FXL HTML Export script that David linked above would be a good way to compare file sizes for Publish Online output. But bear in mind that the script doesn’t include any control over image dpi and quality settings. But it would be a good way to test to see if changing something on the page makes the resulting html larger or smaller.
-
AuthorPosts
