On Tue, 2017-04-04 at 21:47 +0200, frydery...@gmail.com wrote:
> When I try to use it in program, i got Access violation reading location 
> error on the line above.

        Hi,
PoDoFo::PdfDocument::CreateFontSubset() defines as its last argument:
  \param pszFileName optional path of a font file which should be used

Thus it expects a path for the font file, not font data as such. I
understood from your text that you embed as a resource the font file
into your executable or dll file, not only the path to it. Am I right?

PoDoFo itself has absolutely no idea about Windows executable/dll
resources. Even it has some API dedicated to WIN32, it doesn't deal
with resources of this kind.

You might want to consult some web search engine to get good examples
how to store data to executable/dll resources and how to get them out
of it (even Microsoft MSDN has good documentation and examples), but if
you still want to load font data (not font file) into PoDoFo, then you
want to change PoDoFo accordingly too, like to not use FT_New_Face(),
but FT_New_Memory_Face() or similar function to create the font loaded
in memory.
        Bye,
        zyx

-- 
http://www.litePDF.cz                                 i...@litepdf.cz

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to