I’ve had a look at the file (attached) and it’s the same as the one that was generated with PoDoFo. I’ve also tried uncommenting and defining PODOFO_HAVE_STRINGS_H, PODOFO_HAVE_ARPA_INET_H and PODOFO_HAVE_MEM_H and pointing them to their correct files, but no luck.
From: Michal Sudolsky <sudols...@gmail.com> Sent: 25 May 2021 18:15 To: Blayne Cullen <blay...@pulsonix.com> Cc: podofo-us...@lists.sf.net Subject: Re: [Podofo-users] Font size written differs from font size set. Maybe something is wrong with your "podofo_config.h"? On Tue, May 25, 2021 at 3:55 PM Blayne Cullen <blay...@pulsonix.com<mailto:blay...@pulsonix.com>> wrote: Hello PoDoFo Team, I have come across something interesting whilst attempting to use PoDoFo. When writing text to a pdf document using the tools/examples within the supplied podofo.sln work as they should. However, when writing text outside of the podofo.sln the text sizes appear wrong. I have even created an exact duplicate of the helloworld-base14 Project in an external solution but it still writes incorrect text sizes. Browsing the web I have come across other’s reporting similar problems but having found no solution, only temperamental work-arounds such as tweaking the Transformation Matrix until the correct result are achieved. Attached is a Pdf document that contains two outputs of the “helloword-base14” project; the first created from within the supplied podofo.sln and the second in a duplicate external solution. I have debugged into it a bit and saw that the first error it makes is in PdfPainter::DrawText(Ln 810) where m_pFont->GetIdentifier().GetName() is being used, it picks up a different name in the external solution to the internal solution. The errors continue down the line within this function as well. In addition to the Transformation Matrix work-around, it was also mentioned that the generated PoDoFo library was the cause of the problem. I’ve rebuilt the library many times using different building tools such as NMake and Visual Studio, using different versions of PoDoFo source files (0.9.7 and R2033) and with different versions of PoDoFo’s required libraries: FreeType, ZLib and Jpeg; all producing the same issue. My current/target environment are as follows: * Visual Studio 2017 * Freetype 2.10.4, Zlib 1.2.3 (preferably using 1.2.11), Jpeg-9d * Windows 10 (19041.985) 64bit * Target PoDoFo libraries: 32bit and 64bit using a shared library (dll) Some other things I have noticed (which may all lead to the same core issue) is that other functions that are used in other examples such as defining the document’s information (e.g. document.GetInfo()->SetCreator(…)) is throwing a NULLPTR error. Again this all works within the PoDoFo solution but not in any external solutions. I hope I have explained the situation well, but if you require any further details, please don’t hesitate to reply. Thanks, Blayne _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net<mailto:Podofo-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/podofo-users
/* Template filled out by CMake */ /* * *** THIS HEADER IS INCLUDED BY PdfCompilerCompat.h *** * *** DO NOT INCLUDE DIRECTLY *** */ #ifndef _PDF_COMPILERCOMPAT_H #error Please include PdfDefines.h instead #endif #define PODOFO_VERSION_MAJOR 0 #define PODOFO_VERSION_MINOR 9 #define PODOFO_VERSION_PATCH 7 /* PoDoFo configuration options */ #define PODOFO_MULTI_THREAD /* somewhat platform-specific headers */ #define PODOFO_HAVE_UNIQUE_PTR 1 /* #undef PODOFO_HAVE_STRINGS_H */ /* #undef PODOFO_HAVE_ARPA_INET_H */ #define PODOFO_HAVE_WINSOCK2_H 1 /* #undef PODOFO_HAVE_MEM_H */ #define PODOFO_HAVE_CTYPE_H 1 /* Integer types - headers */ #define PODOFO_HAVE_STDINT_H 1 #define PODOFO_HAVE_BASETSD_H 1 #define PODOFO_HAVE_SYS_TYPES_H 1 /* Integer types - type names */ #define PDF_INT8_TYPENAME int8_t #define PDF_INT16_TYPENAME int16_t #define PDF_INT32_TYPENAME int32_t #define PDF_INT64_TYPENAME int64_t #define PDF_UINT8_TYPENAME uint8_t #define PDF_UINT16_TYPENAME uint16_t #define PDF_UINT32_TYPENAME uint32_t #define PDF_UINT64_TYPENAME uint64_t /* Sizes of int64 and long, to pick proper printf format */ #define SZ_INT64 8 #define SZ_LONG 4 /* Endianness */ /* #undef TEST_BIG */ /* Features */ /* #undef PODOFO_NO_FONTMANAGER */ /* Libraries */ #define PODOFO_HAVE_JPEG_LIB /* #undef PODOFO_HAVE_PNG_LIB */ /* #undef PODOFO_HAVE_TIFF_LIB */ /* #undef PODOFO_HAVE_FONTCONFIG */ /* #undef PODOFO_HAVE_LUA */ /* #undef PODOFO_HAVE_BOOST */ /* #undef PODOFO_HAVE_CPPUNIT */ /* #undef PODOFO_HAVE_OPENSSL */ /* #undef PODOFO_HAVE_OPENSSL_1_1 */ /* #undef PODOFO_HAVE_OPENSSL_NO_RC4 */ /* #undef PODOFO_HAVE_LIBIDN */ /* #undef PODOFO_HAVE_UNISTRING_LIB */
_______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users