Forum Replies Created
-
AuthorPosts
-
Ari Singer
MemberIn my experience I found that very complex vector artwork can bloat a PDF and can’t get compressed to make it a smaller size. Check your file if you have that, and if you do try converting it to raster.
Ari Singer
MemberIt might be several text frames, one for each line, adjusted horizontally for this effect with an added text wrap.
Ari Singer
MemberI understand. But to what measurements do you want to change it?
Ari Singer
MemberTo what do you want to change it?
August 7, 2016 at 7:45 pm in reply to: GREP: finding trailing space at the end of particular lines #87105Ari Singer
MemberI think that in GREP you can’t search for end of lines, only ends of paragraphs. You would need scripting for that.
Ari Singer
MemberTry this:
\w*?(\.org|\.com|\.net|\.edu|\.us|\.gov|\.biz)[\w/]*August 3, 2016 at 7:02 pm in reply to: Updating Pantone Color Libraries… Still Missing Colors #87079Ari Singer
MemberHow is the situation in Illustrator?
Ari Singer
MemberTry working with a negative left indent.
July 29, 2016 at 8:05 am in reply to: Best way to change the page size of a PDF and maintain the proportions by sca #87001Ari Singer
MemberUse the free MultiPageImporter script, it has a ton of options and one of those is to scale the PDF to any percentage before importing.
Ari Singer
MemberTry trashing your preferences, and then setting the Display Performance Defaults when no documents are open
Ari Singer
MemberFunny, because it works by me. Maybe this is better:
var myDoc = app.activeDocument; app.findGrepPreferences = app.changeGrepPreferences= null; app.findGrepPreferences.findWhat = "$"; app.findGrepPreferences.appliedParagraphStyle = myDoc.paragraphStyles.item("Day entries"); var found = myDoc.findGrep(); for (var i =0; i < found.length; i++) { try { var para1 = found[i].paragraphs.firstItem(); var para2 = para1.paragraphs[-1].insertionPoints[-1].paragraphs[0]; if (para2.appliedParagraphStyle == myDoc.paragraphStyles.item("Date Headings")) para1.appliedParagraphStyle = myDoc.paragraphStyles.item("Day entries LAST"); } catch(_){}; }Ari Singer
MemberTry this:
var myDoc = app.activeDocument; app.findGrepPreferences = app.changeGrepPreferences= null; app.findGrepPreferences.findWhat = "$"; app.findGrepPreferences.appliedParagraphStyle = myDoc.paragraphStyles.item("Day entries"); var story = myDoc.findGrep()[0].parentStory; var found = story.findGrep(true); for (var i =0; i < found.length; i++) { var para1 = found[i].paragraphs.firstItem(); var para2 = para1.paragraphs[-1].insertionPoints[-1].paragraphs[0]; if (para2.appliedParagraphStyle == myDoc.paragraphStyles.item("Date Headings")) para1.appliedParagraphStyle = myDoc.paragraphStyles.item("Day entries LAST"); }This works by finding any paragraph that has the regular paragraph entry applied, but that the paragraph after that has the new date paragraph style applied.
Ari Singer
MemberThe issue seemed to be the Word Boundary after a period (
.). So I change it to a Negative Lookahead ((?!\w)) and it worked.I also adjusted the GREP search string so that it would be more accurate, because in GREP the period
.is a wildcard that stands for every letter, and is only a period if it’s preceded by a backslash. But in the script the period was never escaped out, so it would find “Fla.” but it would also find and change “Flag”! (Not good…).So now I added a regex at the end to fix that. (As well as fixing that Wash. entry…).
//DESCRIPTION:Expand US State Abbreviations app.doScript(doReplace, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Expand State Abbreviations"); function doReplace () { var a; var abbrevs = [ [ "Alabama", "Ala." ], [ "Arizona", "Ariz." ], [ "Arkansas", "Ark." ], [ "California", "Calif." ], [ "Colorado", "Colo." ], [ "Connecticut", "Conn." ], [ "Delaware", "Del." ], [ "District Of Columbia", "D.C." ], [ "Florida", "Fla." ], [ "Georgia", "Ga." ], [ "Illinois", "Ill." ], [ "Indiana", "Ind." ], [ "Kansas", "Kan." ], [ "Kentucky", "Ky." ], [ "Louisiana", "La." ], [ "Maryland", "Md." ], [ "Massachusetts", "Mass." ], [ "Michigan", "Mich." ], [ "Minnesota", "Minn." ], [ "Mississippi", "Miss." ], [ "Missouri", "Mo." ], [ "Montana", "Mont." ], [ "Nebraska", "Neb." ], [ "Nevada", "Nev." ], [ "New Hampshire", "N.H." ], [ "New Jersey", "N.J." ], [ "New Mexico", "N.M." ], [ "New York", "N.Y." ], [ "North Carolina", "N.C." ], [ "North Dakota", "N.D." ], [ "Oklahoma", "Okla." ], [ "Oregon", "Ore." ], [ "Pennsylvania", "Pa." ], [ "Rhode Island", "R.I." ], [ "South Carolina", "S.C." ], [ "South Dakota", "S.D." ], [ "Tennessee", "Tenn." ], [ "Vermont", "Vt." ], [ "Virginia", "Va." ], [ "Washington", "Wash." ], [ "West Virginia", "W.Va." ], [ "Wisconsin", "Wis." ], [ "Wyoming", "Wyo." ] ]; app.findGrepPreferences = app.changeGrepPreferences = null; for (a in abbrevs) { var myString = abbrevs[a][1].replace(/\./g, '.'); app.findGrepPreferences.findWhat = "b" + myString+ "(?!w)"; app.changeGrepPreferences.changeTo = abbrevs[a][0]; app.findGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyles.item("scholarship winner"); app.activeDocument.changeGrep(); } app.findGrepPreferences = app.changeGrepPreferences = null; }Ari Singer
MemberIt all depends on how the Reference Points (or Proxy Points) or set up. You can find it at the far left of the control panel (it’s a diagram with three rows of three small boxes each). Whichever point is selected is regarded as the ‘anchor’ for the page. So in your example, if you want the page to stay on top and only cut off from tho bottom, then you have to select one of the top three reference points (before changing the values). And if you want it to anchor to the top and the left, then you would select the top-left references point.
-
AuthorPosts
