How do I create a new line in a pdf document?

Hello,
What I am doing is taking a compilation of information from multiple tables, displaying it in a textarea, allowing a user to change the information that is present in the text area if they wish, and then allowing them to create a pdf file. I am able to do everything except that when the pdf file is created, there is no new like created when the pdf doc is created. I can display multiple lines by using:
<textarea name="all_content" cols="100" rows="30"><?php
        echo $row_getAllCont['first_name'].' '.$row_getAllCont['last_name']."\n";
        echo $row_getAllCont['email'];
        ?></textarea>
<?php $_POST['all_content'] = nl2br($_POST['all_content']); ?>
Then create the pdf doc by using:
$newpdf = pdf_new();
pdf_open_file($newpdf, "");
pdf_set_info($newpdf, "Creator", "Me");
pdf_set_info($newpdf, "Author", "Me");
pdf_set_info($newpdf, "Title", "Tryal");
pdf_set_info($newpdf, "Subject", "tryal");
pdf_begin_page($newpdf, 595, 842);
$newfont = pdf_findfont($newpdf, "Times-Roman", "host", 0);
pdf_setfont($newpdf, $newfont, 10);
pdf_show_xy($newpdf, $_POST['all_content'], 50, 750);
pdf_end_page($newpdf);
pdf_close($newpdf);
$newbuf = pdf_get_buffer($newpdf);
$newlen = strlen($newbuf);
header("Content-type: application/pdf");
header("Content-Length: $newlen");
header("Content-Disposition: inline; filename=gen06.pdf");
print $newbuf;
pdf_delete($newpdf);
?>
The problem is, when I want to display the first name and last name, and then email in the pdf, I want the email to display on another line only if email isn't set to NULL. I can get it to display in a webpage using the nl2br function but that doesn't work in pdf. Any ideas how to make this work?
Thanks,
Kelsey

Hi Robert,
Welcome!
I see you are subscribed to our PDF Pack service.
Check out this FAQ to help get you started!
Let me know if this helps.
Looking forward to hearing back from you!
Kind regards, Stacy

Similar Messages

  • How do I copy a few lines from a pdf document to a Word document?  I'm not looking to convert the whole document, just need to copy a few lines here and there.

    How do I copy a few lines from a pdf document to a Word document?
    I'm not looking to convert the whole document, just need to copy a few lines here and there.
    ps.  Wow, what a user UNFRIENDLY site this is!

    In most cases you can just select the text and copy/paste. You can do that unless the file is a picture/scan.

  • Does anyone know how I can create a text field in a pdf document that will multiply a total in another box?

    does anyone know how I can create a text field in a pdf document that will multiply a total in another box? I’m making an interactive pdf for an order form (attached), and I need to find a way for the “total quantity” number to multiply by 9 and total in the “Amount Due” box.

    Hey Gary,
    Have a look at this post: Re: horizontal scrolling similar to excel
    Andy's reply will show you how to make a table scroll horizontally, but it will be tough to accomplish it in some sort of easily replicable way. I am working on a JQuery extension that will help accomplish this, but I have had my time invested in another project at the moment.
    Good Luck,
    Tyson

  • How do i create a new line item (say 20) in reference to line item 10

    Hi all,
    I am trying to map a scenario where i want to create a new line item with reference to an existing line item. Where do i get this option in SD, and how could i go about it?
    Thanks & Regards
    Ravi

    > In ECC6 if u go to VA01 and enter the SP and SH,
    > Press Propose Item Icon, then one window will pop-up
    > asking for Sale Document Number, enter the Number and
    > select- selection list, there  u will get all the
    > line item of the Sale Doc. Select and copy Material
    Hi i am on SAP 4.7. How could be the same handled here?

  • How do i create a new line when writing to file

    I am trying to write a few stings to a file but i cant get them to print on seperate lines. They all end up together. I tried to include the \n in the string but that didnt work. Any suggestions? I thought that this part would be simple.

    http://forum.java.sun.com/thread.jsp?forum=54&thread=450725&tstart=0&trange=15

  • How can I creat a new folder?

    How can I creat a new folder?

    From the documents panel, press Edit:
    Then press the button that looks like a folder with a plus sign:

  • How to create a new line in label in Xcode

    How to create a new line in label. for example I have two buttons & one label. when i press first button, l want to change the label text to "Hello World". then when I press the second button, on the same label I need to display"Good Bye" on the next line in xcode 5?
    I want to display the lablel like below:
    Hello World
    Good Bye

    I am using Xcode to develop an app for iOS.
    I tried using multi-line label & belwo is my code.
    - (IBAction)change:(UIButton *)sender {
        self.Screen.text = @"\nHello World";
    - (IBAction)newChange:(UIButton *)sender {
          self.Screen.text = @"\nGood bye";
    everytime when i pressed the button, it replacing the whold lable text instead of adding the second line.

  • How to create a new line item automatically in CRMD_ORDER

    Hi,
    While creating a sales order in CRMD_ORDER, after user enters a line item say 'xxxx' and press 'Enter', we need to create a new line item say 'yyyy' dynamically.  Any ways of how to achieve this functionality?
    thanks in advance,
    amar.s

    Hi Amar
    You can use structured products:
    Step1:COMM_PR01
    Open Product xxxx > Relationships > Tab Component > Select Relationship type = STRSET Set > Assing product yyyy
    Step2: IMG > CRM > Transactions > Define Item Categories
    Open you item category and in Structure scope field select option A Single-Level Explosion of structured products
    Step3: IMG >  CRM > Transactions > Define Item Category Determination
    create new entry
    Transaction type =
    Item   category group = Category group of xxxx product
    main item cat = item cat of xxxx product
    item cat =  item cat of yyyy product
    now when you enter product xxxx , product yyyy will be automatically added
    Hope it helps
    Rupesh

  • How can I create a new page in pages, without creating a new section?

    how can I create a new page in pages, without creating a new section?

    Good morning graywright,
    It sounds as if what you are wanting to do in the Pages application is to insert a Page Break. Follow the steps in this article -
    Pages '09: Inserting a Page Break
    In a word processing document, click where you want the break to occur, and then choose Insert > Page Break. 
    To remove a page break, click at the beginning of the line that follows the break and press the Delete key.
    In a page layout document, to insert a new page in your document, click Pages in the toolbar and choose from the template page options available.
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • How do I create a new emkey for Enterprise Manager Database Control?

    Hi,
    I just installed 11gR2.
    I am evaluating it.
    How do I create a new emkey for Enterprise Manager Database Control?
    I tried various combinations of this command:
    emctl config emkey
    I did find a probable bug:
    $ emctl config emkey -emkey -emkeyfile emkey.ora -force -sysman_pwd he11ow0rld
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
    Undefined subroutine &EmKeyCmds::promptUserPasswd called at /u2/app/oracle/product/11.2.0/dbhome_1/bin/EmKeyCmds.pm line 160, <FILE> line 3.
    $
    Again,
    How do I create a new emkey for Enterprise Manager Database Control?
    I do have a copy of my old key but it is no longer good because I reinstalled the repository with these commands:
    emca -repos drop ...
    emca -repos create ...
    Oh, and where is emctl "documented".
    I poked around in some book-index links and with the search engine.
    I could not find anything.
    Thanks,
    -Janis

    user11892726 wrote:
    Oh, and where is emctl "documented".
    http://download.oracle.com/docs/cd/B16240_01/welcome.html

  • Create a new line in the xml-header structure.

    Hi,
    Can any one tell me how to create a new line in the xml-header structure.
    I am doing a IDOC-XI-HTTP scenario.
    Actually my mapping create this file:
    <b><?xml version="1.0" encoding="utf-8"?>
    <ORDERS05>
      <IDOC BEGIN="1">
        <EDI_DC40 SEGMENT="1"> </b>
    The result must look like this.
    <b><?xml version="1.0" encoding="utf-8"?>
    <ORDERS05>
      <IDOC BEGIN="1">
        <EDI_DC40 SEGMENT="1"> </b>
    Thanks and Regards,
    Eren

    Hi,
    thanks for you quick answer.
    I found a xsl script.
    It works fine.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" indent="yes"/>
       <xsl:template match="*">
          <xsl:param name="depth">0</xsl:param>
          <!-- New line with indenting. -->
          <xsl:if test="$depth > 0">
             <xsl:text>    </xsl:text>
          </xsl:if>
          <xsl:text>&#xA;</xsl:text>
          <xsl:element name="{name(.)}">
             <xsl:for-each select="@*">
                <xsl:attribute name="{name(.)}"><xsl:value-of select="."/></xsl:attribute>
             </xsl:for-each>
             <xsl:apply-templates>
                <xsl:with-param name="depth" select="$depth + 1"/>
             </xsl:apply-templates>
          </xsl:element>
       </xsl:template>
    </xsl:stylesheet>
    Best regards
    Eren

  • Text file - carriage return, creating a new line

    anyone know how to create a new line in a text file, something which is the text file equivelent of a BR (html) tag.

    in windows it's "\r\n"
    in linux/unix/bsd it's "\n"
    but the best way to do it is
    //this will return the newline character for whatever
    //platform your program is running on
    System.getProperty("line.separator");

  • How do i create o new style in ppages?

    I would like to have a list style that adds no extra space after the line feed and another list style that adds 1/2 line after the line feed.
    How do I create these new styles in Pages?
    thanks in advance,
    Ed

    We no longer have line feeds because we know longer have fixed line lengths. That is why it is called a text string and it just wraps to fit.
    Your model was back when the text was monospaced and there were 80 green characters per line on a black screen. I sure hope nobody is using ANSI anymore.
    Irregardless of the ancient history, you are talking about paragraph returns, not line feeds, because that is the only place space after applies.
    I don't have an iPad, which should be in a separate forum, but assume it all just is applied via paragraph styles wherever they may be.
    Peter

  • TS2756 How can i create a new usb connection (service)  on my iMac for sharing internet from my iPhone5 ( i seem have to deleted it )

    How can i create a new usb connection (service)  on my iMac for sharing internet from my iPhone5 ( i seem have to deleted it )
    i know its not a problem whit my carrier o data plan or sharing preferences on the ipone because when i use it un my laptop it works perfectly through
    the usb and even works on the Imac through wifi and bluethood tethering but NOT through usb!!.
    the problem is that trying to make it work i deleted the "profile" usb iphone on the network prefereces panel. Now i only have 3 options: ethernet / wifi / bluetooth
    but not the usb iPhone i used to have.
    And when i try to add a new one i dont get a USB option.
    can some one help me please??
    this is how it looks (after the bluetooth PAN i used to have USB iPhone option)

    The question would be more appropriate in the Mac forums as it is not really related to the iPhone.

  • How do I create a new icloud email address for my apple id?

    Hi there
    How do I create a new icloud email address for my apple id? My original email address is associated with my previous employers.
    When I send email from my Macbook, it seems as if I still work there, which is a problem.
    I would like to use the email address that I created for my iPad.
    When I login with my appleid (for my macbook) I keep getting the old company one, not the new one.
    Is there any way of resolving this? I
    Thanks
    Kelvin

    Welcome to the Apple Community.
    Providing you aren't trying to change you Apple iCloud email address you can make changes at My Apple ID

Maybe you are looking for

  • Report is not getting data from Remote cube thru Multi Provider

    Hi SAPians I ve strucked up with a Problem in The Reconciliation Report in BW3.5 The Report was built on a Multi Provider, which was created on Basic and Remote Cubes . Both cubes have same Data Source and all the Objects were in Active version and f

  • Korg micro37 keyboard turns off after a few seconds

    Hi all, My Korg micro37 keyboard turns itself off after about 4 seconds after I plug the keyboard in. Any idea why this happens? It doesn't happen on a Ubuntu 12.04 laptop, but does on another Arch laptop with 3.7.1 kernel. I had the same problem wit

  • Regular expressions to parse arithmetic expression

    Hello, I would like to parse arithmetic expressions like the following "5.2 + cos($PI/2) * -5"where valid expression entities are numbers, operations, variables and paranthesis. Until now I have figured out some regular expressions to match every typ

  • How to download Free Adobe Reader 9

    I am a novice and goofed. We had Version 9.0 installed. We received an email "Upgrade to the latest PDF Reader for Windows". In opening and seeing that it was only a free trial for version for version2012 i closed the site, I then somehow ended up wi

  • Updating Outlook Calendar with appointment

    Hey Guys!! I am trying to update outlook calendar with appointments. I did some research and could send the .vcs file as an attachment to the email. But the user has to open the email and double click the attachment and save it to add the appointment