Need to change the background color of a textview in offline PDF

We are using the PDFDocument API in order to generate a PDF file which is eventually stored in a network folder. We were initially using the Webdynpro Interactive Form UI element, but digressed from that approach because of some architecture considerations.
I am able to do everything with the PDFDocument API, expect two things which are proving to be much tougher than I thought:
1) I have a textview in my .XDP template. The background color of this textview must change depending on the value that I display inside it. For example, if the value is between 1 and 20, the background color must be green, if the value is between 21 and 40, it must be yellow and so on...
I still have not found the method to specify the background color of a textview using the .XML data file.
2) Depending on a certain condition, I need to display 5 images in a table row instead of the usual 6. I have been able to do that by simply not providing the 6th image url, but I also need to resize the 5 such that they occupy the space that was initially used by 6 images.
Any ideas of how I can go about these requirements?
Thanks & regards,
Navneet Nair.
Edited by: Navneet Nair on Feb 19, 2009 10:09 AM

1) I added an invisible textfield inside my .XDP file and populated it with the color value that I want my main text field to display.  (This color needs to be specified in the R,G,B format... for example... 128,0,0
2) Now in the 'Initialize' javascript event of my main text field, I included the following script:
this.resolveNode("<SubFormName>.<MainTextFieldName>").fillColor = this.resolveNode("<SubFormName>.<InvisibleTextFieldName>").rawValue;
Hope it helps!
- Navneet

Similar Messages

  • I am new to this I am trying to do something very simple.  I need to change the background color to

    I need to change the background color of a photo to white and then shrink the head of a photo for a passport and make the picture output a 2x2.
    Can someone help.  Thx

    Here are the requirements for US passport. Scroll down for the passport tool to make the picture utilizing one on your disk.
    If you decide to make it in Elements and print it, you should have a resolution of 240-300 px/in for a good output.  I suggest that you print the 2 photos on good quality paper, probably both on 4x6 stock, and trim with scissors to specification.
    Open your picture and go to Image>resize>picture size, and check the resolution. If it is less than 240 px/in, enter 240 in the field and see if the dimensions remain adequate. If not, you may have to resize.
    Use one of the selection tool, e.g. lasso tool, or selection brush tool, to select head and shoulders
    Go to Edit>copy to put the selection on the clipboard
    Open a new, blank file (File>new>blank file) 2.25 x2.25", resolution the same value as your picture, background white
    Go to Edit>paste. The picture will be on its own layer
    Access the move tool to position it, and to resize with the corner handles of the bounding box, if necessary
    Please report back with your progress.

  • In Pages 09' how do I change the background colors on the templates?

    I have been trying to change the background on one of the templates from red to green for a while.  I can't figure it out and i can't find answers online any where that are helpful at all.  I just need to changes the background color to what I want it to be and not what the programs sets them too.  Any ideas?  I'm totally stumped!
    Thanks for the help!

    Hi Burke,
    Here's the result, using Peggy's suggestion:
    Click on the thin strip of red to the left of the title ("THE THOMPSONS") to select the background.
    You'll see the small x in each corner, indicating the object is locked.
    Go Arrange > Unlock (or press option-command-L) to unlock the object.
    Click on the Fill Color well in the format bar, and choose a new colour from the palette.
    Go Arrange > Lock (or press command-L to re-lock the object.
    Save the result.

  • How do you change the background color & font in a text-only popup?

    It has been ages since I did this and I can't seem to remember how. I tried to edit the style sheet but it only has options to change the text-only popup hotspot/link and I need to change the background color and font style within the popup itself. Tried Adobe's help but it had no answer for me. Any one out there know how to do this? I am running RoboHelp 7.

    By Popup do you mean a link that when clicked causes a separate topic to be displayed in a seperate window (popup) or Drop Down text?
    For Popups that are displayed in a new window then the font and colour is changed in the topic that is displayed. Simply open the topic and change colours / features as required
    If you are using drop down text and confusing this with a popup then the font and colour is changed when creating the drop down text. Right click the text and select Font to change colour etc.

  • How to change the background color only for one HTML-Portlet?

    Hi all,
    I have created a HTML-Portlet in my root-page. The root page have a style: Main-Style.
    I want to change the background-color only for this one HTML-Portlet:
    <body bgcolor="#999999">
    But this does not work...
    When I use the CSS, then it will change the background-color for the root-page too.
    Leonid Pavlov

    could you try this
    <table bgcolor="#999999">
    I don't think you need <html><header><title>Test</title></header>
    <body></body></html> for your HTML-Portlet.

  • How to change the background color of a cell in datagrid using flex3

    i want to change the background color of a can i achieve this.....and also i want to know how a spacing cane be done between cells in a datagrid...plzzz help me???

    The only way I can see to do this is to use an item renderer for your cells.  This is really scruffy and would need tyding up, and maybe with a little more time could do better or someone else may have an idea but none the less this works.
    Define a custom component as below;
    This has logic to see what the value of the data is proveided by the dataprovider for the row, and if it matches the conditions in this case is equal to 5 sets the background color.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="" width="88" height="26" dataChange="doColor()" borderColor="#000000" borderStyle="solid"
                private function doColor():void {
                    if (data.value == 5) {
                        setStyle('backgroundColor', 0xcccccc);
                    } else {
                        setStyle('backgroundColor', 0xffffff);
    Now just apply the item renderer in the datagrid and that will do it.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="" layout="absolute"  xmlns:ns1="*">
                import mx.collections.ArrayCollection;
                private var ac:ArrayCollection = new ArrayCollection([
                    {value : 1},
                    {value : 2},
                    {value : 3},
                    {value : 4},
                    {value : 5},
                    {value : 6},
                    {value : 7},
                    {value : 8},
                    {value : 9},
                    {value : 10}
        <mx:DataGrid x="40" y="36" width="408" height="193" dataProvider="{ac}">
                <mx:DataGridColumn headerText="Column 1" dataField="value" itemRenderer="MyComp"/>
                <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
                <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
    I hope this helps

  • Change the background color of a cell in JTable

    Hi all,
    How can I change the background color of individual cell in JTable. I need to construct my own TableCellRenderer or not? I'm now using the DefaultTableCellRenderer now.

    You could create your own renderer or you could try something like:
    table = new JTable(model)
         public TableCellRenderer getCellRenderer(int row, int column)
              DefaultTableCellRenderer tcr =
               (DefaultTableCellRenderer)super.getCellRenderer(row, column);
              if (row == 1 && column == 1)
              return tcr;

  • How can I change the background color of odd/even rows in a panelCollection

    Hi everyone.
    I'm using a panelCollection and I need to change the backgroung color for odd/even rows in the table,
    how can I do this, using a stylesheet, is there a special selector or property for this?
    globalResultCollection (UIPanelCollection object) , is a collection of UITable elements, and it's working fine.
    I just want to change the defaul background color for rows.
    <af:panelCollection id="GLOBAL_RESULT_COLLECTION"
    <f:facet name="menus">
    <af:menu id="GLOBAL_OPERATION_MENU"
    binding="#{admin.view.globalOperationMenu}" />
    <f:facet name="toolbar">
    <af:toolbar inlineStyle="width:100%"

    use this:
    af|table::data-row af|column::data-cell { background-color: #CCCCFF; }
    af|table::data-row af|column::banded-data-cell { background-color: #FFCCCC; }
    s o v i e t

  • Change the background color of selected row in adf table

    Can somebody guide me in changing the background color of a row when its being selected. In my ADF table, one of the column is of type Command Link. So whenever i click this command link on any particular row that complete row color should change as an indication of that row being selected.
    Please guide me to do this. I referred to other forum posts, but they couldnt meet my need.

    Hi Frank,
    you're right. This should work. But the result is not perfect from my point of view.
    I use
    <af:table ...>
      <af:column ...>
        <af:outputText value="#{row.col1}" inlineStyle="#{row.mystyle}"/>
    </af:table>and I get e.g. this in HTML:
    <table ...>
        <td class="af_column_cell-text OraTableBorder1111"><span style="font-weight:bold;">qqq</span></td>
    </table>while I would prefer to get somethig like this:
    <table ...>
        <td style="font-weight:bold;"><span>qqq</span></td>
    </table>, which looks much smarter. Is it possible?

  • How do I change the background color on pages I try to print or view?

    when I installed/downloaded Mozilla/Firefox originally, I "set" an option that changed the "background" color for certain pages that I download. When I try to print some pages, the entire background (or some blank spaces) is printed in a purple color. (It uses too much ink to print a page.)
    Can't find where I can change the original settings I used and make the background white, or no color at all.

    Specifically to add a background color, no. The only workaround I am aware of is to add a text box to the document format and expand it to cover the entire page. Available colors will be limited, and you may need to experiment with the opacity.

  • How Do I Change the Background Color in Keynote?

    Hello! I am trying to change the background color in Keynote, I can see where I should be able to do this, however my computer does not let me. If I change the template (in the Fun template from the standard to the horizontal picture) it will let me change it only in the box rather than the entire template. I really want to keep the style, just not the orange color. Thanks!

    Ruth, the background in Fun is an image, not just a colour. For the templates without photo cutouts, you will need to select the template, go into the Inspector, choose Slide, select the Appearance tab, and then in the background section you can change the image. If you just want to change the colour, you can choose Tinted Image Fill in the dropdown menu, then click the colour box to control the tint.
    Unfortunately, changing the Photo template is much more difficult, since the "background" image is actually a cutout placed on the slide above the actual background. As far as I know, changing this image will require access to fairly sophisticated graphics programs, such as Photoshop. However, if you are using Keynote 3, an alternative would be to create an image mask that is similar in shape to the cutout, as this would produce the same effect (cutouts are not nearly as vital now that images can be masked to a shape).
    PowerMac G5   Mac OS X (10.4.4)  

  • Can we change the background color of a sub menu?

    In swing, can we change the background color of a sub menu. it is working fine for the main menu, but doesn't work for sub menu.

    Hey hi,
    just an append to the previous reply.
    The subMenu needs to be setOpaque() to true. i.e.

  • Change the background color for HToggleButton as State changed

    Hi , I want to change the background color of HToggleButton or HGraphicButton as its state changed as normal to focus and then focus to normal and same with actioned state .It is possible to change the image with different states but how can I do the same thing to change background color .I'll appreciate any help regarding this with thanks in adv.

    i_x denotes first column and not characctersitic 1.
    Also I am not sure if the check is to be for IS_SUM.
    Use Get_Cell_info class instance and then use the data returned by the same for checking IS_SUM and then change the cellstyle.
    Another thing to look out for is , the required change might be needed on DATA_CELL and notcharacteristic_cell.
    Assigning points is a way of saying thank you on SDN

  • Anyone using Simple Viewer?  How do I change the background color?

    To match my website better, I would like to change the background color to white. Any ideas... Hopefully automatically?

    Hello TandA4,
    You need to open up the folder you created. Locate the file called "index.html" and open it with text edit. Find the following three pieces of text:
    background-color: #181818;
    <param name="BGCOLOR" value="#181818" />
    scale="noscale" bgcolor="#181818" type="application/
    In each case change the "181818" (or what other numbers or digits are there) with six F's. It should look like: background-color: #FFFFFF.
    Kind Regards,
    Ash Films
    <edited by host>

  • (J2ME)change the Background Color Of Form

    I have a question about create a Form on J2ME Midlet.
    How could we change the Background Color Of Form? Is it possible?
    Thanx a lot.

    You can try the J2ME forums
    Then don't seem to be bursting with life though. You may find what you need searching these examples
    I don't use J2ME myself.

Maybe you are looking for

  • Don't know where else to turn

    Please help if you can, I'm having printing problems and can't resolve. Have an old Epson Stylus Photo 1280 and have cartridges from an OEM dealer. Never seemed to have problems before until recently. The printing is off <> muddy <> photo prints with

  • Treating source with 4:3 info as 16:9 possible with Final Cut Express?

    I want to switch from Premiere Elements 3 + PC to iMac + Final Cut Express. But I need some help to make this decision. The digital PAL format is with square pixels 768x576 and with rectangle pixels 720x576. There is no difference for widescreen form

  • Any news on other ereaders

    So love my PB and keep hearing about the Kindle app that is coming but cant find anything on a date for it. What I really want is a Nook app but havent even heard rumor of that. Has anyone else heard anything on either of these?

  • Cannot see Shared Folders from xmlpserver - OBIEE 11g (

    Hi All, I have got a an issue with the permissions i.e. I can log in to http://hostname:7001/analytics and open a report that is stored in "Shared Folders" but if I log in to http//hostname:7001/xmlpserver with same user I cannot see Shared Folders.

  • Best Way to Move from old iMac to New?

    My super sweet new 27" iMac is due to arrive next Thursday and will be replacing my mid-2007 iMac. Each OS release has been installed on the 2007 iMac as an upgrade and hasn't been cleanly installed since it was new. Though I use TimeMachine, I was u