Bug 80855 - FILESAVE: "PNG export" reformats whole document
Summary: FILESAVE: "PNG export" reformats whole document
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.5.2 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-03 13:57 UTC by jensbruhn
Modified: 2014-07-05 00:27 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
test document to show reformatting after dimension dialog (34.25 KB, application/vnd.oasis.opendocument.text)
2014-07-04 06:41 UTC, jensbruhn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jensbruhn 2014-07-03 13:57:21 UTC
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: 4.2.5.2 release
Comment 1 Yousuf Philips (jay) (retired) 2014-07-04 01:02:42 UTC
Hi jensbruhn,

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).
Comment 2 jensbruhn 2014-07-04 06:41:16 UTC
Created attachment 102237 [details]
test document to show reformatting after dimension dialog
Comment 3 jensbruhn 2014-07-04 06:49:59 UTC
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.
Comment 4 Yousuf Philips (jay) (retired) 2014-07-04 22:54:13 UTC
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.
Comment 5 Robinson Tryon (qubit) 2014-07-04 23:38:13 UTC
(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.
Comment 6 Yousuf Philips (jay) (retired) 2014-07-05 00:27:23 UTC
Hi jensbruhn,

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 >.