I want to export all pages of a large ODT Document to single PNG files. Important is a fast export of the first page to improve the user experience.
So I wrote a macro which uses jumpToPage and storeToURL with the “writer_png_Export” filter. This all works. But slow for large documents. It looks like the storeToURL reformats the whole document for every page export. I think, this shouldn’t be necessary.
It’s the same behaviour without macro. I open my large ODT file, so I can see the first page. Looks fine. Now I open menu, choose export/png. Now it reformats the whole document. Then it asks for the size and after that, it reformats the document again. Why? The first page is already shown and the export just takes the first page, so why is there a double reformat of the document? I think, this is a performance eating bug.
Operating System: Windows 7
Version: 22.214.171.124 release
Yes i see that in a large file, it will repaginate before the size dialog appears, but i dont have it repaginate a second time after that. It may take a few seconds for the saving of the page after okaying the size dialog dimensions, but it doesnt show the repaginate progress bar for me. If it does for you, can you possibly send us a file which will show this behaviour or alternatively send in a screencast.
As your intent is to export all the pages to single png files, i have filed another bug for that as an enhancement (bug 80879).
Created attachment 102237 [details]
test document to show reformatting after dimension dialog
I've added a test document. Choosing PNG export, you can see the repaginate progress and after entering the dimension your can see a second repaginate progress.
We are producing such an ODT document like the attached one with our software. Our target is to visualize the pages in a fast way, so we coded a macro to export all pages to PNG. We hoped to get the first page really fast, because LO doesn't have to render the whole document, but because of the repaginate progress (?) it takes a long time (some seconds). And exporting every single page causes a new repaginate progress.
Yes i noticed this time that it said repaginating after the dimension dialog, but similar to my previous test, that one lasted for 2 or 3 seconds, as the longer repagination happens before the dimension dialog appears.
So the main problem your having is that you cant export all the pages at once and for that i've opened bug 80879. I doubt there would be a means of stopping the repagination from happening each time it exports to png.
I will ask someone more experienced than I to look at this and see if anything can be done.
(In reply to comment #4)
> So the main problem your having is that you cant export all the pages at
> once and for that i've opened bug 80879.
Thanks for opening that bug. Now that I think about it, there might be an interesting workaround there, too.
> I doubt there would be a means of
> stopping the repagination from happening each time it exports to png.
> I will ask someone more experienced than I to look at this and see if
> anything can be done.
I don't know of any way to avoid the repagination, unfortunately. I agree that the underlying case (multi-page PNG export) would be the saner way to deal with the speed problem.
I'm closing this bug report. If you want a temporary workaround for this issue, Robinson has provided one in bug 80879, until the issue is dealt with. If this feature is urgently needed for your software, i'd suggest that you contact the developers at collabora for assistance < http://libreoffice-from-collabora.com >.