Hello Pietro, hello all,
> On 13 August 2019 at 12:53 Pietro Paolini 
> <pietro.paol...@cognitivecredit.com> wrote:
> 
> 
> Hi Matthew,
> 
> I spoke too early and I have another question if you don't mind me 
> hammering.
> 

I received your first email as second (sorted up in my mail client)
and have already answered it. 

... snip ...
> 
> I get many errors, among them:
> 
> [..]/lib/libpodofo.a(PdfFiltersPrivate.cpp.o): In function 
> `PoDoFo::PdfDCTFilter::EndDecodeImpl()':
> PdfFiltersPrivate.cpp:(.text+0x2146): undefined reference to 
> `jpeg_read_header'
> PdfFiltersPrivate.cpp:(.text+0x215f): undefined reference to 
> `jpeg_destroy_decompress'
> PdfFiltersPrivate.cpp:(.text+0x21bd): undefined reference to 
> `jpeg_start_decompress'
> PdfFiltersPrivate.cpp:(.text+0x22b5): undefined reference to 
> `jpeg_read_scanlines'
> PdfFiltersPrivate.cpp:(.text+0x24fd): undefined reference to 
> `jpeg_destroy_decompress'
>

The mention of libpodofo.a tells me you're using a static build
of libpodofo (yes, I know, it's the default ... ;-( ). The solution
is to either link to all the dependencies of your libpodofo build
(should be mentioned as found in the cmake output when configuring
the build), or to switch to a shared library build with cmake option
-DPODOFO_BUILD_SHARED:BOOL=TRUE and check that "Building shared PoDoFo library"
is in the output of cmake.

> I think they are all coming from the same root problem, I do have the 
> libjpeg-dev (Debian system) installed locally though and I wonder what 
> the problem may be.

Then podofo was automatically configured with JPEG support and you'll need
to link to the libjpeg it found in your project too (when using a static
libpodofo build). When using a shared library build and not doing make install,
using LD_LIBRARY_PATH (on GNU/Linux) or changing the dynamic linker config
would be required to have your program find the libpodofo shared library. For
podofo-built programs this is required only when moving the library to a
non-standard location, or accessing it through a different non-standard path
(like in a sandbox) because the build process embeds a run-path in them.

> 
> This is the CMakeLists.txt for my microscopic project:
> 
> ADD_EXECUTABLE(main main.cpp)
> TARGET_LINK_LIBRARIES(main ${PODOFO_INSTALL_TOP}/lib/libpodofo.a)
> INCLUDE_DIRECTORIES(${PODOFO_INSTALL_TOP}/include)

Here the TARGET_LINK_LIBRARIES line is missing the dependencies of your
static libpodofo.

I hope this helps, please specify operating system if it isn't a (modern)
GNU/Linux "distro" (distribution).

> 
> 
> Best Regards,
> Pietro.

Best regards, Matthew

> On 13/08/2019 11:27, Pietro Paolini wrote:
> > Hi Matthew,
> > 
> > Thanks a lot for your answer, I am not bothered at all and I amĀ  more 
> > than happy to stay on trunk - I just intended to flag this up.
> > I've also found that the example "pdfcontentsgraph" is not built as part 
> > of the main build.
> > 
> > Thanks,
> > P.
> > 
> > 
> > 
> > 
> > 
> > 
> > On 12/08/2019 23:36, Matthew Brincke wrote:
> >> Hello Pietro, hello all,
> >>> On 12 August 2019 at 23:24 Pietro Paolini 
> >>> <pietro.paol...@cognitivecredit.com> wrote:
> >>>
> >>>
> >>> Hi all,
> >>>
> >>> I've stumbled upon this library only a few days ago and I noticed that
> >>> the downloadable version from
> >>>
> >>> http://sourceforge.net/projects/podofo/files/podofo/0.9.6/podofo-0.9.6.tar.gz/download
> >>>  
> >>>
> >>>
> >>> Does not compile, at least on my system, while what I get right off
> >>> trunk does compile.
> >>
> >> in the meantime some issues were fixed which could have had made it 
> >> difficult
> >> to compile podofo, a number of security/crash issues were also fixed, 
> >> so it
> >> is definitely recommended to only use current svn trunk anymore. On 
> >> Tuesday,
> >> August 13, in the afternoon, I'll very probably commit (I'm a full 
> >> committer)
> >> a fix for issue #58 (plus some debug code to avoid such issues being 
> >> so difficult
> >> to debug as this was for me). I'd just like to run some further tests 
> >> with it,
> >> which are likely to pass, could you please hold out until then?
> >>>
> >>> I am exploring the possibility of using the library to inspect PDFs,
> >>> making some analysis on them and saving the PDF result of some
> >>> processing. A good example could be hidden text.
> >>>
> >>> It seems to be able to parse the input PDF and to "translate" in into an
> >>> a "PdfVecObjects" but I have not found - within the time I had available
> >>> for it, I should mention - a way to render the PDFs on screen.
> >>
> >> PoDoFo is suitable for analyzing PDF documents, modify them (text editing
> >> is still very limited, mostly adding is supported yet), and create them,
> >> but what it doesn't do at all (because it's outside its scope) is 
> >> rendering.
> >> There are other libraries for that, a popular free (open source) one is
> >> libpoppler (homepage URL https://poppler.freedesktop.org/ ), except 
> >> for some
> >> commenting functionality it does exclusively rendering (AFAIK), so 
> >> IMHO it's
> >> a good complement to PoDoFo which you'd use for the analysis and 
> >> transformation
> >> (sorry, colour space support is still rather limited, I hope that'll 
> >> change
> >> before 1.0 ;-) ).
> >>>
> >>> Is there an example somewhere for it ?
> >>
> >> For rendering, please see the libpoppler homepage, for creation, there 
> >> are
> >> examples in that directory under podofo trunk, for analysis, please see
> >> the tools directory's sub-directories there (podofopdfinfo could be a 
> >> good start).
> >>>
> >>> Thanks,
> >>> Pietro.
> >>>
> >>
> >> I hope this helps.
> >>
> >> Best regards, Matthew
> >>
> >>
> >> _______________________________________________
> >> Podofo-users mailing list
> >> Podofo-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/podofo-users
> >>
> 
> 
> _______________________________________________
> Podofo-users mailing list
> Podofo-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/podofo-users


_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to