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

Hi,
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.
    http://travel.state.gov/passport/pptphotoreq/pptphotoreq_5333.html
    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:
    Process:
    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.
    Regards,
    Barry

  • 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:
    <html>
    <header><title>Test</title></header>
    <body bgcolor="#999999">
    Test
    </body>
    </html>
    But this does not work...
    When I use the CSS, then it will change the background-color for the root-page too.
    Thans
    Leonid Pavlov

    could you try this
    <table bgcolor="#999999">
    <tr>
    <td>
    test
    </td>
    </tr>
    </table>
    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 cell.....how 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="http://www.adobe.com/2006/mxml" width="88" height="26" dataChange="doColor()" borderColor="#000000" borderStyle="solid"
        backgroundAlpha="1">
        <mx:Script>
            <![CDATA[
                private function doColor():void {
                    if (data.value == 5) {
                        setStyle('backgroundColor', 0xcccccc);
                    } else {
                        setStyle('backgroundColor', 0xffffff);
            ]]>
        </mx:Script>
    </mx:Canvas>
    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="http://www.adobe.com/2006/mxml" layout="absolute"  xmlns:ns1="*">
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                [Bindable]
                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:Script>
        <mx:DataGrid x="40" y="36" width="408" height="193" dataProvider="{ac}">
            <mx:columns>
                <mx:DataGridColumn headerText="Column 1" dataField="value" itemRenderer="MyComp"/>
                <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
                <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>
    I hope this helps
    Andrew

  • 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.
    Thx

    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)
                   tcr.setBackground(Color.green);
              else
                   tcr.setBackground(Color.red);
              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.
    Thanks
    <af:panelCollection id="GLOBAL_RESULT_COLLECTION"
    binding="#{admin.view.globalResultCollection}"
    styleClass="globalResultCollectionRegion"
    clientComponent="true">
    <f:facet name="menus">
    <af:menu id="GLOBAL_OPERATION_MENU"
    binding="#{admin.view.globalOperationMenu}" />
    </f:facet>
    <f:facet name="toolbar">
    <af:toolbar inlineStyle="width:100%"
    binding="#{admin.view.globalOperationToolbar}"
    id="OPERATION_TOOLBAR"/>
    </f:facet>
    </af:panelCollection>

    Hi,
    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; }
    Regards,
    s o v i e t

  • Change the background color of selected row in adf table

    Hi,
    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.
    Thanks
    ri

    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:column>
    </af:table>and I get e.g. this in HTML:
    <table ...>
      <tr>
        <td class="af_column_cell-text OraTableBorder1111"><span style="font-weight:bold;">qqq</span></td>
      </tr>
    </table>while I would prefer to get somethig like this:
    <table ...>
      <tr>
        <td style="font-weight:bold;"><span>qqq</span></td>
      </tr>
    </table>, which looks much smarter. Is it possible?
    Thanks,
    Alexandre.

  • 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.
    subMenu.setOpaque(true);

  • 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.

    Satya,
    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.
    Arun
    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,
    --Eric
    Ash Films
    <edited by host>

  • (J2ME)change the Background Color Of Form

    Hello
    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 http://forum.java.sun.com/category.jspa?categoryID=23
    Then don't seem to be bursting with life though. You may find what you need searching these examples http://www.java2s.com/Code/Java/J2ME/CatalogJ2ME.htm
    I don't use J2ME myself.

Maybe you are looking for

  • IIOP connection from JDeveloper does not work

    I'm trying to run some sample EJB programs but cannot connect to the IIOP port from JDeveloper. I have installed Oracle 8.1.7 Enterprise on my machine, and it includes a listening location for IIOP on port 2481 under the listener. I can connect to JS

  • Sending Product Activity Notification from R/3 to APO using XI

    I am trying to send a product activity notification from a backend R/3 system to APO using XI.The idoc Proact01 is getting generated and in XI when Executing transaction 'sxmb_moni' the status is showing 'processed successfully'. But in the message m

  • BAPI Required to post GR in EBP System( SRM4.0, Classic Scenario)

    Hello All,   We have SRM4.0 with classic scenario with non-sap backend system. We need to post GR in EBP system automatically.   could you please tell me the BAPI required for this? Regards Neelesh

  • Characteristic display after Key Figures

    Hi, I need to display a characteristic in last coloumn of the report. i.e., after all the key figures. is it possible ?? regards, KV

  • Best way to store user-saved searches/forms

    Hello, in our project, we want to give to our users ability to save form fields values for later use. It will be named the fast OR saved searches. We have a relatively huge number of search forms, each one with specific fields. So I don't want, if po