Giter VIP home page Giter VIP logo

podofo's Introduction

PoDoFo build-linux build-mac build-win

  1. What is PoDoFo?
  2. Requirements
  3. Licensing
  4. Development quickstart
  5. Doxygen Documentation
  6. String encoding and buffer conventions
  7. API Stability
  8. PoDoFo tools
  9. TODO
  10. FAQ
  11. No warranty
  12. Contributions
  13. Authors

What is PoDoFo?

PoDoFo is a free portable C++ library to work with the PDF file format.

PoDoFo provides classes to parse a PDF file and modify its content into memory. The changes can be written back to disk easily. Besides PDF parsing PoDoFo also provides facilities to create your own PDF files from scratch. It currently does not support rendering PDF content.

Requirements

To build PoDoFo lib you'll need a c++17 compiler, CMake 3.16 and the following libraries (tentative minimum versions indicated):

  • freetype2 (2.11)
  • fontconfig (2.13.94, required for Unix platforms, optional for Windows)
  • OpenSSL (1.1 and 3.0 are supported)
  • LibXml2 (2.9.12)
  • zlib
  • libjpeg (9d, optional)
  • libtiff (4.0.10, optional)
  • libpng (1.6.37, optional)
  • libidn (1.38, optional)

For the most popular toolchains, PoDoFo requires the following minimum versions:

  • msvc++ 14.16 (VS 2017 15.9)
  • gcc 9.0
  • clang/llvm 7.0

It is regularly tested with the following IDE/toolchains versions:

  • Visual Studio 2017 15.9
  • Visual Studio 2019 16.11
  • Visual Studio 2022 17.3
  • gcc 9.3.1
  • XCode 13.3
  • NDK r23b

GCC 8.x support broke recently, but it could be reinstanced.

Licensing

PoDoFo library is licensed under the LGPL 2.0 or later terms. PoDoFo tools are licensed under the GPL 2.0 or later terms.

Development quickstart

PoDoFo is known to compile through a multitude of package managers (including apt-get, brew, vcpkg, Conan), and has public continuous integration working in Ubuntu Linux, MacOS and Windows, bootstrapping the CMake project, building and testing the library. It's highly recommended to build PoDoFo using such package managers.

There's also a playground area in the repository where you can have access to pre-build dependencies for some popular architectures/operating systems: the playground is the recommended setting to develop the library and reproduce bugs, while it's not recommended for the deployment of your application using PoDoFo. Have a look to the Readme there.

Warning: PoDoFo is known to be working in cross-compilation toolchains (eg. Android/iOS development), but support may not provided in such scenarios. If you decide to manually build dependencies you are assumed to know how to identity possible library clashes/mismatches and how to deal with compilation/linking problems that can arise in your system.

Build with apt-get

From the source root run:

sudo apt-get install -y libfontconfig1-dev libfreetype-dev libxml2-dev libssl-dev libjpeg-dev libpng-dev libtiff-dev libidn11-dev
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --config Debug

Build with brew

Install brew, then from the source root run:

brew install fontconfig freetype openssl libxml2 jpeg-turbo libpng libtiff libidn
mkdir build
cd build
cmake  -DCMAKE_BUILD_TYPE=Debug -DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_PREFIX_PATH=`brew --prefix` -DFontconfig_INCLUDE_DIR=`brew --prefix fontconfig`/include -DOPENSSL_ROOT_DIR=`brew --prefix openssl@3` ..
cmake --build . --config Debug

Build with Conan

Install conan, then from source root run:

mkdir build
cd build
conan install ..
cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --config Debug

Build with vcpkg

Follow the vcpkg quickstart guide to setup the package manager repository first. In Windows, it may be also useful to set the environment variable VCPKG_DEFAULT_TRIPLET to x64-windows to default installing 64 bit dependencies and define a VCPKG_INSTALLATION_ROOT variable with the location of the repository as created in the quickstart.

Then from source root run:

vcpkg install fontconfig freetype libxml2 openssl libjpeg-turbo libpng tiff zlib
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --config Debug

CMake switches

  • PODOFO_BUILD_TEST: Build the unit tests, defaults to TRUE;

  • PODOFO_BUILD_EXAMPLES: Build the examples, defaults to TRUE;

  • PODOFO_BUILD_TOOLS: Build the PoDoFo tools, defaults to FALSE. See the relevant section in the Readme;

  • PODOFO_BUILD_LIB_ONLY: If TRUE, it will build only the library component. This unconditionally disable building tests, examples and tools;

  • PODOFO_BUILD_STATIC: If TRUE, build the library as a static object and use it in tests, examples and tools. By default a shared library is built.

Static linking

If you want to use a static build of PoDoFo and you are including the PoDoFo cmake project it's very simple. Do something like the following in your CMake project:

set(PODOFO_BUILD_LIB_ONLY TRUE CACHE BOOL "" FORCE)
set(PODOFO_BUILD_STATIC TRUE CACHE BOOL "" FORCE)
add_subdirectory(podofo)
# ...
target_link_libraries(MyTarget podofo::podofo)

If you are linking against a precompiled static build of PoDoFo this is a scenario where the support is limited, as you are really supposed to be able to identify and fix linking errors. The general steps are:

  • Add PODOFO_STATIC compilation definition to your project, or before including podofo.h;
  • Link the libraries podofo.a, podofo_private.a (or podofo.lib, podofo_private.lib with MSVC) and all the dependent libraries.

Doxygen Documentation

The API documentation can be found at https://podofo.github.io/podofo/documentation/ .

Generate the doxygen documentation

  1. Prerequisite: Ensure you have Doxygen installed on your machine. If not, visit Doxygen's official website to download and install it.

  2. Generating Documentation: After completing the build process detailed in the Development quickstart chapter, navigate to the root directory of PoDoFo's source code. Open a terminal or command prompt and run the following command:

    doxygen build/Doxyfile
  3. Viewing the Documentation: Once the documentation generation completes, you'll find a documentation directory that contains the generated documentation. Open index.html in your favorite web browser to view the API documentation.

    cd build/doxygen/documentation
    open index.html

String encoding and buffer conventions

All std::strings or std::string_view in the library are intended to hold UTF-8 encoded string content. PdfString and PdfName constructors accept UTF-8 encoded strings by default (PdfName accept only characters in the PdfDocEncoding char set, though). charbuff abd bufferview instead represent a generic octet buffer.

API migration

PoDoFo has an unstable API that is the result of an extensive API review of PoDoFo 0.9.x. At this link you can find an incomplete guide on migrating 0.9.8 code to 0.10.0. It is expected PoDoFo will converge to a stable API as soon as the review process is completed. See API Stability for more details.

PoDoFo Tools

Warning: Tools are currently untested and unmaintained.

PoDoFo tools are still available in the source tree but their compilation is disabled by default because they are unsted/unmaintained, and will not receive support until their status is cleared. It's not recommended to include them in software distributions. If you want to build them make sure to bootstrap the CMake project with -DPODOFO_BUILD_TOOLS=TRUE. Tools are conveniently enabled in the playground at least to ensure library changes won't break their compilation.

TODO

There's a TODO list, or look at the issue tracker.

FAQ

Q: How do I sign a document?

A: PoDoFo HEAD now supplies a high level signing procedure which is very powerful and that allows to sign a document without having to supply a CMS structure manually. By default, it supports signing a document with the modern PAdES-B compliance profiles, but there's also a support for the legacy PKCS7 signatures. Providing you have both ASN.1 encoded X509 certificate and RSA private key, you can sign a document with the following code:

auto inputOutput = std::make_shared<FileStreamDevice>(filepath, FileMode::Open);

PdfMemDocument doc;
doc.LoadFromDevice(inputOutput);

auto& page = doc.GetPages().GetPageAt(0);
auto& signature = page.CreateField<PdfSignature>("Signature", Rect());

auto signer = PdfSignerCms(x509certbuffer, pkeybuffer);
PoDoFo::SignDocument(doc, *inputOutput, signer, signature);

There's also a support for external signing services and/or signing the document in memory buffers. See the various signing examples in the unit tests.

Q: Can I still use an event based procedure to sign the document?

Yes, the old low level procedure hasn't changed and it's still available. To describe the procedure briefly, one has to fully Implement a PdfSigner, retrieve or create a PdfSignature field, create an output device (see next question) and use PoDoFo::SignDocument(doc, device, signer, signature). When signing, the sequence of calls of PdfSignature works in this way: method PdfSigner::Reset() is called first, then the PdfSigner::ComputeSignature(buffer, dryrun) is called with an empty buffer and the dryrun argument set to true. In this call one can just resize the buffer overestimating the required size for the signature, or just compute a fake signature that must be saved on the buffer. Then a sequence of PdfSigner::AppendData(buffer) are called, receiving all the document data to be signed. A final PdfSigner::ComputeSignature(buffer, dryrun) is called, with the dryrun parameter set to false. The buffer on this call is cleared (capacity is not altered) or not accordingly to the value of PdfSigner::SkipBufferClear().

Q: PdfMemDocument::SaveUpdate() or PoDoFo::SignDocument() write only a partial file: why there's no mechanism to seamlessly handle the incremental update as it was in PoDoFo 0.9.x? What should be done to correctly update/sign the document?

A: The previous mechanism in PoDoFo 0.9.x required enablement of document for incremental updates, which is a decision step which I believe should be unnecessary. Also:

  1. In case of file loaded document it still required to perform the update in the same file, and the check was performed on the path of the files being operated to, which is unsafe;
  2. In case of buffers worked for one update/signing operation but didn't work for following operations, meaning the mechanism was bugged/unreliable.

An alternative strategy that makes clearer the fact that the incremental update must be performed on the same file from where the document was loaded, or that underlying buffer will grow its mememory consumption following subsequent operations in case of buffer loaded documents, is available. It follows a couple of examples showing the correct operations to update a document, loaded from file or buffer:

  1. Save an update on a file loaded document, by loading and saving the document on the same location:
auto inputOutput = std::make_shared<FileStreamDevice>(filename, FileMode::Open);

PdfMemDocument doc;
doc.LoadFromDevice(inputOutput);

doc.SaveUpdate(*inputOutput);
  1. Save an update on a buffer, by copying the source first to the buffer that will be also used to load the document:
charbuff outputBuffer;
FileStreamDevice input(filepath);
auto inputOutput = std::make_shared<BufferStreamDevice>(outputBuffer);
input.CopyTo(*inputOutput);

PdfMemDocument doc;
doc.LoadFromDevice(inputOutput);

doc.SaveUpdate(*inputOutput);

Signing documents can be done with same technique, read the other questions for more examples.

Q: Can I sign a document a second time?

A: Yes, this is tested, but to make sure this will work you'll to re-parse the document a second time, as re-using the already loaded document is still untested (this may change later). For example you can do as it follows:

auto inputOutput = std::make_shared<FileStreamDevice>(filepath, FileMode::Open);

{
    PdfMemDocument doc;
    doc.LoadFromDevice(inputOutput);
    auto& page = doc.GetPages().GetPageAt(0);
    auto& signature = page.CreateField<PdfSignature>("Signature1", Rect());

    PdfSignerCms signer(x509certbuffer, pkeybuffer);
    PoDoFo::SignDocument(doc, *inputOutput, signer, signature);
}

{
    PdfMemDocument doc;
    doc.LoadFromDevice(inputOutput);
    auto& page = doc.GetPages().GetPageAt(0);
    auto& signature = page.CreateField<PdfSignature>("Signature2", Rect());
    PdfSignerCms signer(x509certbuffer, pkeybuffer);
    PoDoFo::SignDocument(doc, *inputOutput, signer, signature);
}

No warranty

PoDoFo may or may not work for your needs and comes with absolutely no warranty. Serious bugs, including security flaws, may be fixed at arbitrary timeframes, or not fixed at all. Priority of implementing new features and bug fixing are decided according to the interests and personal preferences of the maintainers. If you need PoDoFo to integrate a feature or bug fix that is critical to your workflow, the most welcome and fastest approach is to contribute high-quality patches.

Contributions

Please subscribe to the project mailing list which is still followed by several of the original developers of PoDoFo. A gitter community has also been created to ease some more informal chatter. If you find a bug and know how to fix it, or you want to add a small feature, you're welcome to send a pull request, providing it follows the coding style of the project. As a minimum requisite, any contribution should be:

  • valuable for a multitude of people and not only self relevant for the contributor;
  • consistent with surrounding code and not result in unpredictable behavior and/or bugs.

Other reasons for the rejection, or hold, of a pull request may be:

  • the proposed code is incomplete or hacky;
  • the change doesn't fit the scope of PoDoFo;
  • the change shows lack of knowledge/mastery of the PDF specification and/or C++ language;
  • the change breaks automatic tests performed by the maintainer;
  • general lack of time in reviewing and merging the change.

If you need to implement a bigger feature or refactor, ask first if it was already planned. The feature may be up for grabs, meaning that it's open for external contributions. Please write in the relevant issue that you started to work on that, to receive some feedback/coordination. If it's not, it means that the refactor/feature is planned to be implemented later by the maintainer(s). If the feature is not listed in the issues, add it and/or create a discussion to receive some feedback and discuss some basic design choices.

Authors

Warning: Please don't use personal email addresses for technical support inquries, but create github issues instead.

PoDoFo is currently developed and maintained by Francesco Pretto, together with Dominik Seichter and others. See the file AUTHORS.md for more details.

podofo's People

Contributors

ccreutzi avatar ccreutzig avatar ceztko avatar ch-chang avatar diizzyy avatar domseichter avatar dprandle avatar erroneous1 avatar ferencios avatar h3xx avatar hashimsaleem avatar igormironchik avatar luzpaz avatar peparokos avatar pinotree avatar rouault avatar webfreak001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

podofo's Issues

Too large glyph size with /MissingWidth

Hi,

it looks like PoDoFo incorrectly calculates the glyph size if it is defined with /MissingWidth.
PdfFontMetricsObject.cpp +114

It may be better to move reading down after FontMatrix read and multiply MissingWidth by m_Matrix[0].

        m_DefaultWidth = descriptor->GetDictionary().FindKeyAs<double>("MissingWidth", 0) * m_Matrix[0];

Default values of CMAKE_CXX_FLAGS with MSVC

By default for MSVC CMAKE_CXX_FLAGS are /DWIN32 /D_WINDOWS /W3 /GR /EHsc. If to generate with cmake makefiles for nmake, i.e cmake -G "NMake Makefiles" ... the during compilation I see a lot of annoying warnings:

cl : Command line warning D9025 : overriding '/W3' with '/W4'

Do you know how to solve this annoying issue?

ColorTest (and maybe others) are broken on aarch64 (aka arm64)

Hi,

When trying to compile and run the tests of versio 0.9.7 on an arm 64 bits machines (aarch64 aka arm64), I get at least the following failures:

Assertion failure here (no PdfError is raised, while it should):

    {   
        CPPUNIT_ASSERT_THROW_WITH_ERROR_TYPE(
            PdfColor::FromString( "#12345g" ),
            PdfError,
            ePdfError_CannotConvertColor);
    }

this is caused by your usage of implicit convertion from/to char to (unsigned) int. On a "regular" x86_64 machine, "char" is "signed" type. On aarch64, "char" is "unsigned". In "PdfColor::FromString" you call "PdfTokenize::GetHexValue" which is implemented like this:

inline int PdfTokenizer::GetHexValue(const unsigned char ch)
{   
    return PdfTokenizer::s_hexMap[static_cast<size_t>(ch)];
} 

s_hexMap is "const char * const". So you have here an "char" to "int" conversion. Let's see with Godbolt what happens if "char" is signed or not:

https://godbolt.org/z/s4xbfPos5

#include <limits>

void f()
{
    constexpr unsigned int HEX_NOT_FOUND = std::numeric_limits<unsigned int>::max();

    static_assert(static_cast<int>(static_cast<signed char>(HEX_NOT_FOUND)) == HEX_NOT_FOUND);
    static_assert(static_cast<int>(static_cast<unsigned char>(HEX_NOT_FOUND)) == HEX_NOT_FOUND); // Assertion failure here: 255 != 4294967295
}

A possible fix for that is to explicitly use "signed char" everywhere, and this is enough to make this test pass:

--- src/podofo/base/PdfTokenizer.cpp
+++ src/podofo/base/PdfTokenizer.cpp
@@ -107,7 +107,7 @@
 static char g_DelMap[g_MapAllocLen] = { 0 };
 static char g_WsMap[g_MapAllocLen] = { 0 };
 static char g_EscMap[g_MapAllocLen] = { 0 };
-static char g_hexMap[g_MapAllocLen] = { 0 };
+static signed char g_hexMap[g_MapAllocLen] = { 0 };
 
 // Generate the delimiter character map at runtime
 // so that it can be derived from the more easily
@@ -157,10 +157,10 @@
 }
 
 // Generate the hex character map at runtime
-const char* genHexMap()
+const signed char* genHexMap()
 {
-    char* map = static_cast<char*>(g_hexMap);
-    memset( map, PdfTokenizer::HEX_NOT_FOUND, sizeof(char) * g_MapAllocLen );
+    signed char* map = static_cast<signed char*>(g_hexMap);
+    memset( map, PdfTokenizer::HEX_NOT_FOUND, sizeof(signed char) * g_MapAllocLen );
 
     map[static_cast<unsigned char>('0')] = 0x0;
     map[static_cast<unsigned char>('1')] = 0x1;
@@ -194,7 +194,7 @@
 const char * const PdfTokenizer::s_delimiterMap  = PdfTokenizerNameSpace::genDelMap();
 const char * const PdfTokenizer::s_whitespaceMap = PdfTokenizerNameSpace::genWsMap();
 const char * const PdfTokenizer::s_escMap        = PdfTokenizerNameSpace::genEscMap();
-const char * const PdfTokenizer::s_hexMap        = PdfTokenizerNameSpace::genHexMap();
+const signed char * const PdfTokenizer::s_hexMap        = PdfTokenizerNameSpace::genHexMap();
 
 const char PdfTokenizer::s_octMap[]        = {
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
--- src/podofo/base/PdfTokenizer.h
+++ src/podofo/base/PdfTokenizer.h
@@ -304,7 +304,7 @@
     static const char s_octMap[]; ///< Map of bool values, if a certain char
                                   ///< is a valid octal digit
     static const char * const s_escMap; ///< Mapping of escape sequences to their value
-    static const char * const s_hexMap; ///< Mapping of hex characters to their value
+    static const signed char * const s_hexMap; ///< Mapping of hex characters to their value
 
 
     TTokenizerQueque m_deqQueque;

There is a second test that is failing, it's this one:

    {   
        double dRed   = C_VALUE * (1.0 - B_VALUE) + B_VALUE;
        double dGreen = M_VALUE * (1.0 - B_VALUE) + B_VALUE;
        double dBlue  = Y_VALUE * (1.0 - B_VALUE) + B_VALUE;

        ASSERT_TRUE(PdfColor( 1.0 - dRed, 1.0 - dGreen, 1.0 - dBlue ) == color.ConvertToRGB());
    }

It seems like the double operation don't give exactly the same value in both cases, but values are very close. Using gdb and putting a breaking on operator== at this moment, we can see this:

(gdb) bt
#0  PoDoFo::PdfColor::operator== (this=0xffffd2cd6f78, rhs=...)
    at /remote/users/rgeissler/wk/opensource-pack-builder/workdir/components/podofo/BUILD/podofo-0.9.7/src/podofo/base/PdfColor.h:609
#1  0x000000000049b7f8 in ColorTest::testCMYKConstructor (this=<optimized out>)
    at /remote/users/rgeissler/wk/opensource-pack-builder/workdir/components/podofo/BUILD/podofo-0.9.7/test/unit/ColorTest.cpp:515


(gdb) p *this
$10 = {_vptr.PdfColor = 0xffff85f1d4b8 <vtable for PoDoFo::PdfColor+16>, m_uColor = {cmyk = {0.54000000000000004, 0.47999999999999998, 0.41999999999999993, 0}, rgb = {
      0.54000000000000004, 0.47999999999999998, 0.41999999999999993}, lab = {0.54000000000000004, 0.47999999999999998, 0.41999999999999993}, gray = 0.54000000000000004},
  m_separationName = {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
      _M_p = 0xffffd2cd6fb0 ""}, _M_string_length = 0, {_M_local_buf = "\000\000\000\000\000\000\000\000\250p\315\322\377\377\000", _M_allocated_capacity = 0}},
  m_separationDensity = 0, m_eColorSpace = PoDoFo::ePdfColorSpace_DeviceRGB, m_eAlternateColorSpace = PoDoFo::ePdfColorSpace_Unknown, static m_hexDigitMap = <optimized out>}


(gdb) p rhs
$11 = (const PoDoFo::PdfColor &) @0xffffd2cd6fd0: {_vptr.PdfColor = 0xffff85f1d4b8 <vtable for PoDoFo::PdfColor+16>, m_uColor = {cmyk = {0.54000000000000004, 0.47999999999999998,
      0.42000000000000004, 0}, rgb = {0.54000000000000004, 0.47999999999999998, 0.42000000000000004}, lab = {0.54000000000000004, 0.47999999999999998, 0.42000000000000004},
    gray = 0.54000000000000004}, m_separationName = {static npos = 18446744073709551615,
    _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xffffd2cd7008 ""}, _M_string_length = 0, {
      _M_local_buf = "\000\326\217\063\000\000\000\000\060\326\217\063\000\000\000", _M_allocated_capacity = 865064448}}, m_separationDensity = 0,
  m_eColorSpace = PoDoFo::ePdfColorSpace_DeviceRGB, m_eAlternateColorSpace = PoDoFo::ePdfColorSpace_Unknown, static m_hexDigitMap = <optimized out>}

So we have 0.41999999999999993 != 0.42000000000000004 making the whole test fail.

I am unsure how you want to fix these, so for now I will just apply my above patch and skip the failing tests.

Cheers,
Romain

Second digital signature invalidates the first one

When you apply a second digital signature to a pdf that already has a digital signature, the first one is invalidated, this digital signature is not more valid and adobe reader says "the document has been modified after the digital signature".

This happens because the incremental update doesn't work correctly.

Add support for Unicode combining marks

Moving this from a litePDF ticket:
https://sourceforge.net/p/litepdf/tickets/41/

Some languages use Unicode combining marks, but the PoDoFo doesn't support it (I briefly searched also the pdfmm code base and it looks like neither that one). It would be nice to add support for it in the PdfPainter::DrawText(), even it might mean a lot of typography.

Unicode letter ranges:

0x0300 - 0x036f    combining diacritical marks
0x20d0 - 0x20ff    combining marks for symbols
0xfe20 - 0xfe2f    combining half marks

Please see the downstream ticket for a test data and more details.

Required TrueType table missing

  • Install attached Droid Serif fonts on Windows.
  • Try to use Droid Serif font to generate PDF.
  • And you will cought exception:
void PdfFontTrueTypeSubset::InitTables()
{
    ...

    if ((tableMask & ReqTable::all) == ReqTable::none)
        PODOFO_RAISE_ERROR_INFO(PdfErrorCode::UnsupportedFontFormat, "Required TrueType table missing");
}

What interesting is that if use doc->GetFonts().GetOrCreateFont() with these fonts - everything is fine, but using them from
doc->GetFonts().SearchFont() when they installed in the system - exception throws.

Could you clarify this situation?

Thanks.

droid_serif.zip

I use

  • freetype/2.13.0
  • fontconfig/2.14.2

on Windows, if it makes sense.

PoDoFo crashes when do `SearchFont()` with the same arguments repeatedly

To reproduce on Windows use the following code:

#include <podofo/podofo.h>

using namespace PoDoFo;

int main()
{
	PdfMemDocument doc;

	auto & page = doc.GetPages().CreatePage( PdfPage::CreateStandardPageSize( PdfPageSize::A4 ) );

	PdfPainter p;

	p.SetCanvas( page );

	PdfFontSearchParams params;
	params.Style = PdfFontStyle::Regular;

	PdfFont * f1 = doc.GetFonts().SearchFont( "Arial", params );

	for( int i = 0; i < 5; ++i )
	{
		PdfFontSearchParams params;
		params.Style = PdfFontStyle::Regular;

		f1 = doc.GetFonts().SearchFont( "Arial", params );
	}

	p.Text.Begin();
	p.TextState.SetFont( *f1, 8.0 );
	p.Text.MoveTo( 50.0, 750.0 );
	p.Text.AddText( "Hello" );
	p.Text.End();

	p.FinishDrawing();

	doc.Save( "1.pdf" );
}

One of the possible stacktrace is:

1  RaiseException                              KERNELBASE                 0x7ffd51b5cd29 
2  CxxThrowException                           VCRUNTIME140D              0x7ffd33c3b460 
3  PoDoFo::PdfVariant::GetDictionary           PdfVariant.cpp         756 0x7ffce8acae31 
4  PoDoFo::PdfObject::GetDictionary            PdfObject.cpp          680 0x7ffce8a3c7e5 
5  PoDoFo::PdfFontCIDTrueType::embedFontSubset PdfFontCIDTrueType.cpp 32  0x7ffce89c963f 
6  PoDoFo::PdfFont::EmbedFont                  PdfFont.cpp            239 0x7ffce8999d83 
7  PoDoFo::PdfFontManager::EmbedFonts          PdfFontManager.cpp     396 0x7ffce89cfe95 
8  PoDoFo::PdfMemDocument::beforeWrite         PdfMemDocument.cpp     313 0x7ffce8a2db50 
9  PoDoFo::PdfMemDocument::Save                PdfMemDocument.cpp     240 0x7ffce8a2c396 
10 PoDoFo::PdfMemDocument::Save                PdfMemDocument.cpp     233 0x7ffce8a2c2fe 
11 main                                        main.cpp               37  0x7ff7bb08185d 
12 invoke_main                                 exe_common.inl         79  0x7ff7bb082639 
13 __scrt_common_main_seh                      exe_common.inl         288 0x7ff7bb0824de 
14 __scrt_common_main                          exe_common.inl         331 0x7ff7bb08239e 
15 mainCRTStartup                              exe_main.cpp           17  0x7ff7bb0826ce 
16 BaseThreadInitThunk                         KERNEL32                   0x7ffd52f37614 
17 RtlUserThreadStart                          ntdll                      0x7ffd540626a1 

I guess that you store and read freed memory somewhere.

screenshot

PODOFO_API declaration for PdfContentsReader

Hi!

I tried to compile my project with MSVC and found that PdfContentsReader class `was not included in DLL.
The issue is in declaring the class without the PODOFO_API specifier.
Please add PODOFO_API to class declaration in PdfContentsReader.h +79

class PODOFO_API PdfContentsReader final

`PdfPainter::Circle()` doesn't draw

Hello,

Either I didn't do my homework again, or I caught a bug again. But in PoDoFo 0.9.x such approach worked.

In the following code I don't see and actual circle in the resulting PDF. But I don't see the result in KDE's Okular PDF viewer,
whereas in Firefox I see the circle. Not sure which this issue is. I will reboot under Windows to check this file there...

I'm there... Adobe Acrobat Reader doesn't draw the circle too, so I guess this is your issue.

#include <podofo/podofo.h>

using namespace PoDoFo;

int main()
{
	PdfMemDocument doc;

	PdfPainter painter;

	auto & page = doc.GetPages().CreatePage(
		PdfPage::CreateStandardPageSize( PdfPageSize::A4 ) );

	painter.SetCanvas( page );

	painter.GetGraphicsState().SetFillColor( PdfColor( 0.0, 0.0, 0.0 ) );
	painter.Circle( 100.0, 750.0, 20.0 );
	painter.Fill();

	painter.FinishDrawing();

	doc.Save( "1.pdf" );

	return 0;
}

The result of this application:

1.pdf

PoDoFo creates unreadable PDFs when OpenSSL RC4 is not available and PODOFO_HAVE_OPENSSL_NO_RC4 is set

I am using PoDoFo vcpkg 0.9.7 and 0.9.8 packages with OpenSSL.
Until OpenSSL 3.0.2 it had RC4 encryption included and the following code to encrypt a pdf file worked flawless:

doc.SetEncrypted("",
                             "hello",
                             PoDoFo::PdfEncrypt::ePdfPermissions_Print |
                             PoDoFo::PdfEncrypt::ePdfPermissions_Accessible |
                             PoDoFo::PdfEncrypt::ePdfPermissions_HighPrint,
                             PoDoFo::PdfEncrypt::ePdfEncryptAlgorithm_AESV2,
                             PoDoFo::PdfEncrypt::ePdfKeyLength_128);

With OpenSSL 3.0.2 RC4 encryption got disabled.
Trying to encrypt a pdf with the above command failes with a internal logic error thrown (as somehow expected).

I recompiled PoDoFo and added ADD_DEFINITIONS(-DPODOFO_HAVE_OPENSSL_NO_RC4) to CMakeLists.txt to disable RC4 OpenSSL support.
This way the above command does not throw an exception anymore and a encrypted PDF is created. But when trying to open the file it asks for a password and all inputs are incorrect.
To me it looks like the passwords get garbled when RC4 support is not available for PoDoFo.

`PdfDestination(const PdfPage& page, const Rect& rect)` does not consider second argument.

As said in the comment:

Create a destination to a page with its contents magnified to fit into the given rectangle
\param page a page which is the destination
\param rect magnify the page so that the contents of the rectangle are visible

So I expect rect rectangle be visible on link clicking. But it's not so. On link click only page is considered, and scrolled to the top of the page.

Look at the example.

#include <podofo/podofo.h>

using namespace PoDoFo;

int main()
{
	PdfMemDocument doc;

	PdfPainter painter;

	PdfFontSearchParams params;
	params.Style = PdfFontStyle::Regular;

	auto * font = doc.GetFonts().SearchFont( "Arial", params );

	auto & page = doc.GetPages().CreatePage(
		PdfPage::CreateStandardPageSize( PdfPageSize::A4 ) );

	painter.SetCanvas( page );

	const double x1 = 50.0;
	const double y1 = 50.0;
	const double x2 = 50.0;
	const double y2 = 800.0;

	PdfTextState st;
	st.FontSize = 14.0;

	const double w = font->GetStringLength( "LINK", st );
	const double h = font->GetLineSpacing( st );

	painter.TextObject.Begin();
	painter.TextObject.MoveTo( x1, y1 );
	painter.TextState.SetFont( *font, 14 );
	painter.TextState.SetFontScale( 1.0 );
	painter.TextObject.AddText( "LINK" );
	painter.TextObject.End();

	painter.TextObject.Begin();
	painter.TextObject.MoveTo( x2, y2 );
	painter.TextState.SetFont( *font, 14 );
	painter.TextState.SetFontScale( 1.0 );
	painter.TextObject.AddText( "LINK" );
	painter.TextObject.End();

	{
		auto & annot = page.GetAnnotations().CreateAnnot< PdfAnnotationLink >(
			Rect( x1, y1, w, h ) );
		annot.SetBorderStyle( 0.0, 0.0, 0.0 );
		annot.SetDestination( std::make_shared< PdfDestination> ( page, Rect( x2, y2, w, h ) ) );
	}

	{
		auto & annot = page.GetAnnotations().CreateAnnot< PdfAnnotationLink >(
			Rect( x2, y2, w, h ) );
		annot.SetBorderStyle( 0.0, 0.0, 0.0 );
		annot.SetDestination( std::make_shared< PdfDestination> ( page, Rect( x1, y1, w, h ) ) );
	}

	painter.FinishDrawing();

	doc.Save( "1.pdf" );

	return 0;
}

1.pdf

In the attached PDF clicking any link always scrolls to the top of the page, whereas I expect scrolling to the bottom on clicking top link.

Maybe I understood something wrong?

Thanks.

[question] How to don't change scale in PDF viewer on links click?

I make internal links in PDF with the following code:

PdfPage & page = ...;
auto & annot = page.GetAnnotations().CreateAnnot< PdfAnnotationLink >( Rect( ... ) );
annot.SetBorderStyle( 0.0, 0.0, 0.0 );
annot.SetDestination( std::make_shared< PdfDestination> ( somePage, x, y, 1.0 ) );

All works, when I open a PDF I see some default scale of the document, when I click on a link everything scrolled
correctly, I see what I should, but scale of the document is changed to Fit to Page.

Am I doing something wrong? How can I keep scale unchanged?

Thanks you.

Something wrong with `PdfPainter::GetTextState().SetFontScale()`

In the following example as font scale changed, it will mess with another calls of GetTextState().SetFontScale(), and something horrible will be in the output. Maybe this is your new design, but in my point of view this is a mistake.

#include <podofo/podofo.h>

using namespace PoDoFo;
using namespace std::literals;

int main()
{
	PdfMemDocument doc;

	PdfPainter painter;

	auto & page = doc.GetPages().CreatePage( PdfPage::CreateStandardPageSize( PdfPageSize::A4 ) );

	painter.SetCanvas( page );

	auto * font = doc.GetFonts().SearchFont( "Droid Serif" );

	painter.GetTextState().SetFont( *font, 10.0 );

	const auto str = "World"sv;

	PdfTextState st;
	st.FontSize = 10.0;
	st.RenderingMode = PdfTextRenderingMode::Fill;

	double x = 50, y = 50;

	painter.DrawText( "World World World", x, y * 2.0 );

	const auto l = font->GetStringLength( str, st );
	const auto s = font->GetStringLength( " ", st ) * 2.0;

	for( int i = 0; i < 3; ++i )
	{
		painter.DrawText( str, x, y );

		x += l;

		painter.GetTextState().SetFontScale( 2.0 );

		painter.DrawText( " ", x, y );

		x += s;

		painter.GetTextState().SetFontScale( 1.0 );
	}

	painter.FinishDrawing();

	doc.Save( "1.pdf" );

	return 0;
}

In the result:

font_scale

I really need to draw spaces "by hands" in my application with custom scale, word spacing in PdfTextState is not appropriate for me.

Analytically caught bug

In the code you have:

// NOTE: baseFontName is already normalized and cleaned from known suffixes
PdfFont* PdfFontManager::getImportedFont(const string_view& patternName,
    const PdfFontSearchParams& searchParams, const PdfFontCreateParams& createParams)
{
    auto& fonts = m_cachedQueries[Descriptor(
        patternName,
        PdfStandard14FontType::Unknown,
        createParams.Encoding,
        searchParams.Style != nullptr,
        searchParams.Style == nullptr ? PdfFontStyle::Regular : *searchParams.Style)];
    if (fonts.size() != 0)
    {
        if (searchParams.FontSelector == nullptr)
            return fonts[0];
        else
            searchParams.FontSelector(fonts);
    }

    PdfFontSearchParams newParams = searchParams;
    string newPattern = (string)patternName;
    adaptSearchParams(newPattern, newParams);
    string fontpath;
    unsigned faceIndex;
    auto data = getFontData(patternName, searchParams, fontpath, faceIndex);
    if (data == nullptr)
        return nullptr;

    shared_ptr<PdfFontMetrics> metrics = PdfFontMetricsFreetype::FromBuffer(std::move(data));
    metrics->SetFilePath(std::move(fontpath), faceIndex);

    auto ret = AddImported(PdfFont::Create(*m_doc, metrics, createParams));
    fonts.push_back(ret);
    return ret;
}

Where you do:

PdfFontSearchParams newParams = searchParams;
string newPattern = (string)patternName;
adaptSearchParams(newPattern, newParams);

But niether newParams or newPattern used in the code after adaptSearchParams()

Fail to sign encrypted pdf

Hi all!

What am i trying to do?

I'm trying to sign a pdf that has the Encrypt tag, no password required.

What do I get as a result?

Trying to open the file via adobe it asks me for the password! (as the attached screenshot shows).
I know this is a new feature, podofo 0.9.x didn't have it. I'm very happy that there is!

If it helps, I signed the pdf with pdfbox (the apache competitor) and it does it correctly. Below you will find the various tags

Original PDF (one Encrypt Tag)

<<
/Size 29
/Root 28 0 R
/Info 27 0 R
/ID [<7231d95de66746b883dcfd744dac9e79><7231d95de66746b883dcfd744dac9e79>]
/Encrypt <<
/Filter /Standard
/V 2
/R 3
/Length 128
/P -44
/O (I�fB˪�`��>\r��Ū������S�[������)
/U (�����\\Ѝ��[���������������������)
>>

Signed by PDFBox (two Encrypt Tag: original + the new one)

<<
/Size 34
/Root 28 0 R
/Info 27 0 R
/ID [<7231D95DE66746B883DCFD744DAC9E79> <EDEC786C73023ABD9311A040299FE408>]
/Encrypt <<
/Filter /Standard
/V 2
/R 3
/Length 128
/P -44
/O <491E6642CBAAD460B1B43E0D97ADC5AAD9D2C297E61A9753AB5BC1A2FCDE0BF8>
/U <D21B8494AF5CD08DA1A45B159B1CDCDF00000000000000000000000000000000>
>>
/Prev 203073
>>

Signed by PoDoFo (two Encrypt Tag: original + the new one)

<<
/Encrypt 39 0 R
/ID[<7231D95DE66746B883DCFD744DAC9E79><D0439FD37B50BF9818F12D47DC2DEA78>]
/Info 27 0 R
/Prev 203073
/Root 28 0 R
/Size 40
>>

(it's actually a single line: <</Encrypt 39 0 R/ID[<7231D95DE66746B883DCFD744DAC9E79><D0439FD37B50BF9818F12D47DC2DEA78>]/Info 27 0 R/Prev 203073/Root 28 0 R/Size 40>>)

adobe.zip

I also tried to read chapter 7.6 Encryption to look for a fix but it's not a simple topic.

Unused variable

PdfFont* PdfFontManager::addImported(vector<PdfFont*>& fonts, unique_ptr<PdfFont>&& font)
{
    auto fontPtr = font.get();
    fonts.push_back(fontPtr);
    auto inserted = m_fonts.insert({ fontPtr->GetObject().GetIndirectReference(), Storage{ false, std::move(font) } });
    return fontPtr;
}
/home/igor/Work/Projects/md-pdf/3rdparty/podofo/src/podofo/main/PdfFontManager.cpp:90: warning: variable ‘inserted’ set but not used [-Wunused-but-set-variable]
/home/igor/Work/Projects/md-pdf/3rdparty/podofo/src/podofo/main/PdfFontManager.cpp: In member function ‘PoDoFo::PdfFont* PoDoFo::PdfFontManager::addImported(std::vector<PoDoFo::PdfFont*>&, std::unique_ptr<PoDoFo::PdfFont>&&)’:
/home/igor/Work/Projects/md-pdf/3rdparty/podofo/src/podofo/main/PdfFontManager.cpp:90:10: warning: variable ‘inserted’ set but not used [-Wunused-but-set-variable]
   90 |     auto inserted = m_fonts.insert({ fontPtr->GetObject().GetIndirectReference(), Storage{ false, std::move(font) } });
      |          ^~~~~~~~

`PdfPainter::DrawImage()` doesn't draw

Hello,

I'm continuing to port my application to PoDoFo 0.10.0 and caught new issues.

#include <podofo/podofo.h>

using namespace PoDoFo;

int main()
{
	PdfMemDocument doc;

	PdfPainter painter;

	auto & page = doc.GetPages().CreatePage( PdfPage::CreateStandardPageSize( PdfPageSize::A4 ) );

	painter.SetCanvas( page );

	auto img = doc.CreateImage();
	img->Load( "1.png" );

	painter.DrawImage( *img.get(), 50.0, 50.0 );

	painter.FinishDrawing();

	doc.Save( "1.pdf" );

	return 0;
}

In the resulting PDF I don't see image in the PDF viewer.

`GetFonts().SearchFont()` works wrongly

On my Ubuntu 22.04 the following code:

PdfMemDocument doc;

auto * font = doc.GetFonts().SearchFont( "Noto Sans" );

auto & metrics = font->GetMetrics();
std::cout << "The font name is "<< metrics.GetFontNameSafe() << std::endl;
std::cout << "The family font name is " << metrics.GetFontFamilyName() << std::endl;
std::cout << "The font file path is " << metrics.GetFilePath() << std::endl;
std::cout << "The font face index is " << metrics.GetFaceIndex() << std::endl;

Produces:

The font name is NotoSansAdlam-Regular
The family font name is Noto Sans Adlam
The font file path is /usr/share/fonts/truetype/noto/NotoSansAdlam-Regular.ttf
The font face index is 0

What is wrong as I searched for Noto Sans font and got Noto Sans Adlam, both of which are installed on my system, and place in the same folder /usr/share/fonts/truetype/noto/. There I have NotoSansAdlam-Regular.ttf and NotoSans-Regular.ttf.

Shine `CMakeLists.txt` a little

Just an idea, it's not a bug, but possible improvement.

In your CMakeLists.txt you use, for example:

find_package(LibXml2 REQUIRED)
message("Found libxml2 library at ${LIBXML2_LIBRARIES}, headers ${LIBXML2_INCLUDE_DIRS}")

# The podofo library needs to be linked to these libraries
# NOTE: Be careful when adding/removing: the order may be
# platform sensible, so don't modify the current order
set(PODOFO_LIB_DEPENDS
    ${OPENSSL_LIBRARIES}
    ${Fontconfig_LIBRARIES}
    ${FREETYPE_LIBRARIES}
    ${LIBXML2_LIBRARIES}
    ${PNG_LIBRARIES}
    ${TIFF_LIBRARIES}
    ${JPEG_LIBRARIES}
    ${ZLIB_LIBRARIES}
    ${PLATFORM_SYSTEM_LIBRARIES}
)

Let consider on the example with LibXml2 - you set include directories by hands, and use LIBXML2_LIBRARIES variable to link to. OK.
On Linux this is not a problem, all works like a sharm. But on Windows, for example, in conjunction with Conan it doesn't work, and I see unresolves...

But if refuse from variables like LIBXML2_LIBRARIES and LIBXML2_INCLUDE_DIRS, and simple use the following CMake code:

set(PODOFO_LIB_DEPENDS
  LibXml2::LibXml2
)

Everything begin work on every platform without issues. And you can use Conan to do a test CI build for Windows platform with ease.

What do you think?

[podofo-0.10.0]Stack-Overflow

We found a stack overflow on podofo 0.10.0.

Command Input

podofopdfinfo poc_file

poc_file are attached.

Sanitizer Dump

AddressSanitizer:DEADLYSIGNAL
=================================================================
==2639991==ERROR: AddressSanitizer: stack-overflow on address 0x7ffd0a39ff88 (pc 0x0000004ab656 bp 0x7ffd0a3a07d0 sp 0x7ffd0a39ff90 T0)
    #0 0x4ab656 in __asan_memcpy /root/test/fuzzing_python/llvm-project-llvmorg-12.0.0/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3
    #1 0x700b6d in std::iterator_traits<std::_Rb_tree_const_iterator<PoDoFo::PdfObject*> >::difference_type std::distance<std::_Rb_tree_const_iterator<PoDoFo::PdfObject*> >(std::_Rb_tree_const_iterator<PoDoFo::PdfObject*>, std::_Rb_tree_const_iterator<PoDoFo::PdfObject*>) (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x700b6d)
    #2 0x700660 in std::_Rb_tree_const_iterator<PoDoFo::PdfObject*> std::__lower_bound<std::_Rb_tree_const_iterator<PoDoFo::PdfObject*>, PoDoFo::PdfReference, __gnu_cxx::__ops::_Iter_comp_val<bool (*)(PoDoFo::PdfObject const*, PoDoFo::PdfReference const&)> >(std::_Rb_tree_const_iterator<PoDoFo::PdfObject*>, std::_Rb_tree_const_iterator<PoDoFo::PdfObject*>, PoDoFo::PdfReference const&, __gnu_cxx::__ops::_Iter_comp_val<bool (*)(PoDoFo::PdfObject const*, PoDoFo::PdfReference const&)>) (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x700660)
    #3 0x6f55b9 in std::_Rb_tree_const_iterator<PoDoFo::PdfObject*> std::lower_bound<std::_Rb_tree_const_iterator<PoDoFo::PdfObject*>, PoDoFo::PdfReference, bool (*)(PoDoFo::PdfObject const*, PoDoFo::PdfReference const&)>(std::_Rb_tree_const_iterator<PoDoFo::PdfObject*>, std::_Rb_tree_const_iterator<PoDoFo::PdfObject*>, PoDoFo::PdfReference const&, bool (*)(PoDoFo::PdfObject const*, PoDoFo::PdfReference const&)) (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6f55b9)
    #4 0x6ed816 in PoDoFo::PdfIndirectObjectList::GetObject(PoDoFo::PdfReference const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6ed816)
    #5 0x563c8a in PoDoFo::PdfDataContainer::GetIndirectObject(PoDoFo::PdfReference const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x563c8a)
    #6 0x6121e9 in PoDoFo::PdfDictionary::findKey(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6121e9)
    #7 0x61238d in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x61238d)
    #8 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #9 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #10 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #11 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #12 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #13 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #14 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #15 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #16 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #17 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #18 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #19 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #20 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #21 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #22 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #23 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #24 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #25 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #26 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #27 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #28 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #29 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #30 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #31 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #32 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #33 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #34 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #35 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #36 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #37 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #38 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #39 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #40 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #41 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #42 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #43 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #44 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #45 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #46 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #47 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #48 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #49 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #50 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #51 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #52 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #53 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #54 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #55 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #56 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #57 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #58 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #59 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #60 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #61 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #62 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #63 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #64 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #65 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #66 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #67 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #68 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #69 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #70 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #71 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #72 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #73 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #74 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #75 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #76 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #77 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #78 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #79 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #80 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #81 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #82 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #83 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #84 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #85 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #86 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #87 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #88 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #89 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #90 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #91 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #92 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #93 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #94 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #95 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #96 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #97 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #98 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #99 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #100 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #101 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #102 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #103 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #104 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #105 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #106 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #107 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #108 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #109 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #110 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #111 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #112 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #113 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #114 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #115 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #116 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #117 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #118 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #119 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #120 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #121 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #122 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #123 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #124 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #125 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #126 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #127 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #128 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #129 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #130 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #131 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #132 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #133 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #134 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #135 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #136 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #137 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #138 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #139 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #140 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #141 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #142 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #143 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #144 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #145 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #146 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #147 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #148 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #149 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #150 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #151 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #152 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #153 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #154 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #155 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #156 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #157 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #158 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #159 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #160 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #161 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #162 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #163 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #164 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #165 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #166 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #167 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #168 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #169 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #170 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #171 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #172 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #173 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #174 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #175 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #176 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #177 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #178 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #179 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #180 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #181 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #182 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #183 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #184 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #185 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #186 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #187 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #188 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #189 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #190 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #191 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #192 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #193 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #194 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #195 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #196 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #197 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #198 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #199 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #200 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #201 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #202 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #203 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #204 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #205 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #206 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #207 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #208 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #209 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #210 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #211 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #212 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #213 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #214 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #215 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #216 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #217 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #218 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #219 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #220 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #221 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #222 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #223 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #224 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #225 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #226 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #227 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #228 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #229 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #230 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #231 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #232 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #233 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #234 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #235 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #236 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #237 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #238 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #239 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #240 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #241 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #242 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #243 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #244 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #245 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #246 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #247 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)
    #248 0x6123e8 in PoDoFo::PdfDictionary::findKeyParent(std::basic_string_view<char, std::char_traits<char> > const&) const (/root/target/Invariants/podofo-0.10.0/build_clang/target/podofopdfinfo+0x6123e8)

SUMMARY: AddressSanitizer: stack-overflow /root/test/fuzzing_python/llvm-project-llvmorg-12.0.0/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3 in __asan_memcpy
==2639991==ABORTING

Environment

  • OS: Ubuntu 20.04.1
  • clang:12.0.0
  • podofo:0.10.0

we built podofo with AddressSanitizer (ASAN) .

cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_C_FLAGS="-O0 -fsanitize=address" -DCMAKE_CXX_FLAGS="-O0 -fsanitize=address"

1 Attachments
poc_file.zip

Please add BeginMarkedContentWithProperties function

Hi!

There are functions BeginMarkedContext and EndMarkedContext in PdfPainter class corresponding to BMC and EMC commands.
Could you please add BeginMarkedContextWithProperties function for BDC command?
And also, it might be better to rename *Conte_x_t to *Conte_n_t.

void PdfPainter::BeginMarkedContentWithProperties(const string_view& tag)
{
    checkStatus(StatusDefault);
    m_stream << "/OC /" << tag << " BDC" << endl;
}

Performance of some operations significatly decreased compared to 0.9.x

Hello,

This is not a bug, but PoDoFo 0.10.x significantly decreased performance compared to 0.9.x in some scenarios.

Look, in my algorithms I often call:

auto * font = doc->GetFonts().SearchFont( name.toLocal8Bit().data(), params );

And in this method you have:

string PdfFont::ExtractBaseName(const string_view& fontName, bool& isItalic, bool& isBold)
{
    // TABLE H.3 Names of standard fonts
    string name = (string)fontName;
    regex regex;
    smatch matches;
    isItalic = false;
    isBold = false;
    
    // NOTE: For some reasons, "^[A-Z]{6}\+" doesn't work
    regex = std::regex("^[A-Z][A-Z][A-Z][A-Z][A-Z][A-Z]\\+", regex_constants::ECMAScript);
    if (std::regex_search(name, matches, regex))
    {
        // 5.5.3 Font Subsets: Remove EOODIA+ like prefixes
        name.erase(matches[0].first - name.begin(), 7);
    }

    regex = std::regex("[,-]BoldItalic", regex_constants::ECMAScript);
    if (std::regex_search(name, matches, regex))
    {
        name.erase(matches[0].first - name.begin(), char_traits<char>::length("BoldItalic") + 1);
        isBold = true;
        isItalic = true;
    }

    regex = std::regex("[,-]BoldOblique", regex_constants::ECMAScript);
    if (std::regex_search(name, matches, regex))
    {
        name.erase(matches[0].first - name.begin(), char_traits<char>::length("BoldOblique") + 1);
        isBold = true;
        isItalic = true;
    }

    regex = std::regex("[,-]Bold", regex_constants::ECMAScript);
    if (std::regex_search(name, matches, regex))
    {
        name.erase(matches[0].first - name.begin(), char_traits<char>::length("Bold") + 1);
        isBold = true;
    }

    regex = std::regex("[,-]Italic", regex_constants::ECMAScript);
    if (std::regex_search(name, matches, regex))
    {
        name.erase(matches[0].first - name.begin(), char_traits<char>::length("Italic") + 1);
        isItalic = true;
    }

    regex = std::regex("[,-]Oblique", regex_constants::ECMAScript);
    if (std::regex_search(name, matches, regex))
    {
        name.erase(matches[0].first - name.begin(), char_traits<char>::length("Oblique") + 1);
        isItalic = true;
    }

    regex = std::regex("[,-]Regular", regex_constants::ECMAScript);
    if (std::regex_search(name, matches, regex))
    {
        name.erase(matches[0].first - name.begin(), char_traits<char>::length("Oblique") + 1);
        // Nothing to set
    }

    // 5.5.2 TrueType Fonts: If the name contains any spaces, the spaces are removed
    name.erase(std::remove(name.begin(), name.end(), ' '), name.end());
    return name;
}

You use regular expressions, that are dramatically slow. Really, I see that one of my test runs ~5 seconds with PoDoFo 0.10.x, whereas with 0.9.x it was fractions of second.

Could you in your spare time refuse from using regular expressions? They are evil...

PoDoFo throws exception on doc with obj with Fl encoding

Hi!

I found the PDF document with Fl encoding of stream.
It crashes doc load in PoDoFo.

PDF Reference 1.7
APPENDIX H
3.3, “Filters”
9. Acrobat viewers accept the abbreviated filter names shown in Table H.1 in
addition to the standard ones. Although the abbreviated names are
intended for use only in the context of inline images (see Section 4.8.6, “Inline Images”), they are also accepted as filter names in any stream object.

The sample PDF is in the attachment fl.pdf.
> podofotxtextract fl.pdf

Error: An error 33 ocurred during processing the pdf file.
ERROR:

PoDoFo encountered an error. Error: 33PdfErrorCode::UnsupportedFilter Callstack: #0 Error Source : main\PdfParserObject.cpp: 96 Information: Unable to parse the stream for object 9 0 R
#1 Error Source : private\PdfDeclarationsPrivate.cpp: 382 Information: Fl

Possible bugs?

void PdfPainterPath::AddLineTo(double x1, double y1, double x2, double y2)
{
    checkClosed();
    beginPath(*m_stream, x1, x2);
    addLine(*m_stream, x2, y2);
    closePath(*m_stream);
}
/home/igor/Work/Projects/md-pdf/3rdparty/podofo/src/podofo/main/PdfPainter.cpp:1216: warning: unused parameter ‘y1’ [-Wunused-parameter]
/home/igor/Work/Projects/md-pdf/3rdparty/podofo/src/podofo/main/PdfPainter.cpp: In member function ‘void PoDoFo::PdfPainterPath::AddLineTo(double, double, double, double)’:
/home/igor/Work/Projects/md-pdf/3rdparty/podofo/src/podofo/main/PdfPainter.cpp:1216:50: warning: unused parameter ‘y1’ [-Wunused-parameter]
 1216 | void PdfPainterPath::AddLineTo(double x1, double y1, double x2, double y2)
      |                                           ~~~~~~~^~
void PdfPainterPath::AddCubicBezierTo(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
{
    checkClosed();
    beginPath(*m_stream, x1, y2);
    addCubicBezier(*m_stream, x2, y2, x3, y3, x4, y4);
    closePath(*m_stream);
}
/home/igor/Work/Projects/md-pdf/3rdparty/podofo/src/podofo/main/PdfPainter.cpp:1230: warning: unused parameter ‘y1’ [-Wunused-parameter]
/home/igor/Work/Projects/md-pdf/3rdparty/podofo/src/podofo/main/PdfPainter.cpp: In member function ‘void PoDoFo::PdfPainterPath::AddCubicBezierTo(double, double, double, double, double, double, double, double)’:
/home/igor/Work/Projects/md-pdf/3rdparty/podofo/src/podofo/main/PdfPainter.cpp:1230:57: warning: unused parameter ‘y1’ [-Wunused-parameter]
 1230 | void PdfPainterPath::AddCubicBezierTo(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
      |                                                  ~~~~~~~^~

What `PdfTextRenderingMode` should do (+ missing strikeout/underline)?

I tried different text rendering modes, but see the difference only with Fill and Stroke.

In the following code

painter.BeginText( 50, 750 );
painter.GetTextState().SetFont( *font, 24 );
painter.GetTextState().SetRenderingMode( PdfTextRenderingMode::Fill );
painter.AddText( "Hello World!!!" );
painter.EndText();

draws as regular font. Setting rendering mode to Stroke draws text a little bold, is it intended behavior?

What should do FillStroke mode? Now the text is invisible.

Is it possible to draw strikeout text? How, if so?

Thank you.

Signing a rotated PDF using an image: the signature is valid, the image is not where you want it

What am i trying to do?

I'm trying to put a visible signature (an image) on a pdf that has a rotation (90, 180, 270).

What do I get?

Signature is valid but the image is not positioned correctly

Previously on PoDoFo 0.9.x

static void update_matrix (
                                                 PdfPainter& painter,
                                                 int rotationAngle,
                                                 const PdfRect &annot_rect
                                                 )
{
    
    /* ROTATION */
    
    double radAngle = rotationAngle * M_PI / 180;
    
    int cosA = (int)cos(radAngle);
    int sinA = (int)sin(radAngle);
    
    switch (rotationAngle) {
        case 0:
            painter.SetTransformationMatrix(cosA, sinA, -sinA, cosA, 0, 0);
            break;
        case 90:
            painter.SetTransformationMatrix(cosA, sinA, -sinA, cosA, annot_rect.GetWidth(), 0);
            break;
        case 180:
            painter.SetTransformationMatrix(cosA, sinA, -sinA, cosA, annot_rect.GetWidth(), annot_rect.GetHeight());
            break;
        case 270:
            painter.SetTransformationMatrix(cosA, sinA, -sinA, cosA, 0, annot_rect.GetHeight());
            break;
        default:
            break;
    }
}

and than on static void draw_annotation( PdfDocument& document, PdfPainter& painter, int argc, char *argv[], const PdfRect &annot_rect )

[...]

            PdfImage image( &document );
            image.LoadFromFile( filename );

            double dScaleX = fWidth / image.GetWidth();
            double dScaleY = fHeight / image.GetHeight();

/// NEW LINES
            update_matrix( painter, rotationAngle, annot_rect );
            
            if (rotationAngle == 90 || rotationAngle == 270) {
                 dScaleX = fHeight / image.GetWidth();
                 dScaleY = fWidth / image.GetHeight();
             }
/// END NEW LINES

            painter.DrawImage( fLeft,
                              fTop,
                              &image,
                              dScaleX,
                              dScaleY
                              );

So what I did

static void update_matrix(
                                   PdfPainter& painter,
                                   int rotationAngle,
                                   const Rect& annot_rect
                                   )
{
    /* ROTATION */
    
    double radAngle = rotationAngle * M_PI / 180;
    
    int cosA = (int)cos(radAngle);
    int sinA = (int)sin(radAngle);
    
    auto matrix = Matrix::FromCoefficients(cosA, sinA, -sinA, cosA, 0, 0);
    
    switch (rotationAngle) {
        case 0:
        {
            matrix = Matrix::FromCoefficients(cosA, sinA, -sinA, cosA, 0, 0);
            break;
        }
        case 90:
        {
            matrix = Matrix::FromCoefficients(cosA, sinA, -sinA, cosA, annot_rect.Width, 0);
            break;
        }
        case 180:
        {
            matrix = Matrix::FromCoefficients(cosA, sinA, -sinA, cosA, annot_rect.Width, annot_rect.Height);
            break;
        }
        case 270:
        {
            matrix = Matrix::FromCoefficients(cosA, sinA, -sinA, cosA, 0, annot_rect.Height);
            break;
        }
        default:
            break;
    }
    
    painter.GraphicsState.SetCurrentMatrix(matrix);
}
            auto image = document.CreateImage();
            image->Load(filename);
            
            double scaleX = annot_rect.Width / image->GetWidth();
            double scaleY = annot_rect.Height / image->GetHeight();

/// NEW LINES
            update_matrix( painter, rotationAngle, annot_rect );

            /* ROTATION */
            if ( rotationAngle == 90 || rotationAngle == 270 )
            {
                scaleX = annot_rect.Height / image->GetWidth();
                scaleY = annot_rect.Width / image->GetHeight();
            }
/// END NEW LINES
            
            double scale = std::min(scaleX, scaleY);
            
            if (scale < 1.0)
            {
                painter.DrawImage(*image, 0.0, 0.0, scale, scale);
            }
            else
            {
                // Center Image
                double x = (annot_rect.Width - image->GetWidth()) / 2.0;
                double y = (annot_rect.Height - image->GetHeight()) / 2.0;
                painter.DrawImage(*image, x, y);
            }

TEST FILES:
blank_90.pdf
blank_90-1 Firmato.pdf
blank_90 Firmato-podofo-0.9.x.pdf

PS: the same thing happens if I wanted to add some text.

Thanks for your help!

tilingpattern use PdfXObject

i add a new method in tilingpattern, use PdfXObject replace PdfImage, the PdfXObject is one page of a document. but show nothing

There are no first some drawn text on the next created pages

Could you clarify the following situation - I create a page, do drawing on it, finish it, create second page and the same as on first one, but I don't see the text on the second page. In more complex case I see that on the second page don't draw only some first text. Look.

#include <podofo/podofo.h>

using namespace PoDoFo;

int main()
{
	PdfMemDocument doc;

	PdfPainter painter;

	auto * font = doc.GetFonts().SearchFont( "Droid Serif" );

	auto & p1 = doc.GetPages().CreatePage( PdfPage::CreateStandardPageSize( PdfPageSize::A4 ) );

	painter.SetCanvas( p1 );

	painter.BeginText( 50, 750 );
	painter.GetTextState().SetFont( *font, 24 );
	painter.AddText( "Hello World!!!" );
	painter.EndText();

	painter.FinishDrawing();

	auto & p2 = doc.GetPages().CreatePage( PdfPage::CreateStandardPageSize( PdfPageSize::A4 ) );

	painter.SetCanvas( p2 );

	painter.BeginText( 50, 750 );
	painter.GetTextState().SetFont( *font, 24 );
	painter.AddText( "Hello World!!!" );
	painter.EndText();

	painter.FinishDrawing();

	doc.Save( "1.pdf" );

	return 0;
}

And the result of this application:

1.pdf

OK, I'm sorry for your time, maybe at this time I should do my homework again?

Incorrect include in PdfVersion.h

When compiling podofobrowser I ran into an issue with /usr/local/include/podofo/main/PdfVersion.h:28
which should be:

#include <podofo/auxiliary/podofo_config.h>

Replace use of std::regex with google re2

std::regex is used here and here. We could migrate to a faster solution that has some unicode support, such as google re2, at the cost of loosing "full" ECMAScript support (is it really that useful or most notations we used are supported by google re2 as well?). Consider adding it as a submodule. Related to #30

Who did do a mistake?

In PdfFont::GetStringLength() I caught an exception here:

const string& PdfString::GetRawData() const
{
    if (m_data->State != PdfStringState::RawBuffer)
        throw runtime_error("The string buffer has been evaluated");

    return m_data->Chars;
}

What is going on:

const auto str = createPdfString( *it );

const auto length = font->GetStringLength( str, fontSt );

where:

PdfString
PdfRenderer::createPdfString( const QString & text )
{
	return PdfString( text.toUtf8().data() );
}

My string PdfString::m_data->State = PoDoFo::PdfStringState::Ascii and my application crashes in PdfString::GetRawData().

Who is wrong?

`OpenSSL` 3.x.x support

Qt 6.5.0 has arrived, and I'm unable to use this version of Qt in my application because PoDoFo requires OpenSSL 1.x.x,
whereas Qt 6.5.0 built with OpenSSL 3.x.x.

So I ask you to add support of OpenSSL 3.x.x to PoDoFo.

pdftilingpattern code maybe mistake

PdfTilingPattern.cpp at line 137 rRect.SetHeight(-pImage->GetHeight());
I think the right code should be rRect.SetHeight(pImage->GetHeight());
is it right?

Bug in PdfIndirectObjectList::Create*Object if number of objects is more than 2^16

Hi.

I found the following issue: the call of PdfIndirectObjectList::CreateObject function return PdfObject with wrong object number if the total amount of objects in document is more than 2^16.
The bug is in in PdfReference PdfIndirectObjectList::getNextFreeObject().
File PdfIndirectObjectList.cpp, Line 195

uint16_t nextObjectNum = static_cast<uint16_t>(m_ObjectCount);;

Please change variable type for casting from uint16_t to uint32_t
It should be

uint32_t nextObjectNum = static_cast<uint32_t>(m_ObjectCount);

Use of undeclared identifier 'OSSL_LIB_CTX_new'

Hi,

I'm trying to compile PoDoFo but when the compiler build the PdfEncrypt.cpp file (both from Unix Makefiles and Xcode) I get this error: Use of undeclared identifier 'OSSL_LIB_CTX_new'
I've installed OpenSSL3 with libcrypto, fontconfig, freetype, jpeg, tiff and lua

The OS is MacOS 13.2.1 x86_64

What I have to do?
Maybe I miss some libraries?

Thanks
Luca

PdfDifferenceEncoding::Create throws exception for Font with StandardEncoding

Hi,

PdfDifferenceEncoding::Create throws the exception with the following description:

PoDoFo encountered an error. Error: 31PdfErrorCode::InvalidFontData Error Description: The font data is invalid. Callstack: #0 Error Source : main/PdfDifferenceEncoding.cpp: 2516 Information: Invalid /BaseEncoding StandardEncoding

for the following Font object

390 0 obj
<<
/Type /Font
/BaseFont /HPDFAB+Symbol_A
/Encoding <<
/Type /Encoding
/BaseEncoding /StandardEncoding
/Differences [  32 /space  33 /exclamdown  34 /cent  35 /sterling  36 /currency
 37 /yen  38 /brokenbar  39 /section  40 /dieresis  41 /copyright
 42 /ordfeminine  43 /guillemotleft  44 /logicalnot  45 /hyphen  46 /registered
...
 122 /fa  123 /fb  124 /fc  125 /fd  126 /fe
 127 /ff  132 /Ntilde ]
>>
/FirstChar  32
/FontDescriptor  552 0 R
/LastChar  255
/MissingWidth  806
/Subtype /TrueType
/Widths [  0  0  0  0  0  0  0  0  0  0
 ...
 0  0  0  0 ]
>>
endobj

Could you please add "StandardEncoding" processing in PdfDifferenceEncoding::Create.

Global declared object of OpenSSLInit class (PdfEncrypt.cpp) can throw exception from constructor and crash application on start

Hi!

There is an OpenSSLInit class in PdfEncrypt.cpp and the global s_SSL object of this class.
Class has a constructor that can throw an exception. The problem is that it cannot be catched because s_SL constructor is called before main(). In case of an error during initialization of OpenSSL, the program crashes before the start of main().
It is better to redesign OpenSSLInit.

Let's discuss linking with `Conan` packages on MacOS

I did a research, and that what I found. In Conan everything is normal, if use all libraries from Conan everything is fine. The problem occurs when I want to use Fontconfig installed in system, and all other dependencies from Conan. Fontconfig from Conan useless, as it doesn't have system configuration files, it works, but with UI, Qt for example, it leads to use wrong fonts in the UI.

What happens on MacOS. When CMake found system Fontconfig it adds include directories where its headers are placed, usually this is /usr/local/include. And ops... There usually places libjpeg headers too. And clang compiles PoDoFo with system headers of libjpeg, that are version 80, but links to Conan libjpeg, that are version 90. And you know what then happens.

The same will be and with vcpkg on MacOS, if you will decide to use system Fontconfig.

And I'm in struggle... What should I do?

Let discuss about fonts in PoDoFo 0.10.0

Hello,

I use PoDoFo 0.9.8 in one my pet project, I see that you merged pdfmm into PoDoFo and now it's 0.10.0 version, and API incompatible with previous version. OK, I decided to make a branch of my project and switch into PoDoFo 0.10.0.

What I figured out is PdfFont metrics for concrete font can be obtained after setting font to PdfPainter with actual size. Oh, uh, this is very-very unusable. Metrics of the font uses to calculate a lot of stuff during creating PDF from scratch. Very often I need to create two different fonts and obtain them metrics for some calculations, and only after set some font to painter and do drawing, what impossible with the new API.

So, could you consider ability for obtaining metrics of the font without setting him to painter?

Thanks.

`PdfImage::LoadFromBuffer()` segfaults on MacOS

The following code segfaults on MacOS in PdfImage::LoadFromBuffer().

#include <podofo/podofo.h>
#include <fstream>
#include <iostream>
#include <vector>
#include <exception>

using namespace PoDoFo;

int main()
{
	std::ifstream file( "1.jpg", std::ios::in | std::ios::binary );

	if( file.is_open() )
	{
		std::vector< char > content;

		file.seekg( 0, std::ios::end );
		const auto ssize = file.tellg();
		content.resize( (size_t) ssize );
		file.seekg( 0, std::ios::beg );
		file.read( &content[ 0 ], ssize );

		file.close();

		PdfMemDocument doc;

		std::cout << "image buffer size " << content.size() << std::endl;

		auto pdfImg = doc.CreateImage();

		try {
			pdfImg->LoadFromBuffer( { &content[ 0 ], content.size() } );

			return 0;
		}
		catch( const std::exception & x )
		{
			std::cout << x.what() << std::endl;
		}
		catch( ... )
		{
			std::cout << "Unknown exception";
		}

		return 1;
	}
	else
		std::cout << "Unable to open 1.jpg file.\n";

	return 1;
}

I created a repository to reproduce the problem as I don't have MacOS.

https://github.com/igormironchik/podofo_jpg_img

This happens only on MacOS. On Linux and Windows everything is fine.

Not sure about image format, checked with JPG - fails. If you want I can check for PNG.

PNG files are non drawn

Hello everybody,

what i'm trying to do is draw a png in a signature box.

            PdfRect annot_rect(0.0, 0.0, 200.0, 100.0);
            PdfPainter painter;

            painter.SetCanvas(*sigXObject);
            painter.Save();
            painter.Restore();
            auto image = document.CreateImage();
            image->Load(filename);
            
            double left = 0.0;
            double top = 0.0;
            double width = image->GetWidth();
            double height = image->GetHeight();

            double scaleX = annot_rect.GetWidth() / width;
            double scaleY = annot_rect.GetHeight() / height;
            double scale = std::min(scaleX, scaleY);
            
            if (scale < 1.0)
            {
                painter.DrawImage(*image, 0.0, 0.0, scale, scale);
            }
            else
            {
                // Center Image
                double x = (annot_rect.GetWidth() - width) / 2.0;
                double y = (annot_rect.GetHeight() - height) / 2.0;
                painter.DrawImage(*image, x, y);
            }

            painter.FinishDrawing();

Basically it is the code of the podofosign tool.

The same code allows me to use jpg files instead.

Analyzing the old podofo code I found on PdfImage::SetImageData:

    PdfVariant var;
    m_rRect.ToVariant( var );
    this->GetObject()->GetDictionary().AddKey( "BBox", var );

    this->GetObject()->GetStream()->Set( pStream, vecFilters );

So I tried adding these new lines on PdfImage::SetDataRaw:

    PdfArray arr;
    GetRect().ToArray(arr);
    auto var = PdfVariant(arr);
    dict.AddKey( "BBox", var );


    PdfFilterList filters;
    filters.push_back( PdfFilterType::FlateDecode );

    if (info.Filters.size() == 0)
        GetObject().GetOrCreateStream().SetData(stream, filters, true);
    else
        GetObject().GetOrCreateStream().SetData(stream, info.Filters, true);

the result, however, has not changed.

#define PNG_LIBPNG_VER_STRING "1.6.39"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.39 - November 20, 2022\n"

Thanks for your help!

Attached:

blank-signed-jpg.pdf
blank-signed-png.pdf
image
image

`helloworld` example doesn't work and more...

helloworld example fails with:

PoDoFo encountered an error. Error: 1PdfErrorCode::InvalidHandle
Error Description: A nullptr handle was passed, but initialized data was expected.
Callstack:      #0 Error Source : base/PdfEncoding.cpp: 82
Information: The provided string can't be converted to CID encoding

Add following lines to helloworld example:

// You could set a different color than black to draw
// the text.
// 
// painter.SetColor(1.0, 0.0, 0.0);

PdfTextState st;
st.FontSize = 8.0;
st.RenderingMode = PdfTextRenderingMode::Fill;

auto length = font->GetStringLength( "ABCDEFGHIKLMNOPQRSTVXYZ", st );

std::cout << "Length of \"ABCDEFGHIKLMNOPQRSTVXYZ\": " << length << std::endl;

// Actually draw the line "Hello World!" on to the PdfPage at

I want to say that font->GetStringLength( "ABCDEFGHIKLMNOPQRSTVXYZ", st ); returns 0, that is an error.

cmake build failing with "missing: OPENSSL_CRYPTO_LIBRARY"

On Windows (x64), I tried to build with OpenSSL 3.0.7 - it failed.
I also tried 1.1.1s (exactly the one from the podofo-deps repository)
Still getting the same error:
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found
version "1.1.1s")

This is what I use for the CMake arguments:
-DOPENSSL_INCLUDE_DIR=C:\PoDoFo\podofo-deps-master\3rdparty\openssl\include
-DOPENSSL_CRYPTO_LIBRARY=C:\PoDoFo\podofo-deps-master\3rdparty\openssl\lib\Win64\crypto.lib

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.