Am 10.02.2010 00:54, schrieb Leonard Rosenthol:
Using a font that already exists in a PDF is NOT a good
idea, because in almost all cases the embedded font is NOT complete.
It is most likely a subset embed, which means that it doesn't have the
full complement of glyphs. So what happens when you want to use a
glyph that isn't in the PDF?
Even for fonts that are "fully" embedded - that only means that the
glyphs are present, it does NOT mean that all other parts of the font
data are embedded. The PDF producer can (and many do) remove all sorts
of other information from the fonts including hinting and layout tables
that won't be needed to just render - BUT that you would need to do
your layout.
This is just one of the many reasons that you can NOT edit a PDF using
it's embedded fonts...
Leonard
On Tue, Feb 9, 2010 at 11:16 AM, Ulrich
Simon <[email protected]> wrote:
Hi!
We want to add some simple variable data printing (VDP) functionality
into our software and I am
about implementing a method with PoDoFo using PDF Forms.
I have a quite new build from PoDoFo (2010).
My problem:
I want to use the embedded (TrueType) font to create the
AppearanceStream for a text field.
There is no problem if I load a new font from harddisk. But when I try
to use
PdfFont* PdfFontCache::GetFont( PdfObject* pObject )
I get an PdfObject != NULL, but then
font->SetFontSize(fontSize);
fails. m_face is NULL. It seams it's not implemented yet.
Right?
Without the face I can not calculate the extents of the text.
Is there a special reason, why the function is not implemented?
I don't know if this could work:
PdfFontMetrics::PdfFontMetrics( FT_Library* pLibrary, PdfObject*
pDescriptor ) {
...
m_bufFontData = PdfRefCountedBuffer( nBufLen );
memcpy( m_bufFontData.GetBuffer(), #pContent#, #nContentLen# );
InitFromBuffer();
}
Thanks Leonhard!
Maybe I did not emphasize enough on the fact that we are using
AcroForms (or XFA Forms as well)
for this reason. Since every PDF Viewer capable of handling PDF Forms
depends on a completely
embedded font and all further information to create the appearance
stream, there is a way for sure...
So again my question: How can I create a PdfFont object out of a
PdfObject of type "font", subtype
"TrueType" (or other font formats)?
I hope I do not need to do some "reverse engeneering" in the PoDoFo
source. Maybe I can get some
hints what to do or if this feature is planned. Since this is a feature
needed handling PDF Forms
PoDoFo should IMO implement this.
Ulrich
--
Ulrich Simon
www.dots-software.com
dots Software GmbH - Schlesische Straße 27 - 10997 Berlin, Germany
Telefon: +49 - (0)30 - 695 799 - 47
Fax: +49 - (0)30 - 695 799 - 55
Amtsgericht Berlin Charlottenburg HRB 65201
Geschäftsführer: Ken Osuga, Olaf Lorenz
|
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users