Is it possible to create the text block with non-uniform formatting is applied to the text?

Hi all

By this script

var doc = app.documents.add(70, 20, 300, "Test", NewDocumentMode.RGB);
var textLayer = doc.artLayers.add();
textLayer.name = "Text";
textLayer.kind = LayerKind.TEXT;

var solidColorRef = new SolidColor();
solidColorRef.rgb.red = 0;
solidColorRef.rgb.green = 174;
solidColorRef.rgb.blue = 239;

var ti = textLayer.textItem;
with (ti) {
     contents = "Blah-blah-blah!";
     kind = TextType.PARAGRAPHTEXT;
     height = new UnitValue("20 mm");
     width = new UnitValue("70 mm");
     position = [ new UnitValue("0 mm"), new UnitValue("0 mm") ];
     font = "MinionPro-Bold";
     size = new UnitValue("24 pt");
     color = solidColorRef;
     justification = Justification.CENTER;
}

So I can create a block of text with uniform like formatting

SNAG-0011.png
But, as far as I understand it, it is impossible to make an image and apply different sizes, colors, etc. (Please confirm or refute it).

To achieve the result by script as follows:

SNAG-0014.png

The r to Browse datashows the formatting only to the beginning of this text.


What I want to achieve is to take a block of text in the InDesign document and re-create it in psd-file. (The text must be editable)

Y at - it another way to achieve this: by plug-ins, extensions, incantation, etc.?

Kind regards
Kasyan

So that other things I noticed, it's text.jsx does not work with UnitValues. It uses the action Manager to work with textRanges. And it seems that Adobe changed the textItem units operating. Therefore, it is difficult to understand what values to use. Text.addNewTextLayer () and Text.modifyTextLayer () seem to what different values for the text of the same size.

So below is an example updated the PS-Scripts-post on how to create a text layer with different textRanges using the current text.jsx.Note I've hard-coded sizes for that to work as I had hoped.

function tsrDemo(doc) {
     var doc = app.documents.add(new UnitValue(70,'mm'), new UnitValue(20,'mm'), 300, "Test", NewDocumentMode.RGB);
     // we want to create a new text layer so create a new TextOptions with the contents as the argument
      var opts = new TextOptions("Blah-blah-blah!");
       // override the default settings
       opts.layerName = "Test";
       opts.kind = TextType.PARAGRAPHTEXT;
       opts.height = 800;// pixels
       opts.width = 200;
       opts.position = [ 0, 0 ];// pixels
       opts.justification = Justification.CENTER;
       opts.font = Text.findFont("Minion Pro Bold");
       opts.size = 6;// not sure what unit this needs
       opts.color = Text.toRGBColor(0, 174, 239);

       // create a new text layer with those options
     var layer = Text.addNewTextLayer(doc, opts);

       var opts = new TextOptions( layer.textItem);
       opts.contents = layer.textItem.contents;
       // now need to construct TextStyles for each range we want to set
       // for ranges we can only change the font, size, and color
       // first set a textStyle that matches the TextOptions
      var s1 = new TextStyle(undefined,undefined,undefined);
       // now set a textStyle for each different style you want
      var s2 = new TextStyle(undefined, 12, Text.toRGBColor(0, 0,0));// for some reason size values here are not the same scale as above
       // define more TextStyles as needed. here we only need one

      // Now create the set of ranges to apply the styles over
      var ranges = new TextStyleRanges();
       // the first range must start at 0.  In this example we want the first range unchanged
       // so we use the TextStyle that matches the TextOptions
       // this range covers the entire contents
      ranges.add(new TextStyleRange(0, opts.contents.length, s1));
       // this range covers the middle 'blah'
       ranges.add(new TextStyleRange(5, 9, s2));
        // we now add the ranges we set to the TextOptions
      opts.ranges = ranges;

       Text.modifyTextLayer(doc, opts, doc.activeLayer); 

    };

    tsrDemo();

Tags: Photoshop

Similar Questions

  • Is possible to create the WINS resource record in DNS server and how?

    Is possible to create the WINS resource record in DNS server and how?

    No resource record WINS I can create when it right click on and select "other new records".

    If you were using abusive or foul language, insults, etc. He would get you banned from the forum.

    If you have done any of these, then I suggest that you do the following:

    If banned, ask reason why and offer him your defense

    If not banned, then let them know the name of the person "you kicked off the forum" reports of ill-treatment.   They will study.

    If you haven't seen any action on your report, and suspect that the Forum is not being actively monitored, you can request action by clicking the Site feedback link at the bottom of any Forums page.   -Taken from

    Forums Help FAQ

    http://social.technet.Microsoft.com/wiki/contents/articles/7359.forums-help-FAQ-en-us.aspx#197

    We get off topic with this conversation and the COC States:

    Keep the topics of conversation on track. ............

    .......... Discussions can be blocked in the forum comments if necessary.

    If there is any other questions about WINS, then consider marking response as appropriate.

  • Is it possible to create a text on a curve path in Photoshop 6.0 (Windows)?

    Hello

    I'm new to Photoshop and Yes... I use a very old version of Photoshop (i.e. Photoshop 6.0).

    I wanted to know:

    If it is possible to create a text on a curve path in Photoshop 6.0 (Windows)? If so, how?

    Note that I don't want to create wraped text (using the Arc etc..).

    Specifically, I want to type text along the bottom of a circular image.

    I checked the various blogs that explain how do to the newer versions (or MAC version) Photoshop.

    I use the version of Windows.

    Thank you... I appreciate all the help!

    Looks like you're out of luck.  Text on a path arrived with CS (Photoshop 8)

    http://en.Wikipedia.org/wiki/Adobe_Photoshop_version_history

    I doubt anyone here will be able to test it with such an old version, but the things that come to mind create each letter on its own layer of text and using the transformation that is free to rotate and position.  Something else will produce bad bad results - unless someone else has a better idea.

  • Hello, how is it possible to create the FAT32 BOOTCAMP on CoreStorage partition via the command line interface?

    Hello, how is it possible to create the FAT32 BOOTCAMP on CoreStorage partition via the command line interface?

    I mean ' diskutil cs * " and so on..."

    Yes, you must use the resizeStack command. Please see Re: how to repair fsck "your drive could not be partitioned..." Bootcamp does not as an example.

  • Re: Is it possible to create the current configuration of the software recovery disk?

    I recently bought A350. Next to the standard software provided by Toshiba, I bought and installed other products such as Norton Internet Security, update all drivers, etc..
    Is it possible to create a recovery disc on my current setup of the software?

    I know the recovery disk, but it will only restore the original configuration of the software. I don't want to go through all the pain of installing other products and update all the drivers.

    I have been using other software like Acronis Disk recovery, but I don't know this recovery cd created by these third party software can be used.

    Everyone has known about this?

    Hello!

    Boyfriend sorry but it is not possible to create a recovery disc with the current configuration of your software. The Toshiba Recovery disk contains the factory settings and t, you can integrate additional software to the image.

    If you want a picture of your laptop with your special software, you need to use another program like Acronis image. So you can make an image of your HARD drive with all your settings and software.

    Good bye

  • Is it possible to create the icon PDF format display with the cover of the document image, when sending via "Mail" on a mac?

    Is it possible to create the icon PDF format display with the cover of the document image, when sending via "Mail" on a mac?

    InDesign has no control on how Apple Mail displays a PDF it creates.

    My experience is that Mail displays a preview of a single PDF page, but not a multiple page PDF. In addition, for a single page PDF, the user may tip if the PDF shows a preview by right-clicking the icon/preview.

  • Is it possible to create the page without having to install apps on personal system

    Is it possible to create the page without having to install apps on personal system?

    Hi hankouraou,

    installation of oracle in the system applications, you can run any page of the OAF by jdeveloper. If you want to develop any stand-alone page (without oracle application), you can go to the ADF.

    Thank you
    Vandenplas.

  • Is it possible to create a transparent background with a cutout of jpeg?

    Is it possible to create a transparent background with a cutout of jpeg? I want to know how to cut an object in a jpeg file, so it can be used in a Web site.

    No jpeg file format does not support transparency. Try the PNG format.

  • Is it possible to create the formatting for the text box option in Oracle Apex 4.2?

    Hi all

    "I'm trying to create the same form that" ""form DISCUSSION SATRT ORACLE ' and I wanted to know if it is possible to create options for formatting that includes font family, size, indent, style etc,. as shown in the picture.

    Oracle version: 4.2

    DB version: 11.2 g

    .APEX_Question.jpg

    Kind regards.

    Hello

    Use Rich Text Editor Item in the choice of an element on the page apex. It has a few modes, see mode that suits you.

    -Sunil Bhatia

  • Is it possible to create the banner of the entire page or a slide show?

    I'm wondering - is it possible to create effects like Enfold theme demo | House v7: a portfolio Page ?

    Specifically the sensitive cursor image area or which fills the first screen of the browser (less maybe header) but moves upward scrolling?

    Thank you.

    Yes it is possible. It's theme Muse premium Home

  • Possible to create the GAUGE with DIAL of SQL type?

    Hi all

    Just a quickie - you can create a gauge-style bar of the spreadsheet (rather than via a report) with the following:

    Select ' SQLDEV: GAUGE: 0:200:50:150:' | Count (*) from my_table;

    I'm curious - is there a way to control the type - that is to say, do a comparator rather? Or this can be done through reports? There are all the other parameters can be adjusted (colors, labels, etc.)? Did I miss something in the documentation?

    Also, is it any documentation that explains all the other bits possible and bats that might be available using the SQLDEV: command/fucntion/etc? EG - I can't do graphics, etc.?

    Thank you

    Ghee

    Published by: Ghee on October 7th, 2009 15:36

    It was a feature that was added to facilitate the creation of the database management screen and I thought since I was creating the rendering engine, I would expose it.
    It is limited to only display parameters MIN | MAX | MIN_THRESHOLD | MAX_THRESHOLD | VALUE. No other report components are exposed as renderer in this time and we
    currently have no plans to improve this feature.

    If it turns out be the demand of the user for him that would change in sight. Please do not hesitate to add an improvement on sqldeveloper.oracle.com request if it gets enough requests I have he will return with pleasure.

    Syme

  • It is possible to create a simple paint with common tools CC Flash application?

    Tools:

    Aligns,

    Shadow

    BUR...

    Create the object

    Transformation tool?

    Geometric design.

    Painting surfaces with a texture

    Alpha...

    Effects of images.

    Export to the format of many

    Just the right things, we can find another Flash animation thing.

    No timelime.

    No interpolation.

    No video editing.

    A tool for everyone. Much better than MS Paint with a minimum of tool and affordable to a wide audience.

    I am now using Flash CC just to make images, such as Photoshop and illustrator, it's too much for my little use. And Flash is pretty simple if you do not use the features of Action Script or animations.

    Yes, it is possible to create a simple drawing program, but...

    1. you would not be able to save your work (unless it's an Air application).

    2. why? There are already many free paint there, programs of MS Paint to Paint.NET.

  • OLIVIER-meets - is it possible to create the variable for the formula?

    Hello

    I create a report by using the formula (CASE - WHERE - CAN).

    I want to create a variable that contains my formula, then reuse my variable in other areas.

    So if I need to change my formula, I won't have to change all my fields! (Single variable)

    I want to do, because the formulas that I use in my report are very long and I have several.

    So, I wonder, if there is a solution for this!

    If I have to change all the fields, it will become quickly unmanageable...

    I stand by that in OBI answers directly, and not in the RPD.

    If someone has an idea or a notice

    Thank you in advance,

    Best regards

    Julie.

    Julie,

    even here respond to who you have in the two threads that you opened on the communities of MOS: no, not really since you want to do in the responses. It * might * be possible to the RPD, but quite useless to instantiate a variable RPD just to instantiate a literal code.

  • Is it possible to create a text box click / reveal on a question slide?

    I have a questionnaire with several slides in question, which are all multiple choice questions. At the bottom of each page, I have a text caption that says "click here for a hint. When the user clicks the legend, I would that the suspicion to appear as another legend text. From what I understand, on the other slides I would be able to do this function by inserting a click box; However, the insertion... Click on the option button is grayed out on my question slides. Is it possible in my quiz to implement a text caption that the user can click to reveal another?

    Hello

    As Lilybiri said, you can insert a smart form and configure it as a button. Then have a second form of Smart or a legend with the cue text. Assign the action to show the indicator when you click on the smart form.

    Note that it would be either / or situation. You may not display the caption for a period determined and make him disappear.

    See you soon... Rick

  • Is it possible to create the formula at the level of the hierarchy?

    Dear all,

    In case, I've dimension branch consist of region, sector, branch

    And I have 3 measures Region_target, Area_target, Branch_target

    I want to create new metrics and check if members at the level of the regions, would like to show Region_target measures

    And also for the region and the target.

    So I tried to write the case where the formula, but impossible to refer to the level of the hierarchy, Ho can I do?

    Something like

    Case when the level. Branch_Hierarchy = region then Region_target

    When the level of . Branch_Hierarchy = area, then zone_target

    of other Branch_target

    end

    Please advise, my problem is to only synchronize the targets for each level. Target of all the branch cannot amount to area and target of any region cannot amount to the region.

    Please notify.

    Thank you

    What you're looking for, it's 'level based on measures '. Basically, you'll logical columns called 'Target' that has 3 sources from 3 LTSS - one for each level.

    LTS 'Target area' level 'Région' is the physical column "Region_target."

    LTS 'Target area' level 'Space' is the physical column "Area_target."

    LTS 'Branch target' level 'Branch' is the physical column "Branch_target."

    You are faced with one of the main features and capabilities of OBI: the power of the LTSS and levels in the business model and of the mapping layer. It is crucial to understand these concepts. It's what separates OBI of all other solutions out there.

Maybe you are looking for

  • Firefox constantly crashing on certain websites

    Firefox crashes on a Web site called Weebly when I log in. ( http://www.weebly.com/ ) another place that Firefox plant is when I try to access the Firefox troubleshooting information. It is used to plant here when I tried to post a question on the su

  • Satellite A10 s203: USB ports does not work

    Hello! All of a sudden my usb ports do not work on my satellite sa10-s203. Tried everything (even restarted the ashes of l-top nothing happened.) Enybody can help me? Kris...

  • Card slot problem Satellite P200D-12z - driver need card reader - SD

    Cannot find the suitable for my laptop card reader driver. Please help find!Toshiba Satellite P200d-12z (bought in Sweden) I tried to istall software drivers on the official website of Toshiba: -Flash Cards Support utility-Flash Media DriverUtilities

  • Is there a driver compatible mac out there for printer Canon image class MF3240?

    Just got my first macbook pro. I am trying to connect my printer Canon image class MF3240 and discovered that they are not compatible. I've seen drivers on different web sites, but I am reluctant to use them.  Are there any safe over there, or do I n

  • How do install from unknown sources?

    My 18382 GM Tablet could not start recently and was sent back to Lenovo for repair. They reimagee it and now I am trying to install the apps I had on this subject before. An application is not on the Play store or App store. I don't see an 'unknown s