Hello Dominik!

Now I fixed the source code so it works on VC 2010:

---------------------------------------------------------------------------------------------------------

PdfPagesTreeCache.cpp (line 79) [error]
        m_deqPageObjs.insert( m_deqPageObjs.begin() + nIndex, NULL );
->
        m_deqPageObjs.insert( m_deqPageObjs.begin() + nIndex, static_cast<PdfPage *>(NULL) );

PdfFontCache.cpp (line 503) [error]
        pMetrics = new PdfFontMetrics( &m_ftLibrary, pBuffer, nLen );
->
        pMetrics = new PdfFontMetricsFreetype( &m_ftLibrary, pBuffer, nLen );

PdfFontCache.cpp (line 565) [error]
        pMetrics = new PdfFontMetrics( &m_ftLibrary, pBuffer, nLen );
->
        pMetrics = new PdfFontMetricsFreetype( &m_ftLibrary, pBuffer, nLen );

PdfFontMetricsObject.cpp (line 43) [warnings]
    m_nFirst       = pDescriptor->GetDictionary().GetKeyAsLong( "FirstChar", 0L );
    m_nLast        = pDescriptor->GetDictionary().GetKeyAsLong( "LastChar", 0L );
->
    m_nFirst       = (int)pDescriptor->GetDictionary().GetKeyAsLong( "FirstChar", 0L );
    m_nLast        = (int)pDescriptor->GetDictionary().GetKeyAsLong( "LastChar", 0L );

PdfFontMetricsObject.cpp (line 99) [this is an error in VC2010 if there is no return value!]
->
    return 0.0;

PdfFontMetricsObject.cpp (line 115) [this is an error in VC2010 if there is no return value!]
->
    return 0;

---------------------------------------------------------------------------------------------------------

Is it possible to upload a compiled podofobrowser for windows? Maybe the sources are too
old to be compiled without changes now. It would be nice if the developer could do some maintenance
to its project!

Regards Ulrich


Am 22.06.2010 14:54, schrieb Ulrich Simon:
Hi!

I tried to compile the latest trunk version.
I get an error that PdfFontMetrics is abstract

#ifdef _WIN32
PdfFont* PdfFontCache::GetWin32Font( TISortedFontList itSorted, TSortedFontList & vecContainer,
                                     const char* pszFontName, bool bBold, bool bItalic,
                                     bool bEmbedd, const PdfEncoding * const pEncoding )
{
    ...
    PdfFontMetrics* pMetrics;
    PdfFont*        pFont = NULL;
    try {
        pMetrics = new PdfFontMetrics( &m_ftLibrary, pBuffer, nLen );
        ...
    }
   
    free( pBuffer );
    return pFont;
}
...
#endif

Maybe did something else wrong, but when I view the sources, I think the compiler is right.
I guess that the Windows-Version was noch updated correctly in the latest refactoring!?

    Ulrich

Here is the complete compiler output:

1>------ Build started: Project: podofo_shared, Configuration: Debug Win32 ------
1>  PdfFontCache.cpp
1>..\..\..\..\..\3rdparty\podofo\src\PdfFontCache.cpp(503): error C2259: 'PoDoFo::PdfFontMetrics' : cannot instantiate abstract class
1>          due to following members:
1>          'void PoDoFo::PdfFontMetrics::GetWidthArray(PoDoFo::PdfVariant &,unsigned int,unsigned int) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(51) : see declaration of 'PoDoFo::PdfFontMetrics::GetWidthArray'
1>          'double PoDoFo::PdfFontMetrics::GetGlyphWidth(int) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(57) : see declaration of 'PoDoFo::PdfFontMetrics::GetGlyphWidth'
1>          'void PoDoFo::PdfFontMetrics::GetBoundingBox(PoDoFo::PdfArray &) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(64) : see declaration of 'PoDoFo::PdfFontMetrics::GetBoundingBox'
1>          'double PoDoFo::PdfFontMetrics::CharWidth(unsigned char) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(137) : see declaration of 'PoDoFo::PdfFontMetrics::CharWidth'
1>          'double PoDoFo::PdfFontMetrics::UnicodeCharWidth(unsigned short) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(144) : see declaration of 'PoDoFo::PdfFontMetrics::UnicodeCharWidth'
1>          'double PoDoFo::PdfFontMetrics::GetLineSpacing(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(155) : see declaration of 'PoDoFo::PdfFontMetrics::GetLineSpacing'
1>          'double PoDoFo::PdfFontMetrics::GetUnderlineThickness(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(166) : see declaration of 'PoDoFo::PdfFontMetrics::GetUnderlineThickness'
1>          'double PoDoFo::PdfFontMetrics::GetUnderlinePosition(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(178) : see declaration of 'PoDoFo::PdfFontMetrics::GetUnderlinePosition'
1>          'double PoDoFo::PdfFontMetrics::GetStrikeOutPosition(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(190) : see declaration of 'PoDoFo::PdfFontMetrics::GetStrikeOutPosition'
1>          'double PoDoFo::PdfFontMetrics::GetStrikeoutThickness(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(202) : see declaration of 'PoDoFo::PdfFontMetrics::GetStrikeoutThickness'
1>          'const char *PoDoFo::PdfFontMetrics::GetFontData(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(218) : see declaration of 'PoDoFo::PdfFontMetrics::GetFontData'
1>          'PoDoFo::pdf_long PoDoFo::PdfFontMetrics::GetFontDataLen(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(223) : see declaration of 'PoDoFo::PdfFontMetrics::GetFontDataLen'
1>          'const char *PoDoFo::PdfFontMetrics::GetFontname(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(228) : see declaration of 'PoDoFo::PdfFontMetrics::GetFontname'
1>          'unsigned int PoDoFo::PdfFontMetrics::GetWeight(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(240) : see declaration of 'PoDoFo::PdfFontMetrics::GetWeight'
1>          'double PoDoFo::PdfFontMetrics::GetAscent(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(249) : see declaration of 'PoDoFo::PdfFontMetrics::GetAscent'
1>          'double PoDoFo::PdfFontMetrics::GetPdfAscent(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(257) : see declaration of 'PoDoFo::PdfFontMetrics::GetPdfAscent'
1>          'double PoDoFo::PdfFontMetrics::GetDescent(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(267) : see declaration of 'PoDoFo::PdfFontMetrics::GetDescent'
1>          'double PoDoFo::PdfFontMetrics::GetPdfDescent(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(275) : see declaration of 'PoDoFo::PdfFontMetrics::GetPdfDescent'
1>          'int PoDoFo::PdfFontMetrics::GetItalicAngle(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(281) : see declaration of 'PoDoFo::PdfFontMetrics::GetItalicAngle'
1>          'long PoDoFo::PdfFontMetrics::GetGlyphId(long) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(329) : see declaration of 'PoDoFo::PdfFontMetrics::GetGlyphId'
1>          'bool PoDoFo::PdfFontMetrics::IsSymbol(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(338) : see declaration of 'PoDoFo::PdfFontMetrics::IsSymbol'
1>..\..\..\..\..\3rdparty\podofo\src\PdfFontCache.cpp(503): error C2664: 'PoDoFo::PdfFontMetrics::PdfFontMetrics(PoDoFo::EPdfFontType,const char *,const char *)' : cannot convert parameter 1 from 'FT_Library *' to 'PoDoFo::EPdfFontType'
1>          There is no context in which this conversion is possible
1>..\..\..\..\..\3rdparty\podofo\src\PdfFontCache.cpp(565): error C2259: 'PoDoFo::PdfFontMetrics' : cannot instantiate abstract class
1>          due to following members:
1>          'void PoDoFo::PdfFontMetrics::GetWidthArray(PoDoFo::PdfVariant &,unsigned int,unsigned int) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(51) : see declaration of 'PoDoFo::PdfFontMetrics::GetWidthArray'
1>          'double PoDoFo::PdfFontMetrics::GetGlyphWidth(int) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(57) : see declaration of 'PoDoFo::PdfFontMetrics::GetGlyphWidth'
1>          'void PoDoFo::PdfFontMetrics::GetBoundingBox(PoDoFo::PdfArray &) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(64) : see declaration of 'PoDoFo::PdfFontMetrics::GetBoundingBox'
1>          'double PoDoFo::PdfFontMetrics::CharWidth(unsigned char) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(137) : see declaration of 'PoDoFo::PdfFontMetrics::CharWidth'
1>          'double PoDoFo::PdfFontMetrics::UnicodeCharWidth(unsigned short) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(144) : see declaration of 'PoDoFo::PdfFontMetrics::UnicodeCharWidth'
1>          'double PoDoFo::PdfFontMetrics::GetLineSpacing(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(155) : see declaration of 'PoDoFo::PdfFontMetrics::GetLineSpacing'
1>          'double PoDoFo::PdfFontMetrics::GetUnderlineThickness(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(166) : see declaration of 'PoDoFo::PdfFontMetrics::GetUnderlineThickness'
1>          'double PoDoFo::PdfFontMetrics::GetUnderlinePosition(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(178) : see declaration of 'PoDoFo::PdfFontMetrics::GetUnderlinePosition'
1>          'double PoDoFo::PdfFontMetrics::GetStrikeOutPosition(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(190) : see declaration of 'PoDoFo::PdfFontMetrics::GetStrikeOutPosition'
1>          'double PoDoFo::PdfFontMetrics::GetStrikeoutThickness(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(202) : see declaration of 'PoDoFo::PdfFontMetrics::GetStrikeoutThickness'
1>          'const char *PoDoFo::PdfFontMetrics::GetFontData(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(218) : see declaration of 'PoDoFo::PdfFontMetrics::GetFontData'
1>          'PoDoFo::pdf_long PoDoFo::PdfFontMetrics::GetFontDataLen(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(223) : see declaration of 'PoDoFo::PdfFontMetrics::GetFontDataLen'
1>          'const char *PoDoFo::PdfFontMetrics::GetFontname(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(228) : see declaration of 'PoDoFo::PdfFontMetrics::GetFontname'
1>          'unsigned int PoDoFo::PdfFontMetrics::GetWeight(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(240) : see declaration of 'PoDoFo::PdfFontMetrics::GetWeight'
1>          'double PoDoFo::PdfFontMetrics::GetAscent(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(249) : see declaration of 'PoDoFo::PdfFontMetrics::GetAscent'
1>          'double PoDoFo::PdfFontMetrics::GetPdfAscent(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(257) : see declaration of 'PoDoFo::PdfFontMetrics::GetPdfAscent'
1>          'double PoDoFo::PdfFontMetrics::GetDescent(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(267) : see declaration of 'PoDoFo::PdfFontMetrics::GetDescent'
1>          'double PoDoFo::PdfFontMetrics::GetPdfDescent(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(275) : see declaration of 'PoDoFo::PdfFontMetrics::GetPdfDescent'
1>          'int PoDoFo::PdfFontMetrics::GetItalicAngle(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(281) : see declaration of 'PoDoFo::PdfFontMetrics::GetItalicAngle'
1>          'long PoDoFo::PdfFontMetrics::GetGlyphId(long) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(329) : see declaration of 'PoDoFo::PdfFontMetrics::GetGlyphId'
1>          'bool PoDoFo::PdfFontMetrics::IsSymbol(void) const' : is abstract
1>          c:\work\trunk5\3rdparty\podofo\src\PdfFontMetrics.h(338) : see declaration of 'PoDoFo::PdfFontMetrics::IsSymbol'
1>..\..\..\..\..\3rdparty\podofo\src\PdfFontCache.cpp(565): error C2664: 'PoDoFo::PdfFontMetrics::PdfFontMetrics(PoDoFo::EPdfFontType,const char *,const char *)' : cannot convert parameter 1 from 'FT_Library *' to 'PoDoFo::EPdfFontType'
1>          There is no context in which this conversion is possible
1>  PdfFontMetricsObject.cpp
1>..\..\..\..\..\3rdparty\podofo\src\PdfFontMetricsObject.cpp(43): warning C4244: '=' : conversion from '__int64' to 'int', possible loss of data
1>..\..\..\..\..\3rdparty\podofo\src\PdfFontMetricsObject.cpp(44): warning C4244: '=' : conversion from '__int64' to 'int', possible loss of data
1>  Generating Code...
1>c:\work\trunk5\3rdparty\podofo\src\pdffontmetricsobject.cpp(110): error C4716: 'PoDoFo::PdfFontMetricsObject::GetGlyphWidth' : must return a value
1>c:\work\trunk5\3rdparty\podofo\src\pdffontmetricsobject.cpp(115): error C4716: 'PoDoFo::PdfFontMetricsObject::GetGlyphId' : must return a value






--
Besuchen Sie unseren Demo-Server - kostenlos & unverbindlich

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: Hideki Okamura, Olaf Lorenz

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to