On Wed, Nov 17, 2010 at 12:34:12PM +0100, Reiner Miericke wrote:
> Am Mittwoch, 17. November 2010, 11:57:05 schrieb Michal Hocko:
> > On Wed, Nov 17, 2010 at 09:47:32AM +0100, Reiner Miericke wrote:
> > > Am Mittwoch, 10. November 2010, 13:19:56 schrieb Michal Hocko:
> > > > On Wed, Nov 10, 2010 at 11:50:34AM +0100, Reiner Miericke wrote:
> > > > 
> > > > 0.4.5. is the last released one.
> > > 
> > > yesterday I installed a0.4.5 version. But the effect still remains
> > > (removing page not possible). There is probably some bug in a library
> > > (SuSE 11.3).
> > 
> > Can you run pdfedit with -d 5 (pdfedit -d 5 > log 2>&1), try to remove
> > page which fails and send the log file?
> 
> of course:
> In the GUI I see following messages:
> 
> PDFedit 0.4.5
> > func_load()
> Datei geladen : 
> /home/bgv/ZBGV/ZeitschriftDesBergischenGeschichtsvereins-26.pdf
> > PageSpace.nextPage()
> > PageSpace.nextPage()
> > PageSpace.nextPage()
> > delCurrentPage()
> Unbekannter Fehler tauchte im Skript auf
> > removePageWithConditionalRefresh()
> ! Ausnahme im R?ckrufbehandler:onTreeRightClick
> > movePage(firstSelected(),1);parentReload()
> ! Ausnahme im R?ckrufbehandler:onTreeRightClick
> > movePage(page(),-1);rootReload()
> Unbekannter Fehler tauchte im Skript auf
> 
> where
> "Datei geladen" is "File loaded"
> "Unbekannter Fehler tauchte im Skript auf" is "Unknown error occured in 
> script"
> "Ausnahme im R?ckrufbehandler:onTreeRightClick" is "Exception in 
> CallbackHandler..."

If you run the application like: LC_ALL=POSIX pdfedit
you will get all messages in english (default language)

> 
> Attached is the debugging output as requested
> 
> -- 
> Mit freundlichen Gr?ssen
> Reiner Miericke

[...]
Here we are removing the page:

> 4:GUI:pdfeditwindow.cc:menuActivated:227: Performing menu action: 
> delCurrentPage()
> 5:KERNEL:cpdf.cc:getPagePosition:2512: 
> 5:KERNEL:cpdf.cc:getPagePosition:2524: Page found at pos=4
> 5:KERNEL:cpdf.cc:getPageCount:2444: 
> 5:KERNEL:cpdf.cc:getPageCount:2451: cached page count=245
> 5:KERNEL:cpdf.cc:removePage:3099: 
> 5:KERNEL:cpdf.cc:getPageCount:2444: 
> 5:KERNEL:cpdf.cc:getPageCount:2451: cached page count=245
> 5:UTILS:cpdf.cc:findPageDict:433: startPos=1 pos=4
> 5:UTILS:cpdf.cc:findPageDict:498: Page node is intermediate
> 5:UTILS:cpdf.cc:getCachedValue:270: key=1471 0
> 5:UTILS:cpdf.cc:getCachedValue:274: cache entry found. key=1471 0 value=245
> 5:UTILS:cpdf.cc:findPageDict:504: InterNode has 245 pages
> 5:UTILS:cpdf.cc:findPageDict:547: kid[0] node type=LeafNode
> 5:UTILS:cpdf.cc:findPageDict:547: kid[1] node type=LeafNode
> 5:UTILS:cpdf.cc:findPageDict:547: kid[2] node type=LeafNode
> 5:UTILS:cpdf.cc:findPageDict:547: kid[3] node type=LeafNode
> 5:UTILS:cpdf.cc:findPageDict:559: page at pos=4 found. Node reference 13 0

OK, we have found the page dictionary (pdf object that represents the
page). But if we check the object [13 0] then it turns out that this is
not a page dictionary. This would explain the following message which
says that the page object is not correct and so it throws an exception.

> 2:KERNEL:cpdf.cc:removePage:3126: Pages Kids field is not an array type=Ref

The strange thing is that I am not able to reproduce this. Here is what
I get when removing the 4th page[*]:
4:GUI:pdfeditwindow.cc:menuActivated:227: Performing menu action: 
delCurrentPage()
5:KERNEL:cpdf.cc:getPagePosition:2485: 
5:KERNEL:cpdf.cc:getPagePosition:2497: Page found at pos=4
5:KERNEL:cpdf.cc:getPageCount:2417: 
5:KERNEL:cpdf.cc:getPageCount:2424: cached page count=245
5:KERNEL:cpdf.cc:removePage:3056: 
5:KERNEL:cpdf.cc:getPageCount:2417: 
5:KERNEL:cpdf.cc:getPageCount:2424: cached page count=245
5:UTILS:cpdf.cc:findPageDict:406: startPos=1 pos=4
5:UTILS:cpdf.cc:findPageDict:471: Page node is intermediate
5:UTILS:cpdf.cc:getCachedValue:243: key=1217 0
5:UTILS:cpdf.cc:getCachedValue:247: cache entry found. key=1217 0 value=245
5:UTILS:cpdf.cc:findPageDict:477: InterNode has 245 pages
5:UTILS:cpdf.cc:findPageDict:520: kid[0] node type=InterNode
5:UTILS:cpdf.cc:getCachedValue:243: key=1218 0
5:UTILS:cpdf.cc:getCachedValue:247: cache entry found. key=1218 0 value=100
5:UTILS:cpdf.cc:findPageDict:406: startPos=1 pos=4
5:UTILS:cpdf.cc:findPageDict:471: Page node is intermediate
5:UTILS:cpdf.cc:getCachedValue:243: key=1218 0
5:UTILS:cpdf.cc:getCachedValue:247: cache entry found. key=1218 0 value=100
5:UTILS:cpdf.cc:findPageDict:477: InterNode has 100 pages
5:UTILS:cpdf.cc:findPageDict:520: kid[0] node type=InterNode
5:UTILS:cpdf.cc:getCachedValue:243: key=1219 0
5:UTILS:cpdf.cc:getCachedValue:247: cache entry found. key=1219 0 value=10
5:UTILS:cpdf.cc:findPageDict:406: startPos=1 pos=4
5:UTILS:cpdf.cc:findPageDict:471: Page node is intermediate
5:UTILS:cpdf.cc:getCachedValue:243: key=1219 0
5:UTILS:cpdf.cc:getCachedValue:247: cache entry found. key=1219 0 value=10
5:UTILS:cpdf.cc:findPageDict:477: InterNode has 10 pages
5:UTILS:cpdf.cc:findPageDict:520: kid[0] node type=LeafNode
5:UTILS:cpdf.cc:findPageDict:520: kid[1] node type=LeafNode
5:UTILS:cpdf.cc:findPageDict:520: kid[2] node type=LeafNode
5:UTILS:cpdf.cc:findPageDict:520: kid[3] node type=LeafNode
5:UTILS:cpdf.cc:findPageDict:532: page at pos=4 found. Node reference 11 0

And then the process of removing continues. The object with reference
[11 0] looks like a valid page dictionary. So either there is a bug in
page traversing or the document is somehow broken. 
How did you get to this document?
Coul you try to edit the delinearized document I have sent you earlier?


---
[*] - I have just delinearized the document you provided to me and
delinearized it with the current CVS snapshot, then changed the page to
4 and removed the page with the Remove Page button.

-- 
Michal Hocko

------------------------------------------------------------------------------
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/msIE9-sfdev2dev
_______________________________________________
Pdfedit-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdfedit-support

Reply via email to