Solved

Fastest serve of generated PDF file....

Posted on 2007-11-16
1
597 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

735 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