Forum Replies Created
-
AuthorPosts
-
Kathy Cote
MemberHi,
You can do something like that with typinator:
https://www.ergonis.com/products/typinator/you have to set your default settings. Exemple: when you tap “pictogrey”, it will be replace with your image. You can tell that you want it only for Indesign and not for all software.
??
Kathy Cote
Memberok good, it works.
Thanks for your help
January 27, 2017 at 7:00 am in reply to: Apply Object Style to specific text frame with label name #91646Kathy Cote
MemberHi,
Ok I got it.Thanks ;-)
////////////////
#target indesign
var myDoc = app.documents[0];
var myFrames = myDoc.textFrames;
var myObjectStyle = “CIS_Slug_Top”; //Object Style qui doit déja etre par default dans Indesignfor (var i=0; i< myFrames.length ; i++) {
if (myFrames[i].label == “Label2”){
myFrames[i].applyObjectStyle(myDoc.objectStyles.item(myObjectStyle));
alert (“OK Done”); // you changes here
}
}Kathy Cote
MemberHi,
This is exactly what I needed.Another big thank you for your help so precious.
Thanks!
Kathy
Kathy Cote
MemberHi,
oh wow, you’re like a Jeidi ;-) It works very well.
There is just a small part that I tried to modify but I am not able to because I’m just a padawan.Is not exactly : var pageBounds = page.bounds; that I need because the image size frame must also include bleed.
Do you think this can be done?Thanks a lot for your help. This is very much appreciated.
Kathy Cote
MemberHi,
ok to do fit image depending on the width of the document.And now if I want the picture fit height of the Height size?
I cannot use: app.selection[0].fit ( FitOptions.PROPORTIONALLY );
Because it adjusts the image to be fully visible in the frame.
If I use a fit proportionally in height, the image may be wider than the Frame and it’s ok. It’s what I want.///////////
var PHeight = myDocument.documentPreferences.pageHeight;
var myHeight = parseFloat(PHeight);
var FinalHeight = myHeight + “in”;
alert (FinalHeight);
var h = new UnitValue(FinalHeight).as(“pt”);//How to do not have the value w? I want a fit Height and not width. Width is forced to be there?
myGraphic.resize(CoordinateSpaces.INNER_COORDINATES,AnchorPoint.TOP_CENTER_ANCHOR,ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,[w,h,ResizeConstraints.KEEP_CURRENT_PROPORTIONS])Kathy Cote
MemberHi,
ok this code worksvar PWidth = myDocument.documentPreferences.pageWidth;
var myNumber = parseFloat(PWidth);
var FinalWidth = myNumber + “in”;
alert (FinalWidth);
var w = new UnitValue(FinalWidth).as(“pt”);myGraphic.resize(CoordinateSpaces.INNER_COORDINATES,AnchorPoint.TOP_CENTER_ANCHOR,ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,[w,ResizeConstraints.KEEP_CURRENT_PROPORTIONS])
Kathy Cote
MemberHi,
We almost succeeded. If I use the code as below, it works.
I only want to change the value of the variable w, I would like to have the height of my page (which is variable)./////
var myHeight = myDocument.documentPreferences.pageHeight;
//Instead of 3in, I would like to have height of my page. Is it possible ?
var w = new UnitValue (“3in”).as(“pt”);myGraphic.resize(CoordinateSpaces.INNER_COORDINATES,AnchorPoint.TOP_CENTER_ANCHOR,ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,[w,ResizeConstraints.KEEP_CURRENT_PROPORTIONS]);
Thanks again ;-)
Kathy
Kathy Cote
MemberHi,
We almost succeeded. If I use the code as below, it works.
I only want to change the value of the variable w, I would like to have the height of my page (which is variable)./////
var myHeight = myDocument.documentPreferences.pageHeight;
//Instead of 3in, I would like to have height of my page. Is it possible ?
var w = new UnitValue (“3in”).as(“pt”);myGraphic.resize(CoordinateSpaces.INNER_COORDINATES,AnchorPoint.TOP_CENTER_ANCHOR,ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,[w,ResizeConstraints.KEEP_CURRENT_PROPORTIONS]);
Thanks again ;-)
Kathy
Kathy Cote
MemberHi,
No because I want the image to be the same height as my box image but the width can vary.
Once the correct height, I center the image in the box. The image may be wider than the box itself.Thanks ;-)
Kathy Cote
MemberOk I got it! I have use parseFloat.
var width = D;
var height = parseFloat(E);myFrame2=newDoc.textFrames.add();
myFrame2.contents = H;//Top, Left, Bottom, Right
var Y2 = E; //Top
var X2 = 0; //Left
var H2 = height+5; //Bottom. 5 if my slug
var L2= D; //RightmyFrame2.geometricBounds = [Y2, X2, H2, L2];
Thanks
Kathy Cote
MemberHi,
I trying place my text box on slug in the bottom of page. I can do it. Can you help me?Thanks again.
My part of code:
width = D;
height = E;myFrame2=newDoc.textFrames.add();
myFrame2.contents = H;
//Top, Left, Bottom, Right
var Bleed2 = “0.25”;
var Slug2 = “0.5”;var Y2 = E+Bleed2; //Top
var X2 = 0; //Left
var H2 = E+Slug2; //Bottom
var L2= D; //RightmyFrame2.geometricBounds = [Y2, X2, H2, L2];
Kathy Cote
MemberOk I have my working code. I would now add “_LR” at the end of the name of the pdf. I tried several things but it does not work. Can someone help me with this?
while(app.documents.length>0){
var myDoc = app.activeDocument;
myDoc=myDoc.filePath+”/”+myDoc.name.split(“.indd”).join(“.pdf”);
//alert(myDoc);
var exportfile=new File(myDoc);
app.activeDocument.exportFile(ExportFormat.pdfType, exportfile, false, “LR”);
app.activeDocument.close();
}Kathy Cote
Memberhi,
YES!!! It’s exactly that!!!Thanks a lot!
Kathy Cote
MemberHi,
is it possible to have each table in separately text frame for each ?I guess it’s more complicated?
thanks
Kathy
-
AuthorPosts
