podofo

Adding FreeText annotation to PDF

此生再无相见时 提交于 2020-03-20 05:58:27
问题 I am using podofo for doing PDF operations, like adding annotations, signatures etc as per my requirement in my iOS application. I have first tried the only sample for the podofo library available which works great. But the problem with the sample is the annotations added doesn't show in any preview like Google , Adobe Reader etc. Thats a problem. As per few guideline from Adobe I found that it requires to have Appearance Key for the FreeText annotation to appear. I have tried analyzing raw

Build PoDoFo on Windows MinGW

元气小坏坏 提交于 2019-12-11 16:29:19
问题 Hi I'm trying to compile PoDoFo 0.9.2 on Windows 7 with MinGW. I have successfully compiled freetype2 , OpenSSL and zlib . Because i want to create a 64bit application a have to set MinGW x64 compilers to cmake . So I'm running cmake like this cmake -G "MinGW Makefiles" -DCMAKE_C_COMPILER=c:/MinGW/x64/bin/gcc.exe -DCMAKE_RANLIB=c:/MinGW/x64/bin/ranlib.exe -DCMAKE_INSTALL_PREFIX=. -DPODOFO_NO_MULTITHREAD=TRUE -DCMAKE_RC_COMPILER=c:/MinGW/x64/bin/windres.exe -DCMAKE_MAKE_PROGRAM=c:/MinGW/x64

Include OpenSSL in a CMakeList.txt file

≯℡__Kan透↙ 提交于 2019-12-10 16:13:02
问题 I have a question for people who work with CMakeList.txt in C++. I want to use Podofo project (a project to parse & create pdf). So my main function is simple as: #include <iostream> #include <podofo/podofo.h> int main() { PoDoFo::PdfMemDocument pdf; pdf.Load("/Users/user/path/to.pdf"); int nbOfPage = pdf.GetPageCount(); std::cout << "Our pdf have " << nbOfPage << " pages." << std::endl; return 0; } My CMakeList.txt is: cmake_minimum_required(VERSION 3.7) project(untitled) set(CMAKE_CXX

PoDoFo Extract text + coords from a pdf

柔情痞子 提交于 2019-12-09 13:56:19
问题 I have been trying for a while to use the PoDoFo C++ library to extract text and lines (with their respective coordinates). But I have no way to do this. This is what I have so far: #include <iostream> #include <stdio.h> #include <vector> #include <podofo/podofo.h> using namespace PoDoFo; using namespace std; int main( int argc, char* argv[] ) { const char* filename = "hello.pdf"; PdfVecObjects *x = new PdfVecObjects(); PdfParser parser(x, filename); parser.ParseFile("hello.pdf"); for

How can I use the PoDoFo library for annotating PDFs on iOS?

邮差的信 提交于 2019-12-09 00:36:01
问题 I would like to annotate PDFs within an iOS application. I came across the PoDoFo library, but I'm not sure how to use this in an iOS application. Is it possible to use this library to annotate PDFs on iOS? If so, how? 回答1: Please do something like this. + (void)createUTFAnnotationTextOnPage:(NSInteger)pageIndex doc:(PdfDocument*)doc // PdfMemDocument instance rect:(PdfRect)rect title:(NSString*)title content:(NSString*)content bOpen:(Boolean)bOpen colorR:(double)r colorG:(double)g colorB:

Extract images with podofo from pdf pages

做~自己de王妃 提交于 2019-12-08 10:49:03
问题 I need to extract all images from a pdf file with podofo. Extracting all images from the file works well. I used the image extractor example for that. This receives all objects and iterates over them. But I need to iterate over pages and check for image objects on a page. Does anyone know how to do that? 回答1: Piggy backing off podofoimgextract, you could iterate each page, get the page resource object, check for an XObject or Image, and from here it's pretty much the exact same code that is

Copy Table of Contents from one PDF to another

痴心易碎 提交于 2019-12-06 19:33:19
问题 You might find it as duplicate of this Question, but I didnt get any solution there. My scenario is like I am creating a PDF from existing PDF with some edits. That all works fine. My question is I want to add metadata, table of contents, bookmarks, what ever you call that is in metadata of PDF to newly created PDF. I am not able to understand XMP format as suggested here. Is there any way I can directly add TOC to new PDF. I am using following function but it is not working at all.

PoDoFo c++ PDF library, polish characters

纵然是瞬间 提交于 2019-12-06 15:04:19
问题 I have a problem with encoding polish characters in PoDoFo library. This code generates invalid encoding of word 'Łódź' #include <podofo/podofo.h> using namespace PoDoFo; int main(int argc, char *argv[], char *env[]) { PdfStreamedDocument document("polish.pdf"); PdfPainter painter; PdfPage* pPage; pPage = document.CreatePage( PdfPage::CreateStandardPageSize( ePdfPageSize_A4 ) ); painter.SetPage( pPage ); PdfFont* pFont = document.CreateFont("Helvetica"); // PdfFont* pFont = document

Extract text from array TJ in PDF operator using PoDoFo lib

烈酒焚心 提交于 2019-12-05 07:20:21
问题 I am trying to extract text from a PDF file usind the PoDoFo library, it is working for the Tj operator and fails to do so for the (array) TJ operator. I ve found this piece of code(with my small modification) here : const char* pszToken = NULL; PdfVariant var; EPdfContentsType eType; PdfContentsTokenizer tokenizer( pPage ); double dCurPosX = 0.0; double dCurPosY = 0.0; double dCurFontSize = 0.0; bool bTextBlock = false; PdfFont* pCurFont = NULL; std::stack<PdfVariant> stack; while( tokenizer

Can I use C++ class members initialized in the initializer list, later in the list?

允我心安 提交于 2019-12-04 03:24:38
问题 I am rewriting some code to eliminate global variables and made a class constructor/destructor handle cleanup of some third party library resources, but I am concerned about some code which initializes one member from another member in the class initializer list. class MyPodofoDocument { public: // generates pdf to stream MyPodofoDocument(std::stringstream *pStringStream) : device(pStringStream), document(&device) { } private: PoDoFo::PdfOutputDevice device; PoDoFo::PdfStreamedDocument