Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators
We're using v220.127.116.11 and are using the PXCp_ APIs to combine multiple PDFs into a single PDF. We use APIs such as PXCp_OptimizeFonts etc to help control the output of the combined PDF.
However, what we need to do is to force all fonts to be embedded (so that when printing or users viewing on screen there are no issues over missing fonts) - I have found PXC_SetEmbeddingOptions which would seem to do the job but this API is not compatible with the PXCp_ ones - or is it?
Any help on how I can achieve this would be greatly appreciated.
About PXC_... and PXCp_... functions you are right - they cannot be mixed becuse usage of different documents for different purposes (creation new pdf and modifying existing).
There is two ways how to embedd fonts, both require creation of new file.
1. If file contain only text and raster images (no vector drawings such lines, etc) you can try to extract text and images using xcpro library and create new pdf file using pxclib library. BUT:
- If pdf file containg any drawings they will be lost.
- Text in pdf file may be readable on screen but not extractable as unicode or ASCII text (in case when font is embedded and use custom embedded encoding without supplying ToUnicode table). In this case it will be converted to different characters and text beacme unreadable.
- If you system does not contain fonts, corresponding used into PDF file it will look different.
- You will lost annotations and almost all interactive features (only bookmarks may be readed and transferred).
2. You may print existing pdf file to virtual printer to produce new PDF. It will look almost same as original, BUT:
- You will lost all interactive features (ok, bookmarks may be transferred later).
- Resulting file may be seriously larger - some PDF objects will be rasterised when printing, including text.
- In general all embedded fonts will look same as in original pdf, but text cannot be extracted from result (in will contain glyph indexes instead of character codes).
So best solution to ensure that all fonts are embedded - do this during pdf creation, later is too late.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
- Site Admin
- Posts: 8204
- Joined: Tue Jun 29, 2004 10:34 am
- Location: Vancouver Island - Canada