Hi Matthew,

Thanks a lot for that. If it is long un-maintained I do better not trying to spend too much time on it, it isn't essential for me to get it to work and I'd overwhelm you with questions. However if that can help you in maintaining the project flag it up and I will spend some time on it.

I am very keen in getting the "main" lib to do what and I am getting stuck, or "lost in a glass of water" as we use to say in Italy. What I want to achieve is reasonably simple: I want to list all XObjects and their subtype for a given page.

I am banging my head here (sorry about the formatting, I've been wrestling with Thunderbird to get it right):

.. for all pages ..
PoDoFo::PdfPage *page = document.GetPage(i);
PoDoFo::PdfObject
   *xobject = page->GetResources()
                  ->GetDictionary().GetKey(PoDoFo::PdfName("XObject"));
    if (xobject == NULL)
         continue;
    auto it = xobject->GetDictionary().begin();
    while (it != xobject->GetDictionary().end()) {
     std::cout << it->first.GetName() << ","
     << it->second->Reference().ObjectNumber() << " "
     << it->second->Reference().GenerationNumber()
     << std::endl;
     std::cout <<
      document.GetObjects()
->GetObject( it->second->Reference())->GetDataTypeString() CRASH!
     << std::endl;
     ++it;
   }


It crashes all the time as the object cannot be loaded for some reason, which became obvious when I checked the ObjectNumber()/GenerationNumber pair which seems to be 0,0 all the time.

What the correct approach to do what I want with PoDoFo ?

Thanks again,
Pietro

On 06/09/2019 20:59, Matthew Brincke wrote:
Hello Pietro, hello all,
On 06 September 2019 at 19:33 Pietro Paolini 
<pietro.paol...@cognitivecredit.com> wrote:


Hi all,

I am following the instruction to compile the PoDoFo browser from the page:

http://podofo.sourceforge.net/download.html


the PoDoFoBrowser hasn't been changed/maintained for the whole decade (from 
2011,
of course) so it's "normal" that it can break on newer systems.

However at the moment of the checkout I get an error with externals.

   U   trunk
svn: warning: W205011: Error handling externals definition for
'trunk/externals/required_libpodofo':
svn: warning: W170013: Unable to connect to a repository at URL
'http://podofo.svn.sourceforge.net/svnroot/podofo/podofo/tags/RELEASE_0_8_4'
Checked out revision 1998.
svn: E205011: Failure occurred processing one or more externals definitions

That URL is outdated, please use the svn checkout option --ignore-externals for
your "main" checkout and then manually checkout the tag using the current URL
https://svn.code.sf.net/p/podofo/code/podofo/tags/RELEASE_0_8_4 but note well
that it's very outdated and likely to be very broken compared to current PoDoFo.
PoDoFoBrowser also has probably never been tested since Qt 4.3 was released.



Is there anything I am doing wrong ?

Except trying to get something long unmaintained, not really (please see above
for a workaround, but the whole browser thing hasn't been tested for long, so
it's very likely to break).


Thanks,

Pietro


Best regards, mabri


_______________________________________________
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