Print Page | Close Window

TextColor and file size

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2818
Printed Date: 04 Apr 26 at 11:06PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: TextColor and file size
Posted By: lbcs
Subject: TextColor and file size
Date Posted: 30 Jan 14 at 8:24AM
Hi,
   I have to create a simple one-page pdf file with a couple of images and some text.
If I use only black text, as usual, I get a 51Kb pdf file. If I decide to write only one piece of text in blue (leaving the other text in black) the file becomes 65Kb. If I use more colours, no problem, the file remains 65Kb.
Does someone know the reason ?
 
I'm using QuickPDF DLL 8.13
 



Replies:
Posted By: AndrewC
Date Posted: 30 Jan 14 at 9:26AM
We would need to see and compare the PDF files to see what is happening and why the file sizes are different.

Using the following code I generated two files - 3.28KB and 3.33KB.

            QP.NewDocument();
            QP.SetOrigin(1);
            QP.DrawText(20, 20, "Black Text");
            QP.SaveToFile("out.pdf");

            QP.NewDocument();
            QP.SetOrigin(1);
            QP.DrawText(20, 20, "Black Text");
            QP.SetTextColor(0, 0, 1);
            QP.DrawText(20, 50, "Blue Text");
            QP.SaveToFile("out1.pdf");

You must be doing something else.  Are you sure you are re-using an existing font and not adding a whole new font ?

Andrew.


Posted By: lbcs
Date Posted: 05 Feb 14 at 10:02AM
You are right; I have to subset fonts because I need small size pdf files, and there was a mistake in my susbet procedure when I used colours, so I was adding extra-fonts.
 
Thank you



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk