Print Page | Close Window

Subseting fonts

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=2973
Printed Date: 28 Apr 24 at 7:57PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Subseting fonts
Posted By: BenLaz
Subject: Subseting fonts
Date Posted: 22 Sep 14 at 1:29PM
Hello,

We have "big pdf" that can be reduced seriously by external applications by subsetting fonts.

Today, we would like to do this operation ourselves, and we have no idea on how to do it with Debenu.

Does someone have an idea ?



Replies:
Posted By: Ingo
Date Posted: 26 Sep 14 at 12:46PM
Hi Ben,
 
already created pdf-files couldn't be compressed by QuickPDF on the fly.
You have to split the pdf into single pages, objects, ... and resample them to a new pdf using functions like CompressImages:
http://www.debenu.com/docs/pdf_library_reference/CompressImages.php" rel="nofollow - http://www.debenu.com/docs/pdf_library_reference/CompressImages.php
You should Keep in mind that Images have many Bytes and often there are jpg-images included which are already (as jpeg) compressed. So working on the images reducing the dpi will reduce much.
Defining/including font-properties and often used Images only once in the file can reduce, too.
 
Cheers, Ingo
 
 
 


-------------
Cheers,
Ingo



Posted By: BenLaz
Date Posted: 03 Oct 14 at 8:07AM
Thank you for your answer.

However, after analising the PDF (which doesn't have image), we found that the way to reduce it is subset the font.

Is there a way to subset the font ?


Posted By: mLipok
Date Posted: 16 Oct 14 at 6:10PM
BenLaz 
Did you try this:
http://www.debenu.com/docs/pdf_library_reference/ReplaceFonts.php



-------------
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600


Posted By: AndrewC
Date Posted: 18 Oct 14 at 2:10AM
Ben,

There are many different font types and then many different ways a font can be defined within a PDF so there is no sure way to update / trim a font without know all the parameters.

Here are some of the things that need to be accounted for

Encodings
CMaps
Differences
GIDToCID maps
ToUnicode (not so urgent)

The you need to determine the fonttype - Type1, Type3 etc..  Then you would need to extract the font descriptor and decode it to remove unused characters but make sure that you get the correct characters based on the encodings above.

We would need to see the PDF file to determine what was required to get it working correctly without making the text unreadable.

Andrew



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