Solved

Fastest serve of generated PDF file....

Posted on 2007-11-16
1
609 Views
Last Modified: 2008-02-01
Hello all,

I am generating a PDF file using the FPDF library and FPDF2File also to help memory issue and generation speed. I have the 24MB average file down to 20 second to make and serve to users browser.

To increase perceived d'load speed I thought to output header at script begining to give browser time to load plugin while waiting for document though it seems as if it wants to actually start receiving the document to load reader plugin into IE or FF.

What I would like to know if it is possible, practical or wise to try to serve the document as it is being generated to disk, or is it possible to serve a file without knowing the final end size of the document. And, as the preview document is deleted right after serve then can it be done without corrupting document.

All code or knowledge on how to squeeze all speed out of this process possible appreciated.

Thank you for your time.
0
Comment
Question by:tcraigo5114
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 20

Accepted Solution

by:
steelseth12 earned 500 total points
ID: 20303356
at the end of every generate page you could call flush()
http://www.php.net/manual/en/function.flush.php
to output the buffer to the browser .
I also use fpdf but if performance is a big issue to you, then you should consider using pdflib which is faster than fpdf
http://www.php.net/manual/en/ref.pdf.php 
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question