podofo | A simple pdf search engine with flask

 by   VieVie31 Python Version: Current License: MIT

kandi X-RAY | podofo Summary

kandi X-RAY | podofo Summary

podofo is a Python library. podofo has no bugs, it has a Permissive License and it has low support. However podofo has 20 vulnerabilities and it build file is not available. You can download it from GitHub.

My simple pdf search engine with flask running actually on my raspberry-pi, so I can access and search in my pdfs databe from everywhere !!. This code flask and sqlite3 for the web server and sql queries, for extracting pdfs informations it use pdfminer... Developped on raspian jessie lite and OS X 10.9 .
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              podofo has a low active ecosystem.
              It has 15 star(s) with 14 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              podofo has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of podofo is current.

            kandi-Quality Quality

              podofo has 0 bugs and 0 code smells.

            kandi-Security Security

              OutlinedDot
              podofo has 20 vulnerability issues reported (2 critical, 5 high, 13 medium, 0 low).
              podofo code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              podofo is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              podofo releases are not available. You will need to build from source code and install.
              podofo has no build file. You will be need to create the build yourself to build the component from source.
              It has 679 lines of code, 32 functions and 10 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed podofo and discovered the below as its top functions. This is intended to give you an instant insight into podofo implemented functionality, and help decide if they suit your requirements.
            • View for the uploaded files
            • Compute the md5 hash of a file
            • Insert a PDF into the database
            • Check if PDF already exists in the database
            • Insert word into database
            • Get the word count of words in a string
            • Return a connection to db
            • Convert PDF to text
            • Render a search page
            • Retrieve results from the database
            • Returns the number of PDFs in the database
            Get all kandi verified functions for this library.

            podofo Key Features

            No Key Features are available at this moment for podofo.

            podofo Examples and Code Snippets

            No Code Snippets are available at this moment for podofo.

            Community Discussions

            QUESTION

            How to Setup Podofo for visual studio?
            Asked 2021-Jun-06 at 17:12

            I'm trying to set up Podofo to Combining two PDF files from a vector std::vector inputfiles;

            here are my steps in detail (maybe it's very basic to many people but not to me):

            • download [podofo-0.9.7]
            • In vs2019, add #include "..podofo.h" and general/linker to COPYING.LIB settings (I'm not sure this)
            • build project i got error podofo_config.h not found so i changed file's name from podofo_config.h.in
            • on build, I got the following error:

            • I have read some post but there is very little information. I seem to need CMake, zlib,.. (I'm very new to building this type of project)

            • I have downloaded CMake3.30.3 and zlib1211

            • use CMake.exe to build zlib.lib but I can't find the exported library :

            Also what do I need to do to link zlib.lib with podofo? because when using Cmake to build podofo I get this error:

            Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) (do I need to copy-paste into that directory)

            How do I get over this problem?

            Thanks a ton!

            ...

            ANSWER

            Answered 2021-Jun-06 at 17:12

            Finally, I decided to go with the easier solution of wrapping by .net or using aspose.

            The problem has been resolved :)

            Source https://stackoverflow.com/questions/67844409

            QUESTION

            ld tool can find the library but mingw cannot (linux)
            Asked 2020-Nov-20 at 16:57

            Right now, I am trying to compile some C++ code that uses both PoDoFo and Magick++ (part of ImageMagick) using MinGW on linux. I'm using MinGW so I can compile for Windows. When I try to compile, I get this error:

            ...

            ANSWER

            Answered 2020-Nov-20 at 16:57

            Your ld find the library because it was compiled for linux which use elf64-x86-64 format. It is not compatible with mingw which will need libraries in pei format (probably pei-x86-64 format).

            In order to use this library you need to find the mingw version of the library or cross compile it yourself.

            Source https://stackoverflow.com/questions/64932996

            QUESTION

            Do C/C++ compilers typically remove duplicate libraries?
            Asked 2020-Jul-16 at 22:27

            I'm compiling a Static (added static after reading comments) C++ library PoDoFo and some of its dependencies are optional, such as libJPEG, libTiff and libPNG. Though, a lot of the libraries have an option to depend on one another as well. For instance you can enable JPEG support in libTiff by compiling libTIFF with libJPEG.

            In a perfect world I would hope that libTIFF would enable the libJPEG functions by realizing it has access to libJPEG because I included it in my compilation of PoDoFo. Sadly I think enabling/disabling functions is decided when I first compile libTIFF.

            So then that means my PoDoFo library will contain libJPEG multiple times, probably even identical copies if I use the same library.

            Will GCC compiler realize this and eliminate/relink the libraries to just one copy of libJPEG?

            ...

            ANSWER

            Answered 2020-Jul-16 at 05:38

            Assuming all library are dynamically linked, runtime linker would only load a single copy of each dependent library (so a single copy of libJPEG will be loaded).

            In a perfect world I would hope that libTIFF would enable the libJPEG functions by realizing it has access to libJPEG because I included it in my compilation of PoDoFo, but sadly I think enabling/disabling functions is decided when I first compiled libTIFF.

            The feature that you describe is called delayed loading and is supported in Windows but not on Linux (at least not by default, see Implib.so tool).

            Source https://stackoverflow.com/questions/62925906

            QUESTION

            How to determine PdfPage object emptiness?
            Asked 2020-May-14 at 21:24

            Let's have following snippet of code:

            ...

            ANSWER

            Answered 2020-May-14 at 21:24

            After few painful hours I've managed to solve the issue (could be done smarter, but whatever):

            Source https://stackoverflow.com/questions/61800289

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            In PoDoFo 0.9.5, there exists a heap-based buffer overflow vulnerability in PoDoFo::PdfTokenizer::GetNextToken() in PdfTokenizer.cpp, a related issue to CVE-2017-5886. Remote attackers could leverage this vulnerability to cause a denial-of-service or potentially execute arbitrary code via a crafted pdf file.
            An issue was discovered in PoDoFo 0.9.6. The PdfPagesTreeCache class in doc/PdfPagesTreeCache.cpp has an attempted excessive memory allocation because nInitialSize is not validated.
            A stack-based buffer over-read in the PdfEncryptMD5Base::ComputeEncryptionKey() function in PdfEncrypt.cpp in PoDoFo 0.9.6-rc1 could be leveraged by remote attackers to cause a denial-of-service via a crafted pdf file.
            The PoDoFo::PdfVariant::DelayedLoad function in PdfVariant.h in PoDoFo 0.9.6 allows remote attackers to cause a denial of service (NULL pointer dereference) via a crafted file, because of ImageExtractor.cpp.
            This vulnerability allows remote attackers to disclose sensitive information on vulnerable installations of PoDoFo. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within PdfEncoding::ParseToUnicode. The issue results from the lack of proper validation of user-supplied data, which can result in a memory corruption condition. An attacker can leverage this in conjunction with other vulnerabilities to execute arbitrary code in the context of the current process. Was ZDI-CAN-5673.
            The PoDoFo::PdfPage::GetInheritedKeyFromObject function in base/PdfVariant.cpp in PoDoFo 0.9.4 allows remote attackers to cause a denial of service (infinite loop) via a crafted file.
            The PoDoFo::PdfPainter::ExpandTabs function in PdfPainter.cpp in PoDoFo 0.9.5 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted PDF document.
            The PoDoFo::PdfSimpleEncoding::ConvertToEncoding function in PdfEncoding.cpp in PoDoFo 0.9.5 allows remote attackers to cause a denial of service (heap-based buffer over-read and application crash) via a crafted PDF document.
            PoDoFo 0.9.5 allows denial of service (infinite recursion and stack consumption) via a crafted PDF file in PoDoFo::PdfParser::ReadDocumentStructure (PdfParser.cpp).
            The function PdfPagesTree::GetPageNodeFromArray in PdfPageTree.cpp:464 in PoDoFo 0.9.5 allows remote attackers to cause a denial of service (infinite recursion and application crash) via a crafted PDF document.
            CVE-2017-8378 CRITICAL
            Heap-based buffer overflow in the PdfParser::ReadObjects function in base/PdfParser.cpp in PoDoFo 0.9.5 allows remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via vectors related to m_offsets.size.
            The PoDoFo::PdfXRefStreamParserObject::ReadXRefStreamEntry function in base/PdfXRefStreamParserObject.cpp:224 in PoDoFo 0.9.5 allows remote attackers to cause a denial of service (heap-based buffer over-read) or possibly have unspecified other impact via a crafted PDF file.
            An issue was discovered in PoDoFo 0.9.5. There is an Excessive Recursion in the PdfPagesTree::GetPageNode() function of PdfPagesTree.cpp. Remote attackers could leverage this vulnerability to cause a denial of service through a crafted pdf file, a related issue to CVE-2017-8054.
            In PoDoFo 0.9.5, there is an uncontrolled memory allocation in the PdfParser::ReadXRefSubsection function (base/PdfParser.cpp). Remote attackers could leverage this vulnerability to cause a denial-of-service via a crafted pdf file.
            In PoDoFo 0.9.5, there is an uncontrolled memory allocation in the PoDoFo::PdfVecObjects::Reserve function (base/PdfVecObjects.h). Remote attackers could leverage this vulnerability to cause a denial of service via a crafted pdf file.
            In PoDoFo 0.9.5, there exists an infinite loop vulnerability in PdfParserObject::ParseFileComplete() in PdfParserObject.cpp which may result in stack overflow. Remote attackers could leverage this vulnerability to cause a denial-of-service or possibly unspecified other impact via a crafted pdf file.
            PoDoFo::Impose::PdfTranslator::setSource() in pdftranslator.cpp in PoDoFo 0.9.6 has a NULL pointer dereference that can (for example) be triggered by sending a crafted PDF file to the podofoimpose binary. It allows an attacker to cause Denial of Service (Segmentation fault) or possibly have unspecified other impact.
            The function TextExtractor::ExtractText in TextExtractor.cpp:77 in PoDoFo 0.9.5 allows remote attackers to cause a denial of service (NULL pointer dereference and application crash) via a crafted PDF document.
            An issue was discovered in PoDoFo 0.9.6. There is an attempted excessive memory allocation in PoDoFo::podofo_calloc in base/PdfMemoryManagement.cpp when called from PoDoFo::PdfPredictorDecoder::PdfPredictorDecoder in base/PdfFiltersPrivate.cpp.

            Install podofo

            You can download it from GitHub.
            You can use podofo like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/VieVie31/podofo.git

          • CLI

            gh repo clone VieVie31/podofo

          • sshUrl

            git@github.com:VieVie31/podofo.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link