Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8189079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:09:18+00:00 2026-06-07T03:09:18+00:00

I want to get a pdf of post details , so I installed sfTCPDFPlugin.

  • 0

I want to get a pdf of post details , so I installed sfTCPDFPlugin. I’m a new to it so can any one help me with this?

How to generate PDF using sfTCPDFPilugin in symfony 1.4?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T03:09:19+00:00Added an answer on June 7, 2026 at 3:09 am

    The main problem you seems to have is to get the HTML output from your template to put it into the generated PDF. For that, you can use getPartial or getPresentationFor.

    • getPartial will render a partial
    • getPresentationFor will render a module/action

    I recommend you to use the getPartial. Create a partial with the content you want to extract (and by the way, you will be able to use the same partial elsewhere if you need the same information to be viewable as html).

    Assuming you create a partial called _my_partial.php, you can do that:

    public function executePdf()
    {
      $config = sfTCPDFPluginConfigHandler::loadConfig();
    
      /* put all your PDF configuration */
    
      $html = $this->getPartial(
        'my_partial', 
        // put in this array all variables you want to give to the partial
        array('posts' => $posts)
      );
    
      $pdf->writeHTMLCell(
        $w=0, 
        $h=0, 
        $x='', 
        $y='', 
        $html, 
        $border=0, 
        $ln=1, 
        $fill=0, 
        $reseth=true, 
        $align='', 
        $autopadding=true
      );
    
      $pdf->Output('example_001.pdf', 'I');
    
      throw new sfStopException();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to generate a PDF file using some data I get from a
I want to get my DIV over a PDF. This example works fine with
I am using http://wordpress.org/extend/plugins/pdf24-post-to-pdf/ pdf generator plugin for my site, but I only want
I want to read an existing PDF file, get not only the text, but
I want get the time used for a case so I can create an
I want to get 100 and example from this string ?connect:100/username:example/ I searched in
I want the user to submit a form and get a pdf back. Like
Form contains show PDF button which sends POST request. This post request shows pdf
I've tried using LaTeX and DocBook for documenting programming tools, to get PDF output.
I have a black and white image (or pdf) file, and want to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.