Adding text automatically through use of a button

Hi there,
Apologies if this has been asked before. I am creating a form in which a user creates a cost estimate for work done. This is just done by typing the information into a standard text field. At the end of every cost estimate is a standard piece of text, detailing terms and conditions etc which is the same across all estimates. Rather than have the user have to type this in every time, or go to another document to cut and paste, I thought it might be possible to use a button that when clicked adds this standard text to the end of the currenlty selected text field. Is this possible?
Thanks
JTH

Yes, I thought of that - and that may well work.
But currenlty the amount of original text that is entered before hand is variable, it could be as little as two lines, as many as fifty or more. So it may be that this text needs to be added on the first or second, even third page of the PDF. If my understanding is correct there is no way of linking text boxes across pages (in the way you can in InDesign) so each page will have a separate text box and the onus will be placed on the user to page break their text themselves, meaning that this standard piece of text might need adding to the text box on a different page each time. Agreed, I could add it as default to each page and the user deletes what they don't need but that's a little messy.

Similar Messages

  • Adding text to PDF using iText instead of CFPDF

    Hi,
    I know this may seem a bit off topic being posted here but i'm asking this board since i'm a complete JAVA noob and i figure some of you CF folk might have had to do this before.
    Anyway, about my question...i'm already adding a watermark image to a pdf using iText (CF8) thanks to the help of fellow poster (=cfSearching=).  What i'm looking for is the best way to go about adding some text to this same pdf.  I need to add 4 lines of text (with specific font and size) and center it underneath the added image.   Does anyone have a site they could point me to as to how to add formatted text and how to get the width of that text so as to align it correctly?  I've search Google and looked at a lot of JAVA code but being a JAVA noob it's tough to figure out exactly which libs and methods can be used to do this. 
    Any help would be greatly appreciated!
    -Michael

    Hi again!
    Well, the merged image is an idea but i'd rather have it be actual text so that it is at least copy/paste-able if viewed on a computer.
    The four lines of text are dynamic (company name, broker name, phone number, email address) and limited to 40 characters.  Right now they are being added via CFPDF and DDX and use the following code in the DDX file to add it to the PDF.
    <PDF result="DestinationFile">
         <PDF source="SourceFile">
              <Watermark
              rotation="0"
              opacity="100%"
              horizontalAnchor="#horzAnchor#"
              horizontalOffset="#horzOffset#"
              verticalAnchor="#vertAnchor#"
              verticalOffset="#vertOffset#"
              alternation="OddPages"
              >
                   <StyledText text-align="center">
                        <p font="#font#" color="#color#" >#left(dCompany,maxlinechars)#</p>
                        <p font="#font#" color="#color#" >#left(dName,maxlinechars)#</p>
                        <p font="#font#" color="#color#" >#left(dPhone,maxlinechars)#</p>
                        <p font="#font#" color="#color#" >#left(dEmail,maxlinechars)#</p>
                   </StyledText>
              </Watermark>
         </PDF>
    </PDF>
    Then using the created pdf from above, i use a slightly modified version of the cfscript code ( that uses iText) you provided me previously to add a logo image just above this text.  The only changes i made to it were resizing of the image and adding where to place it.  Here is that code:
    <cfscript>                    
        fullPathToInputFile = "#tempdestfilepath#";
         writeoutput("<br>fullPathToInputFile=#fullPathToInputFile#");
        fullPathToWatermark = osFile("#request.logofilepath##qord.userlogo_file#",request.os);
         writeoutput("<br>fullPathToWatermark=#fullPathToWatermark#");
        fullPathToOutputFile =  "#destfilepath#";
         writeoutput("<br>fullPathToOutputFile=#fullPathToOutputFile#");
         ppi = 72; // points per inch
         watermark_x =  ceiling(#qord.pdftemplate_logo_x# * ppi);      // from bottom left corder of pdf
         watermark_y =  ceiling(#qord.pdftemplate_logo_y# * ppi);     // from bottom left corder of pdf
         fh = ceiling(0.75 * ppi);
         fw = ceiling(1.75 * ppi);
       if( not fileexists(fullPathToInputFile) )
                  savedErrorMessage = savedErrorMessage & "<li>Input file pdf for logo add does not exist<br>#fullPathToInputFile#</li>";
       else
                 try {
                 // create PdfReader instance to read in source pdf
                 pdfReader = createObject("java", "com.lowagie.text.pdf.PdfReader").init(fullPathToInputFile);
                 totalPages = pdfReader.getNumberOfPages();
                 // create PdfStamper instance to create new watermarked file
                 outStream = createObject("java", "java.io.FileOutputStream").init(fullPathToOutputFile);
                 pdfStamper = createObject("java", "com.lowagie.text.pdf.PdfStamper").init(pdfReader, outStream);
                 // Read in the watermark image
                 img = createObject("java", "com.lowagie.text.Image").getInstance(fullPathToWatermark);
                    w = img.scaledWidth();
                   h = img.scaledHeight();
                   //$is[0] = w
                   //$is[1] = h
                   if( w >= h )
                      orientation = 0;
                  else
                      orientation = 1;
                      fw = max_h;
                      fh = max_w;
                  if ( w > fw || h > fh )
                      if( ( w - fw ) >= ( h - fh ) )
                          iw = fw;
                          ih = ( fw / w ) * h;
                      else
                          ih = fh;
                          iw = ( ih / h ) * w;
                      t = 1;
                  else
                      iw = w;
                      ih = h;
                      t = 2;
                 // adding content to each page
                 i = 0;
                 //while (i LT totalPages) {
                     i = i + 1;
                     content = pdfStamper.getOverContent( javacast("int", i) );
                     img.setAbsolutePosition(javacast("float", watermark_x), javacast("float", watermark_y));
                        if(t==1)
                             img.scaleAbsoluteWidth( javacast("float", iw) );
                             img.scaleAbsoluteHeight( javacast("float", ih) );
                     content.addImage(img);
                     WriteOutput("Watermarked page "& i &"<br>");
                 //WriteOutput("Finished!");
                 catch (java.lang.Exception e) {
                 savedErrorMessage = savedErrorMessage & "<li>#e#</li>";
             // closing PdfStamper will generate the new PDF file
             if (IsDefined("pdfStamper")) {
                 pdfStamper.close();
             if (IsDefined("outStream")) {
                 outStream.close();
    </cfscript>
    The above code resized the image to a certain width/height if needed and adds it to the pdf. 
    I just figured they might be a way to tap into one of the java objects that would allow adding the text.  Ideally, adding the text and image to some sort of 'bounding box' that would allow centering of the image and text in relation to that bounding box.  Or if there is no way to add to a bounding box, a way to get the horizontal length of the longest line of text so i could calculate a common centerline for the image and text.
    I've attached the following pdf to show how the image and text would look together.  This example is not to scale but a similar image and text would be added to a separate pdf.
    Thanks for you help.

  • Adding text (editing) while using Adobe on an iPad

    Can I make Adobe allow me to edit or add text while doing so on my iPad? I cannot figure it out yet, my laptop is easy to do this with.

    Hi,
    You can add or edit Text annotations in Adobe Reader for iOS.
    Open a PDF document.
    Tap the Comment icon in the top bar.
    Tap the Text annotation icon in the bottom bar.
    Tap where you want to add text.
    Enter text in the popup window.
    Tap Save.
    A new Text annotation appears in the PDF document.  You can tap it to display a context menu to
    Edit the text
    Change the font size
    Change the text color
    Delete the text
    You can also move the text annotation by tapping it once and dragging it to where you want to move it to.
    Hope this helps.

  • How do I edit or remove text automatically added to a DITA layout?

    I'm evaluating FM11 with an eye toward using it to author our print manuals (along with all the reuse stuff that DITA will allow). I have some experience with DITA authoring in other applications, but FM is new to me.
    It's going to be up to me and a colleague to demonstrate how FM is an improvement over our current manual process (InDesign). One thing we need to demonstrate in particular is how we'll retain complete control over layout appearances (something we don't easily get in our other XML authoring tool).
    I've been playing with the "New" DITA task/reference/concept templates as they open, and I'm troubled to see that text automatically appears in some places and I can't edit it or delete it. For instance, an <info> tag adds the text "ADDITIONAL INFORMATION". We may not want that text to appear in our layouts, or we may want to change it. At the very least, I'll need to demonstrate that I have control over text like this. 
    I've looked through Reference Pages, EDDs, DTDs, INIs, and several other places, and I can't nail down the source of the (potentially) unwanted text. Can someone point me in the right direction?

    Hi ohnehosen...
    These strings are defined in the EDD, as autonumber text in the paragraph style, or on the reference pages. It sounds like you've checked all those places, but they *are* there. One problem that you may be running into with FM11 is that you're likely using DITA 1.2, and for DITA 1.2 there is a separate structure application for each topic type. That means you'll have different EDDs and templates to search through. If you modify an EDD you'll be needing to import that into the corresponding template.
    I strongly suggest that instead of modifying the default structure apps, you first clone the defaults to names of your own. Then you modify your custom apps and leave the default apps available unmodified for testing. You *will* break the apps at some point (everyone does), and without the default unmodified apps available for testing.
    If you don't need the DITA 1.2 model, you might consider using the DITA 1.1 apps, which (I believe) are just one app for all topic types.
    OR .. if you want a far simpler and reliable option for PDF publishing from DITA, you might check out DITA-FMx. This is a product that I sell, but it provides enhanced DITA authoring and publishing tools in FrameMaker ..
        http://leximation.com/dita-fmx/
    Cheers,
    ...scott
    Scott Prentice
    Leximation, Inc.
    www.leximation.com

  • Why does Preview automatically resize the text box to cut off the last character of added text? How do I fix it?

    Why does Preview automatically resize the text box to cut off the last character of added text? How do I fix it?
    I use the Tools > Annotate > Add Text feature, and when I click away after adding text, it automatically changes the text box size such that the last letter -- or last word -- gets bumped off into an invisible line below it, forcing me to manually adjust every single text box. It is highly annoying when trying to complete PDF forms (e.g. job applications).
    It appears to be a glitch, quite honestly, an error resulting from Apple's product design. Has it been fixed in the new operating system (for which they want $30)?
    I would very much appreciate any help you can provide! Thank you for your time.

    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • How to use a radio button in enabling/disabling a text box in report progra

    Hi,
        Could any please let me know, how to use a radio button in enabling/disabling a text box in report program.

    *& Report  ZMR_RADIO_BUTTONS
    REPORT  ZMR_RADIO_BUTTONS.
    PARAMETERS : R1  RADIOBUTTON GROUP G1,
                 R2  RADIOBUTTON GROUP G1.
    PARAMETERS : A1 TYPE I,
                 A2 TYPE I.
    AT SELECTION-SCREEN OUTPUT.
    *initialization.
    IF R1 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF R2 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    modify screen.
    ENDLOOP.
    ENDIF.
    START-OF-SELECTION.
    *IF R1 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 1.
    ENDIF.
    *ENDLOOP.
    *ENDIF.
    *IF R2 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 0.
    ENDIF.
    *ENDLOOP.
    *ENDIF.

  • Text Variable through Customer Exit  using FM MONTH_NAMES_GET

    Hi Friends,
    I have a query which runs through a variable Key date(ZPDATE). (Key date may also be changed by the user).
    I have another customer exit variable(ZVNDATE1) where it reads  from the Keydate variable and it represents one month less than the key date and it holds two dates first day of month and last day of month.
    Let say: Key date(ZPDATE) = 12.03.2008
                 ZVNDATE1 = 01.02.2008 and 28.02.2008
    I have created  RKF Overdues-1 ristricted with ZVNDATE1.
    My requirement is I wan to represent this RKF Overdues-1 as Feb 2008 . In order to do that I want to create a Text variable(ZTEXT1) using customer exit .
    As I am not very good in ABAP please can anybody provide me the code for text variable:
    I am writing in the below.. but I dont know how to represent FM..etc..
    WHEN 'ZTEXT1'.
            READ TABLE i_t_var_range INTO w_var_range WITH KEY vnam = 'ZVNDATE1'.
            IF SY-SUBRC = 0.
              CLEAR l_s_range.
              l_date = w_var_range-low.
                       CALL FUNCTION MONTH_NAMES_GET'
    Please can you provide me the remaing code..
    Thanks
    Sudhakar..

    Hi Sudhakar,
    Instead what you can do is, add few more lines of code instead of calling fm.
    case 'month'.
    If month = '1'.
      desc = 'jan'.
    elseif month = '2'.
      desC = 'feb'.
    endcase.
    concatenate desc year into w_v_range-low.
    Hope that helps.
    Thanks

  • In have added text to my photos on my mac. Is it possible to transfer that text to the same photos on my iPad which I then display on my TV using Apple TV.

    I have added text to my photos on my iMac. Is it possible to transfer this text to my iPad so that I can view the photos with text on my TV using Apple TV.

    How did you add the text to the photo in the first place?
    OT

  • Adding text to a button.

    Can anyone tell me how to add text to a button I created? If it changes anything, it is a sub-menu button

    Hi:
    Sorry if it sounds like a RT_M answer, but look in the User Manual for the topic Adding Text to a Button and you'll get the step by step procedure.
    If it don't answer your question or you mean something different come back please !
      Alberto

  • Adding text to indesign pages with specific font ,size,and color using javascript

    Hello,
    Using javascript i am able to add some text to each page of an indesign file.
    myNewText = "SOME TEXT"
    myTextFrame = myPage.textFrames.item(0);
    tempframe = myTextFrame.contents;
    myTextFrame.contents =  myNewText + tempframe ;
    But i want to specify the font used,size and color for that text.
    When i try the code mentioned in indesign javascript scripting guide
    myNewText .appliedFont = app.fonts.item("Times New Roman");
    myNewText .fontStyle = "Bold";
    nothing gets changed and font family already used stays the same.
    How can i do that only for the added text and not for the whole content?I dont want to add the text to a new text frame I want to append it to the existing text frame.
    And is there a way to specify font size too?
    thank you

    There's a mixup going on here. Let's see if we can sort out some of it
    at least.
    If you just want to add new text to an already existing text frame,
    that's easy:
    myTextFrame.contents += "Hello";
    But if you want the new text to have unique formatting, it's a little
    more complicated.
    There are two simple ways to do it, I think:
    1. Create a temporary text frame, as you have done, and add the text,
    and format everything in there. Then move() that formatted text to the
    end of myTextFrame and delete the temporary frame:
    tempFrame = app.activeDocument.textFrames.add();
    tempFrame.contents = "New Text";
    tempFrame.paragraphs[0].appliedFont = app.fonts.itemByName("Times New
    Roman"); // etc...
    tempFrame.paragraphs[0].move(myTextFrame.insertionPoints[-1],
    LocationOptions.AFTER);
    tempFrame.remove();
    2. The other option, is to add the text directly to your textFrame. But
    if you want to format only that text, you have to store where the text
    started:
    myTextFrame = app.selection[0];
    firstInsertionPoint = myTextFrame.insertionPoints[-1].index;
    myTextFrame.contents += "New Text";
    myAddedText =
    myTextFrame.characters.itemByRange(myTextFrame.insertionPoints[firstInsertionPoint],
    myTextFrame.insertionPoints[-1]);
    myAddedText.appliedFont = app.fonts.itemByName("Trajan Pro"); // etc.
    What you've done in your sample script, however, is to try to apply a
    font to a simple JavaScript string. It won't work, but the way you did
    it, it won't throw an error either, because in fact you've created a new
    property of your string. (myString = "Hello"; myString.appliedFont =
    "Times"; // myString now has a Javascript property called appliedFont --
    but that's nothing to do with InDesign!)
    HTH,
    Ariel

  • When I get a text message from my brother or sister who have IPhones there is no text but there is a "download" button.  If I tap the download button it beeps but there is no download. My galaxy note 4 uses verizon messages   app.  how do I get these text

    when I get a text message from my brother or sister who have IPhones there is no text but there is a "download" button.  If I tap the download button it beeps but there is no download. My galaxy note 4 uses verizon messages app.  how do I get these text messages?

    Picture messages without a texting plan are 25 cents each.  Better than the $1.99 or $2.99 from the online store....
    Attaching to an email would not work as mobile email does "do" attachments. 
    Sending to your online album will use text messages, I believe.  Better to use a micro SD card, save to the card, and transfer them to your computer that way.

  • What listener do you use for adding text to JTextField?

    what listener do you use for adding text to JTextField?
    I have a component which adds some text to my JTextField, and I want to pick up this event. I have tried ActionListener with no effect.
    cheers,
    Olly

    jtextField.getDocument().addDocumentListener();
    The DocumentListener implements:
    changeUpdate() insertUpdate() removeUpdate().
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/event/DocumentListener.html

  • Text Message- Cannot use Send button

    I have the original iphone and since the new upgrade, I cannot use the send button when responding to a conversation. Is anyone else having this trouble? Can anyone else help me resolve this?

    Yes absolutely, exactly the same. No solution, sorry.

  • Adding text field to e-mail subject

    Hi all,
    I've got a button on my form that should submit the form in pdf format, to a fixed mail address with a fixed subject message, that has variable content dragged from a text field, i.e "Subject; New e-DCR <TextField12.rawValue>"
    Firstly, I got everytihng working with an automatic Submit by E-mail button, but couldn't solve the subject line text issue.  Next, I added a normal button, with a Regular controil type, & tried the following script (from another forum post) under the Click event in script editor - now, the button won't even fire....
    var Mailto = "[email protected]";
    var Subject = "New e-DCR" + TextField12.rawValue;
    var Mail = "mailto:" + Mailto + "?Subject=" + Subject;
    event.click.submitForm({
    cURL: Mail,
    bEmpty: true,
    cSubmitAs: "PDF"
    I'm a complete n00b at scripting, so any advice & help would be very much appreciated.  Thanks!

    Hi Ian,
    This can be done by using a dummy submit button.  Try the following.
    Drag a button into the form. Lets name it as DummySubmitButton. Then in the control Type select Submit. In the Presence dropdown select Invisible.Then select Submit tab next to Field tab.Then in the SubmitURl mention the url you want to send. Like this - mailto:[email protected] Select Submit As XML/ PDF as you want. This button will not be visible in the form.
    Now drag another button. Lets name as SubmitButton. This will be visible in the form. It will be or regular control type. In the click event of this SubmitButton write the following code
    DummySubmitButton.event__click.submit.target = "mailto:[email protected]" + "?subject=" + "New e-DCR " + TextField12.rawValue ;
    DummySubmitButton..execEvent("click");
    What this script will do is it will use set the submit functionality like mailto, Subject before submitting. After setting these parameters finally the click event of the dummy button would be called and it will submit the form.
    Hope this helps.
    Thanks,
    Bibhu.

  • Navigating Through Groups of Radio Buttons

    Hi,
    I am having a problem navigating through groups of radio buttons.
    I have several groups of radio buttons, I tab to the first radio button and then press the down arrow to move to the next radio button in the list.
    When I press the down arrow the focus does not go to the next radio button in the list. The radio buttons appear to be selected in a random order.
    I have made sure that the buttons are listed in the same order in the hierarchy. I have also arranged the buttons so they appear in alphabetic order. This doesn't seem to make any difference.
    Any ideas???
    Thanks in advance,
    Emma

    I was trying to use the script in this example to solve a similar problem I'm having with a radio button group that started acting strange when I added a script to it. However, the checkboxes are not acting like radio buttons. Meaning I can click multiple values and I only want 1 of the 4 options clicked. So, when I check the 2nd box I want the 1st to go away and it doesn't.
    Here is my code, I've got 4 checkboxes (used to be radio buttons) and a text field at the end that appears if the last option is checked. Can someone tell me what I've done wrong?
    1st checkbox:
    if (this.rawValue == "Yes") {
    this.access = "protected";
    form1.subform3.TruthDataDIS.access = "open";
    form1.subform3.TruthDataDIS.rawValue = "No";
    form1.subform3.TruthDataTENA.access = "open";
    form1.subform3.TruthDataTENA.rawValue = "No";
    form1.subform3.TruthDataOther.access = "open";
    form1.subform3.TruthDataOther.rawValue = "No";
    2nd checkbox:
    if (this.rawValue == "Yes") {
    this.access = "protected";
    form1.subform3.TruthDataHLA.access = "open";
    form1.subform3.TruthDataHLA.rawValue = "No";
    form1.subform3.TruthDataTENA.access = "open";
    form1.subform3.TruthDataTENA.rawValue = "No";
    form1.subform3.TruthDataOther.access = "open";
    form1.subform3.TruthDataOther.rawValue = "No";
    3rd checkbox:
    if (this.rawValue == "Yes") {
    this.access = "protected";
    form1.subform3.TruthDataDIS.access = "open";
    form1.subform3.TruthDataDIS.rawValue = "No";
    form1.subform3.TruthDataHLA.access = "open";
    form1.subform3.TruthDataHLA.rawValue = "No";
    form1.subform3.TruthDataOther.access = "open";
    form1.subform3.TruthDataOther.rawValue = "No";
    4th checkbox:
    if (this.rawValue == "Yes") {
    form1.subform3.TruthDataOtherName.presence = "visible";
    form1.subform3.StaticText36.presence = "visible";
    this.access = "protected";
    form1.subform3.TruthDataHLA.access = "open";
    form1.subform3.TruthDataHLA.rawValue = "No";
    form1.subform3.TruthDataDIS.access = "open";
    form1.subform3.TruthDataDIS.rawValue = "No";
    form1.subform3.TruthDataTENA.access = "open";
    form1.subform3.TruthDataTENA.rawValue = "No";
    else {
    form1.subform3.TruthDataOtherName.presence = "invisible";
    form1.subform3.StaticText36.presence = "invisible";
    Thanks in advance for your assistance,
    Debra

Maybe you are looking for

  • Error in using one interface in other

    Hello, I have two interfaces , interface1 & interface 2 . Interface 1 is a temp which is used by interface2 as a source. I'm trying to set the property "Use Temporary interface as derived table" but the check box is disabled and i cannot modify it. ,

  • DIfferents BSOD since I updated to Windows 8.1

    I dont know anymore what to do I already received a lot of different BSOD crashes.  "APC INDEX MISMATCH", "DRIVER_IRQL_NOT_LESS_OR_EQUAL (Netwsw00.sys)", "UNEXPECTED KERNEL MODE TRAP", "IRQL_NOT_LESS_OR_EQUAL"  I already formatted my notebook changed

  • TIME IS WRONG

    I have this weird bug that occurs at least once a day where the time changes on it's own, usually setting itself more than 2 hours ahead of the actual time.  I do have the "Set Automatically" switched turned to on, as well as location services.  To c

  • ICloud could not be activated because of a server error.

    Hello, I am having issues getting connected to iCloud from my Macbook Pro Late 2013. I have no problems logging in. I accept the terms and conditions and immediately get an error: Server Error iCloud could not be activated because of a server error.

  • Selecting from 2 pages using button HELP!!

    i have 2 buttons in my application. i need to open 2 different jsp pages from 2 butttons. i.e if a user clicks on 1 button he should be redirected to 1 page and if he clicks another button he should be redirected to another page. help please