List of issues
: WARNING - support of the decompiler is now VERY LIMITED. There are no active developers. This means waiting times in the issue tracker are very long and mostly depend on community. Sorry for the inconvenience.
#583 Conversion of FlashPaper SWF to PDF and/or ODT (libreoffice) documenr
Assigned to: JPEXS
Hi JPEXS, It will be great to be able to convert a FlashPaper SWF to PDF and/or ODT (LibreOffice) document.
As we discussed via email, In latest nightly build, FlashPaper to PDF conversion is available via commandline. Here is part of your last email: ---- I've tried to run your nightly build but it take very long time (ok, not very a problem) and crash after 56 pages with a OOME (OutOfMemoryError). I've increased the memory allocated to the process but for large document (ex 128 pages) it stop with OOME also. For iText, it exist a LGPL fork available here: https://github.com/ymasory/iText-4.2.0 (cool, no ?) An alternative will be also to export document to ODT (LibreOffice Writer). Actually, only the test with a Zoom factor 5 is working for small documents (52 pages). But it's again a nightly build, so an alpha version and it will surely be optimized. ----
Assigned: → JPEXS
The problem with memory is because I convert all pages to images first and then write it to PDF. Maybe I could write them continually... The iText... I still have an anypathy for it because what they did to the license. I like the gnujpdf library, because it uses Graphics2d to generate PDF, which is very intuitive for me. The only problem is lack of Font embedding / Utf-8 support. I took a look in the PDF documentation and also seen PHP class TCPDF which and maybe I can implement the font embedding somehow into gnujpdf. And for ODT format... I guess there exist some Java libraries for it. Does ODT support font embedding?
Memory problem: Please try latest nightly build. It should be better for large documents.
Ough ! Storing all images in memory will clearly result in a OOME ... I agree with you, it's best to write them continually. Again I agree with you about iText. But the link I give you is a fork, so, no more link to the developper of iText. Yes, LibreOffice support font embedding since ODT specification 1.0 (see: https://bugs.freedesktop.org/show_bug.cgi?id=42195). It exist very many API in java for ODT generation. Examples: - http://jodreports.sourceforge.net/ (LGPL) (See also JODConvert !) - http://www.jopendocument.org/ (GPL) - http://incubator.apache.org/odftoolkit/odfdom/index.html (Apache licensed) Do you think it's possible to not put only a picture of the page, but well the objects like text, pictures, ... ? So, the resulting PDF or ODT will be full text searchable.
Oups, not seen your message from yesterday. I will try it now. I speak about ODT specification, but it's ODF specification, not ODT. And since specification 1.0 of ODF you can embed fonts in document.
Very sorry but the same problem occur. OutOfMemoryError :-( Did you already look at ODF (or DOC or RTF) conversion from FlashPaper in place of PDF ?
It's a lot work to do, I will take a look later. And currently, I am leaving for 14 day vacation, so you have to wait, sorry.
No problem ! If it's ok for you, I can implement it. But just to avoid browsing all the code, in which class did you create an image from the swf elements ? My work will be to create a ODF (or RTF) document containing all the elements of a page and not only a picture of the page. This way the document remain searchable and indexable. Is it ok for you ?
You didn't answer to my question, I suppose you're overbooked. Can I help ? I really need this fonctionnality (export to searchable pdf or LibreOffice format).
BitmapExporter class creates the image from a SHAPE object.