Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / Slow PDF creation / loading
Author Message
cephas78
# Posted: 23 Dec 2008 01:30


I may have found a problem with converting the HTML tables created for the Device Log into PDF format. It appears that the HTML to PDF process creates many unnecessary empty (filled only with spaces) PDF Text tags example is below. These extra tags are making the file unusable, Acrobat Reader needs to do a lot of thinking if you just scroll down a page.

I did a search and replace on all of these blank tags to delete them all and the pdf looks the same but is actually useable :).

The number of rows in the table is probably about 3000 (I had to hard code a limit to the number of rows because it took too long).

The version of PDF Creator Pilot 2 is 2.2 and the version of HTML2PDF Add on is 1.2. I am using Borland C++ Builder 5, and Acrobat reader 8.

I don't know if this is a problem with how I am creating the file or if it's just how these tools work. If possible (for stability and time) we would like to keep the current version of these tools. Is there something like a property which will disable this extra data?


The "Empty" PDF tag example is below

BT
1 0 0 -1 0 0 Tm
1 0 0 -1 0 13.117 Tm
1 0 0 -1 32.5 14782.117 Tm
/F1 18 Tf
( ) Tj
ET



The original HTML looks something like this (with some icons to boot). The icons are 16x16 24 bit. They don't appear to be the problem as I mentioned ealier - removing the tags makes the file usable and doesn't affect the look of the file.

<HTML>

<HEAD>
<META http-equiv="content-type" content="text/html;charset=iso-8859-1">
<META name="ResScan" content="Patient Report">
<TITLE>my test report template3</TITLE>
<STYLE type="text/css">
<!--
TR.LOGITEMCOLORED {
font-family:Arial;
background-color: #D1D1E7;
font-size:10pt;}
TR.LOGITEMDATE {
font-family:Arial;
background-color: #A1A1B7;
color: white;
font-size:14pt;}
TD.STATHEADING
{border:none;border-top:solid windowtext 0.5pt;
borderColor:black;
font-family:Arial;
font-size:10pt;}
-->
</STYLE>
</HEAD>

<BODY bgcolor="#ffffff">

<TABLE border=0 cellspacing=0 cellpadding=0>
<TR>
<TD class=STATHEADING colspan=3>
<DIV class=H3>Device Log</DIV></TD></TR>
<TH width=20% bgcolor="#BDBEE7">Type</TH>
<TH width=11% bgcolor="#BDBEE7">Time</TH>
<TH bgcolor="#BDBEE7">Description</TH>
<TR class=LOGITEMDATE>
<TD class=STATITEM colspan=3>
9/Jan/2007
</TD>
</TR>
<TR>
<TD class=STATITEM colspan=1>
<img src="pencil.ico" alt="Setting Changed"></img>
</TD>
<TD class=STATITEM colspan=1>
23:59:21
</TD>
<TD class=STATITEM colspan=1>
Some important settings event
</TD>
</TR>
<TR class=LOGITEMCOLORED>
<TD class=STATITEM colspan=1>
<img src="bell.ico" alt="Alarm"></img>
</TD>
<TD class=STATITEM colspan=1>
23:59:21
</TD>
<TD class=STATITEM colspan=1>
Some important alarm event
</TD>
</TR>
...

cephas78
# Posted: 23 Dec 2008 01:35


Tis me again, it appears my posting had the spaces removed from the PDF line () Tj.

Also forgot to say thanks in advance :)

Thanks in advance,

Peter

max.f
# Posted: 23 Dec 2008 02:46


Hello Peter,
Here http://www.colorpilot.com/html2pdfaddon.html you can download and try the latest versions of the PDF Creator Pilot and HTML2PDF Addon - 4.1.2387 and 3.9.60
and here http://www.colorpilot.com/pdfcreatorpilotmanual/Up grade_notes.html you can read how to update your code to use the latest versions of our libraries.

--
Max Filimonov

cephas78
# Posted: 28 Dec 2008 21:48


Hi Max,

That sounds like you are saying that upgrading is the only solution. Does my description match something that was fixed in the new version, or is this version going to behave the same way?

Thanks.

Peter

max.f
# Posted: 28 Dec 2008 22:17


Hi Peter,
a lot of things were fixed since version 2.*
Here the sample PDF file generated by PDF Creator Pilot v.4.1.2529.0
http://www.colorpilot.com/~max.f/test_4.1.2529.0.p df

Anyway, you may download and install demo versions of PDF Creator and HTML2PDF Addon for your tests.

--
Max Filimonov

cephas78
# Posted: 28 Dec 2008 22:31


Thanks Max,

Yes that PDF worked a lot better than what we are getting.

Cheers,

Peter

cephas78
# Posted: 1 Jan 2009 16:35


Hi Max,

I tried the upgrade and it did not improve the PDF performance. The number of rows in this table is about 1000. I tried using a the HTML2PDF Test program as well, but the results are the same. Just trying to scroll down the PDF can leave acrobat reader running at 50% of CPU usage (50% out of 2 CPUs) for 6 minutes. Certainly not a usable pdf. If you would like me to send you the original HTML just let me know.

Regards,

Peter

max.f
# Posted: 5 Jan 2009 05:44


Yes, please send me original HTML file (zipped) to max.f@colorpilot.com
I'll test it and inform our developers about text output optimization.

--
Max Filimonov

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.014

 

Page top