[Podofo-users] Question about PdfFileSpec
Hello, I use PdfFileSpec object to embed a XML file into a PDF in the following manner : PdfNamesTree *names = GetNamesTree( true ); PdfFileSpec pEmbeddedFile( FilePath, true, Doc, true ); names->AddValue( "EmbeddedFiles", FilePath.BaseName(), *pEmbeddedFile.GetObject() ); It seems that two objets are created, one of them is not referenced except by the Xref table. The root object 7 0 obj << /Type /Catalog /Lang (fr-FR) /Names 9 0 R /OpenAction [ 1 0 R /XYZ null null 0 ] /Pages 4 0 R >> endobj 9 0 obj << /EmbeddedFiles 12 0 R >> endobj 12 0 obj << /Kids [ 13 0 R ] >> endobj 13 0 obj << /Limits [ (test.xml) (test.xml) ] /Names [ (test.xml) << /Type /Filespec /EF << /F 11 0 R >> /F (test2Exml) /UF (? t e s t . x m l) >> ] >> endobj 11 0 obj << /Type /EmbeddedFile /Filter /FlateDecode /Length 3401 /Params << /Size 17253 >> >> stream .. endstream endobj and the following not referenced object 10 0 obj << /Type /Filespec /EF << /F 11 0 R >> /F (test2Exml) /UF (? t e s t . x m l) >> endobj Is there a reason for this ? Kind regards, Patrice. ___ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users
[Podofo-users] Windows build on Podofo 0.9.5
Hello, My name is Patrice and I'm new with Podofo. I was able to build Podofo 0.9.5 on Linux Debian 7 without problem but it's a little bit more complicated on Windows with Visual Studio 2013. I've build the dependent libraries (jpeg9c, png1634, tiff 4.0.9, freetype 2.9, zlib 1.2.11) without any major problem. The libraries includes and libs are all stored in a 'root' directory which is accessed through an environment variable EXTERN_DEV ; the resulting architecture is (I just show zlib EXTERN_DEV (k:/extern_dev actually but can be changed) |- zlib |- 1.2.11 |- include |- lib Podofo reside on a different disk and directory than dependent libraries. When creating the cmake project targetting Visual Studio 2013, I've filled the required paths to include and library in this way ZLIB_INCLUDE_DIR=$(EXTERN_DEV)/zlib/1.2.11/include ZLIB_LIBRARY_DEBUG=$(EXTERN_DEV)/zlib/1.2.11/lib/zdll.lib ZLIB_LIBRARY_RELEASE=$(EXTERN_DEV)/zlib/1.2.11/lib/zdll.lib ... The configuration process find all the dependencies expressed with $(EXTERN_DEV) but the generation process prepends each include directories with the Podofo source code path, so include files are not found : H:\Src\podofo-0.9.5\build\vs2013; H:\Src\podofo-0.9.5; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\libjpeg\9c\include; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\libtiff\4.0.9\include; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\libpng\1.6.34\include; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\zlib\1.2.11\include; H:\Src\podofo-0.9.5\src; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\freetype\2.9\include\config; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\freetype\2.9\include; H:\Src\podofo-0.9.5\vcincludes; %(AdditionalIncludeDirectories) The library files used for linking are expressed correctly. Is there a way to correct this without modifying the VS solution by hand ? Thank you in advance Kind regards, Patrice. -- 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
Re: [Podofo-users] Windows build on Podofo 0.9.5
Hello Dmitry, It's the way I do, except that all the dependent library paths are expressed relative to the environment variable not with absolute paths. In the case of moving libraries elsewhere, I've just to change the env variable and re-generate the VS solution. In the case of absolute paths, I've to modify at least 12 (+9 if using SSL/idn) paths before re-generating the VS solution. Kind regards, Patrice. Dmitry Salychev a écrit : Hello, Patrice. Your configuration seems a bit complicated to me. Why not to specify all of the required paths using CMake GUI and generate a VS project? Regards, Dmitry -- 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
[Podofo-users] Windows build on Podofo 0.9.5
Hello, My name is Patrice and I'm new with Podofo. I was able to build Podofo 0.9.5 on Linux Debian 7 without problem but it's a little bit more complicated on Windows with Visual Studio 2013. I've build the dependent libraries (jpeg9c, png1634, tiff 4.0.9, freetype 2.9, zlib 1.2.11) without any major problem. The libraries includes and libs are all stored in a 'root' directory which is accessed through an environment variable EXTERN_DEV ; the resulting architecture is (I just show zlib EXTERN_DEV (k:/extern_dev actually but can be changed) |- zlib |- 1.2.11 |- include |- lib Podofo reside on a different disk and directory than dependent libraries. When creating the cmake project targetting Visual Studio 2013, I've filled the required paths to include and library in this way ZLIB_INCLUDE_DIR=$(EXTERN_DEV)/zlib/1.2.11/include ZLIB_LIBRARY_DEBUG=$(EXTERN_DEV)/zlib/1.2.11/lib/zdll.lib ZLIB_LIBRARY_RELEASE=$(EXTERN_DEV)/zlib/1.2.11/lib/zdll.lib ... The configuration process find all the dependencies expressed with $(EXTERN_DEV) but the generation process prepends each include directories with the Podofo source code path, so include files are not found : H:\Src\podofo-0.9.5\build\vs2013; H:\Src\podofo-0.9.5; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\libjpeg\9c\include; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\libtiff\4.0.9\include; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\libpng\1.6.34\include; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\zlib\1.2.11\include; H:\Src\podofo-0.9.5\src; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\freetype\2.9\include\config; H:\Src\podofo-0.9.5\$(EXTERN_DEV)\freetype\2.9\include; H:\Src\podofo-0.9.5\vcincludes; %(AdditionalIncludeDirectories) The library files used for linking are expressed correctly. Is there a way to correct this without modifying the VS solution by hand ? Thank you in advance Kind regards, Patrice. -- 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
Re: [Podofo-users] Windows build on Podofo 0.9.5
Hello Matthew and zyx, Sorry for the delay, I was called on another project until now. If I've used $(EXTERN_DEV), it's because it's the way VS projects use macros. I've tried many solutions like : set( EXTERN_DEV "$ENV{EXTERN_DEV}") and use ${EXTERN_DEV} in the definitions of paths. This case throws messages about policy CMP0019. Even, if I set this policy OLD, variables are evaluated but prepended with the project path resulting as : h:/src/podofo0.9.5/k:\extern_dev/zlib.1.2.11/include So it doesn't work... I found that CMake handles differently paths in INCLUDE_DIRECTORY and Path to files like libraries * Paths to libraries are left untouched * Include directories that are absolute paths are left untouched and others (including those that begin with variables) are handled as relative paths. I've found a way to handle this situation * I've created a symbolic link in the podofo root directory that refers EXTERN_DEV (mklink /d extern_dev %EXTERN_DEV%) * I've changed $(EXTERN_DEV) to extern_dev in each directory path to includes. * I've left $(EXTERN_DEV) in library paths. Link step fails if they are changed... * For install directory, $ENV{EXTERN_DEV}/podofo works It's a bit complicated but works... In the case of moving the EXTERN_DEV directory elsewhere, I've just have to modifiy my environment variable and the windows symbolic link. I've just to correct compilation errors in podofosign on Windows I don't understand why Linux doesn't have the same problem... Thank you to all for your help. Kind regards, Patrice. zyx a écrit : On 13.7.2018 at 10:48 Patrice Guérin wrote: ZLIB_INCLUDE_DIR=$(EXTERN_DEV)/zlib/1.2.11/include Hi, while Linux shell uses '$' to mark a variable for expansion, Windows uses '%' instead. If you've the cmake command part of some .bat file, then something like: cmake -G "..." -DZLIB_INCLUDE_DIR=%EXTERN_DEV%/zlib/1.2.11/include ... should do the trick. I mean, if you want the shell (command line) to expand the variable. Bye, zyx -- 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 -- 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
[Podofo-users] Windows build on Podofo 0.9.5, Episode 2
Hello, There is something strange in the CMake report about OpenSSL... I've compiled myself OpenSSL release 1.0.2o as a shared library and let the install process in the makefile do his job. So I've defined the CMake variables for LIBCRYPTO (aka libeay32) and SSL_EAY (aka ssleay32) the same way I've found in my previous post (but it's not the problem). LIBCRYPTO_INCLUDE_DIR : /openssl/1.0.2o/include LIBCRYPTO_LIBRARY_DEBUG : /openssl/1.0.2o/lib/libeay32.lib LIBCRYPTO_LIBRARY_RELEASE : /openssl/1.0.2o/lib/libeay32.lib OPENSSL_INCLUDE_DIR : /openssl/1.0.2o/include SSL_EAY_LIBRARY_DEBUG : /openssl/1.0.2o/lib/ssleay32.lib SSL_EAY_LIBRARY_RELEASE : /openssl/1.0.2o/lib/ssleay32.lib When I configure the CMake project, I get the following result : WANT_LIB64 unset; assuming normal library directory names Will install libraries to $ENV{EXTERN_DEV}/podofo/0.9.5/Windows/lib Found zlib headers in extern_dev/zlib/1.2.11/include, library at optimized;$(EXTERN_DEV)/zlib/1.2.11/lib/zdll.lib;debug;$(EXTERN_DEV)/zlib/1.2.11/lib/zdll.lib Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Performing Test PODOFO_HAVE_OPENSSL_1_1 Performing Test PODOFO_HAVE_OPENSSL_1_1 - Failed Found OpenSSL's libCrypto headers in extern_dev/openssl/1.0.2o/include, library at optimized;$(EXTERN_DEV)/openssl/1.0.2o/lib/libeay32.lib;debug;$(EXTERN_DEV)/openssl/1.0.2o/lib/libeay32.lib Could NOT find LIBIDN (missing: LIBIDN_LIBRARY LIBIDN_INCLUDE_DIR) Libidn not found. AES-256 Encryption support will be disabled Found LIBJPEG: optimized;$(EXTERN_DEV)/libjpeg/9c/lib/jpeg.lib;debug;$(EXTERN_DEV)/libjpeg/9c/lib/jpeg.lib Found libjpeg headers in extern_dev/libjpeg/9c/include, library at optimized;$(EXTERN_DEV)/libjpeg/9c/lib/jpeg.lib;debug;$(EXTERN_DEV)/libjpeg/9c/lib/jpeg.lib Found TIFF: optimized;$(EXTERN_DEV)/libtiff/4.0.9/lib/libtiff_i.lib;debug;$(EXTERN_DEV)/libtiff/4.0.9/lib/libtiff_i.lib Found libtiff headers in extern_dev/libtiff/4.0.9/include, library at optimized;$(EXTERN_DEV)/libtiff/4.0.9/lib/libtiff_i.lib;debug;$(EXTERN_DEV)/libtiff/4.0.9/lib/libtiff_i.lib Found PNG: $(EXTERN_DEV)/libpng/1.6.34/lib/libpng16.lib Found LibPng headers in extern_dev/libpng/1.6.34/include;extern_dev/zlib/1.2.11/include, library at $(EXTERN_DEV)/libpng/1.6.34/lib/libpng16.lib;optimized;$(EXTERN_DEV)/zlib/1.2.11/lib/zdll.lib;debug;$(EXTERN_DEV)/zlib/1.2.11/lib/zdll.lib Ensure you cppunit installed version is at least 1.12.0 Cppunit not found. No unit tests will be built. OpenSSL: Could not find the debug and release version of openssl OpenSSL: Disabling OpenSSL Found freetype library at optimized;$(EXTERN_DEV)/freetype/2.9/lib/freetype.lib;debug;$(EXTERN_DEV)/freetype/2.9/lib/freetype.lib, headers extern_dev/freetype/2.9/include Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Could NOT find Fontconfig (missing: FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR) Could NOT find Lua50 (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) Lua not found - PoDoFoImpose and PoDoFoColor will be built without Lua support Building multithreaded version of PoDoFo. Looking for pthread.h Looking for pthread.h - not found Found Threads: TRUE Building shared PoDoFo library Pkg-config not found. No pkg-config file will be created. Configuring done Generating done I don't understand why it couldn't find OpenSSL debug and release libraies and disabling OpenSSL... In fact, OpenSSL is not disabled at all... The C/C++ macro PODOFO_HAVE_OPENSSL is defined in podofo_config.h; Two new variables are created : SSL_EAY_DEBUG SSL_EAY_RELEASE each one is initialized with NOTFOUND. What is their meaning ? From my point of view, only the libraries (import librairies for shared libraries or static ones) with .lib suffix are useful for the linking process. Thank you in advance Kind regards, Patrice. -- 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 -- 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
[Podofo-users] Podofo 0.9.5, Install with debug and release shared library
Hello All, What is the best way to handle install process to have debug and release shared library together ? Visual Studio IDE doesn't make distinct names podofo.dll and import library podofo.lib depending of target configuration setting. Thank you in advance Kind regards, Patrice. -- 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
Re: [Podofo-users] Password protected document
Hello Mathew & Christophe, +1, no attachment. Kind regards, Patrice. Matthew Brincke a écrit : Hello Christophe, hello all, On 03 September 2018 at 17:49 BLANCHARD Christophe wrote: Hello all, I'm trying to read attached password-protected (password is 'password') am I the only one to have *not* received any attachment with that email, or has it been sent to the list with the attachment filtered away (without any notice in the mail body), or did you (Christophe) just inadvertently forget to attach it? (I'm sending to the list only to see whether I'm the only one affected by this.) Best regards, Matthew -- 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 -- 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
Re: [Podofo-users] Help on Podofo mingw-w64-x86_64-podofo 0.9.6-1 on msys2
Hello Gilles, Dependency walker can help to find which shared library is missing https://www.dependencywalker.com/ Kind regards. Patrice. Gilles Maire a écrit : Hello I installed mingw-w64-x86_64-podofo through msys2/pacman on windows 10 . I get a crash on podofo example file. With ntldd.exe all the dependancies are ok but on execution I got : ./podofoexample.exe podofoexample.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory Is there someone who have tried podofo on msys2 ? Regards ___ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users