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 8599055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:18:22+00:00 2026-06-12T01:18:22+00:00

i use Zend_Pdf to create a new pdf and then force the browser to

  • 0

i use Zend_Pdf to create a new pdf and then force the browser to download the file. The site is only accessible via https. This is my output for the file:

$output = $pdf->render();
$response = new Zend_Controller_Response_Http();
$response->setHeader('Content-Disposition', 'attachment; filename="xyz.pdf"');
$response->setHeader('Content-type', 'application/pdf');
$response->setHeader('Content-length', strlen($output));
$response->setHeader('Cache-Control', 'private');
$response->setHeader('Expires', '0');
$response->setHeader('Pragma', 'private');
$response->setBody($output);
$response->sendResponse();

I’ve read many articles regarding the right headers for this purpose, but something is not working in Internet Exporer 8. Everytime you try to generate and download the pdf the download dialog shows up but it says that theres nothing to download. The filename is wrong (instead of xyz.pdf it shows the name of the site the generating form is on)

Tested and working in: Firefox, Chrome, IE9, Opera, Safari

I also tried the different possibilities for the Cache-Controle header or Pragma Header, like so many articles talk about.

  • 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-12T01:18:24+00:00Added an answer on June 12, 2026 at 1:18 am

    Okay, third parameter is the overwrite option.

    $response->setHeader('Cache-Control', 'private', true);
    $response->setHeader('Expires', '0', true);
    $response->setHeader('Pragma', 'private', true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am using zend_pdf to create pdf files from persian language texts. i have
I use Zend Framework and have the following custom file (this is the only
I currently use zend_navigation via an XML file. However I need to overwrite the
We currently use PDForm to grab a blank pdf file (no values, just form
I'm trying to load a existing pdf file, and fill this with database information.
I want to use Zend_Rest_client to post a file to a certain url as
Can I use Zend_Translate to convert a data array into a csv file?
when you use the zend skeleton to start your new project and composer to
i use zend farmework.i have 2 ajax.one of my ajax proccess a file to
I use Zend_Navigation on my site. Most of the items are Zend_Navigation_Page_Mvc and NOT

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.