Hello Dominik,

Thanks for your fast response, I really appreciate it.
I did more tests and found that my implementation caused the problem.
For some reason the combination of Objective C and C++ caused a memory problem.
I have now changed the way I implemented it and it works fine.

Best regards,
Marco


On Oct 14, 2010, at 5:23 PM, Dominik Seichter wrote:

> Hi Marco,
> 
> I just saw that load on demand can only be disabled when using PdfParser 
> directly and not with PdfMemDocument (why so ever?). So, you would have to 
> use 
> PdfParser and PdfVecObjects directly. I don't know if this is an option for 
> you at the moment. I hope to add some code in the future to also allow to 
> disable on demand loading from within PdfMemDocument, maybe through 
> EPdfLoadMode similar to the EPdfWriteMode I introduced yesterday.
> 
> Can you also please send me an example PDF and maybe some example code, which 
> causes the problem?
> 
> Cheers,
>       Dominik
> 
> PS: Please always reply also to the mailing list, so that other who have the 
> same problem can benefit from our discussion.
> 
> Am Thursday 14 October 2010 schrieb Marco Leoné [MusicReader]:
>> Hello Dominik,
>> 
>> Many thanks for your response. Today I was finally able to try again.
>> 
>> All PDFs I try have a pieceInfo in it.
>> The results of my tests also prove that there is a pieceInfo.
>> So it's certainly not NULL.
>> 
>> How do I disable the LoadOnDemand?
>> I see a lot of places where it's used, but where should I disable it?
>> Hopefully you can tell me how so I can try that.
>> Thanks!
>> 
>> Best regards,
>> Marco Leoné
>> 
>> 
>> 
>> Leoné MusicReader B.V.
>> Erve Stroomboer 45
>> 7623 JC Borne , The Netherlands
>> 
>> Website: http://www.musicreader.net
>> E-mail: [email protected]
>> 
>> Dutch Trade Register: 08087290
>> Statutory Seat: Borne, The Netherlands
>> VAT Number: NL8189.54.826.B01
>> 
>> 
>> 
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]]
>> Sent: maandag 11 oktober 2010 5:48
>> To: [email protected]
>> Cc: Marco Leoné [MusicReader]
>> Subject: Re: [Podofo-users] Problem With DelayedLoad in PdfVariant
>> 
>> Hi Marco,
>> 
>> Can it be that pieceInfo is NULL? I.e. the GetIndirectKey() returns a NULL
>> object, because the PieceInfo directory is not available in the PDF?
>> 
>> Another thing you could try, is to disable the LoadOnDemand mechanism? Does
>> it work if you disable it? (Even though, this is obviously no long term
>> solution on an iPhone)
>> 
>> Cheers,
>>      Dominik
>> 
>> Am Donnerstag 07 Oktober 2010 schrieb Marco Leoné [MusicReader]:
>>> Hello everyone,
>>> 
>>> 
>>> 
>>> Can someone please give me a suggestion for the problem below?
>>> 
>>> It’s looks like something that can easily be solved by one of the
>>> PoDoFo developers.
>>> 
>>> Thanks!
>>> 
>>> 
>>> 
>>> Best regards,
>>> Marco Leoné
>>> 
>>> <http://www.musicreader.net/> MusicReader
>>> 
>>> Leoné MusicReader B.V.
>>> 
>>> Erve Stroomboer 45
>>> 
>>> 7623 JC Borne , The Netherlands
>>> 
>>> Website: http://www.musicreader.net
>>> E-mail: [email protected]
>>> 
>>> Dutch Trade Register:
>>> <http://www.kvk.nl/Minitools/bannergenerator/handelsframeBannerEXT.asp
>>> ?url= h
>>> ttps://server.db.kvk.nl/TST-BIN/FU/tsws...@?butt=08087290&kenmerk=bann
>>> er>
>>> 
>>> 08087290
>>> 
>>> Statutory Seat: Borne, The Netherlands VAT Number: NL8189.54.826.B01
>>> 
>>> 
>>> 
>>> 
>>> 
>>> From: Marco Leone [MusicReader] [mailto:[email protected]]
>>> Sent: maandag 4 oktober 2010 11:34
>>> To: [email protected]
>>> Subject: [Podofo-users] Problem With DelayedLoad in PdfVariant
>>> 
>>> 
>>> 
>>> Hello everyone,
>>> 
>>> 
>>> 
>>> Today I encountered a problem which I hope one of you can help with.
>>> 
>>> I'm running PoDoFo on iOS (iPhoneOS) and it running very well.
>>> 
>>> 
>>> 
>>> However when I try to run my application I have this problem:
>>> 
>>> 1) I try to parse a PDF File.
>>> 
>>> 2) From a page I extract a PieceInfo object using this code:
>>>                               page =
>>> 
>>> document->GetPagesTree()->GetPage(pageNumber);
>>> 
>>>                               pieceInfo =
>>> 
>>> page->GetObject()->GetIndirectKey("PieceInfo");
>>> 
>>>  This is successful there is no problem with this part, it give me
>>> 
>>> the object.
>>> 
>>> 3)But when I try:
>>>  pieceInfo->GetIndirectKey(name);
>>> 
>>>  Then I get a EXC_BAD_ACCESS error and the application exits.
>>> 
>>>     The trace of the error is listed below this e-mail.
>>> 
>>>     It happen when executing the line
>>> 
>>>                const_cast<PdfVariant*>(this)->DelayedLoadImpl();
>>> 
>>>  in PoDoFo::PdfVariant::DelayedLoad at PdfVariant.h:531.
>>> 
>>> This looks like a bug, but I'm unable to understand what happens.
>>> 
>>> Can someone please help me with this?
>>> 
>>> It looks like a bug in PoDoFo, maybe one of you can find the cause or
>>> at least give me a suggestion on how to continue.
>>> 
>>> 
>>> 
>>> Thanks!
>>> 
>>> 
>>> 
>>> Best regards,
>>> 
>>> Marco
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> #0        ??
>>> 
>>> #1        0x0000d92e in PoDoFo::PdfVariant::DelayedLoad at
>> 
>> PdfVariant.h:531
>> 
>>> #2        0x0000d949 in PoDoFo::PdfVariant::GetDataType at
>> 
>> PdfVariant.h:556
>> 
>>> #3        0x000187bf in PoDoFo::PdfVariant::IsDictionary at
>>> 
>>> PdfVariant.h:182
>>> 
>>> #4        0x00086634 in PoDoFo::PdfObject::GetIndirectKey at
>>> PdfObject.cpp:196
>>> 
>>> #5        0x0000f4a9 in PieceInfo::getString at PieceInfo.h:79
>>> 
>>> #6        0x0000ee06 in -[PageSettings readVariablesFrom:] at
>>> PageSettings.mm:66
>>> 
>>> #7        0x0000f16f in -[PageSettings initFrom:withPieceInfo:] at
>>> PageSettings.mm:39
>>> 
>>> #8        0x00019e23 in FileHandlerImpl::getSettingsOfPage at
>>> FileHandlerImpl.h:67
>>> 
>>> #9        0x000183e8 in -[FileHandler getSettingsOfPage:] at
>>> FileHandler.mm:57
>>> 
>>> #10      0x000170c0 in -[DisplayHandler displayPage] at
>>> DisplayHandler.mm:148
>>> 
>>> #11      0x00016e33 in -[DisplayHandler loadFile:] at
>>> DisplayHandler.mm:53
>>> 
>>> #12      0x0000d5f5 in -[PoDoFoTestAppDelegate
>>> application:didFinishLaunchingWithOptions:] at
>>> PoDoFoTestAppDelegate.mm:43
>>> 
>>> #13      0x00560944 in -[UIApplication
>>> _performInitializationWithURL:payload:]
>>> 
>>> #14      0x0056194f in -[UIApplication
>>> _runWithURL:payload:launchOrientation:]
>>> 
>>> #15      0x00567d3e in -[UIApplication handleEvent:withNewEvent:]
>>> 
>>> #16      0x005634f7 in -[UIApplication sendEvent:]
>>> 
>>> #17      0x0056b1d8 in _UIApplicationHandleEvent
>>> 
>>> #18      0x0336817c in PurpleEventCallback
>>> 
>>> #19      0x02a2489c in CFRunLoopRunSpecific
>>> 
>>> #20      0x02a238a8 in CFRunLoopRunInMode
>>> 
>>> #21      0x00561221 in -[UIApplication _run]
>>> 
>>> #22      0x00569372 in UIApplicationMain
>>> 
>>> #23      0x0000d174 in main at main.m:14
>> 
>> --
>> **********************************************************************
>> Dominik Seichter - [email protected]
>> KRename  - http://www.krename.net  - Powerful batch renamer for KDE
>> KBarcode - http://www.kbarcode.net - Barcode and label printing PoDoFo -
>> http://podofo.sf.net - PDF generation and parsing library SchafKopf -
>> http://schafkopf.berlios.de - Schafkopf, a card game,  for KDE Alan -
>> http://alan.sf.net - A Turing Machine in Java
>> **********************************************************************
> 
> 
> -- 
> Dominik Seichter - [email protected] - http://domseichter.blogspot.com
> KRename  - http://www.krename.net  - Powerful batch renamer for KDE
> KBarcode - http://www.kbarcode.net - Barcode and label printing
> PoDoFo - http://podofo.sf.net - PDF generation and parsing library

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to