Sozi icon indicating copy to clipboard operation
Sozi copied to clipboard

PDF-export does not succeed

Open edmundlaugasson opened this issue 2 years ago • 6 comments

Describe your problem or propose a new feature in the following sections. Keep the headings and replace the paragraphs with your own text.

Summary of your problem or feature request

Trying to export result into PDF. Separate pop-up window opens, shows first slide and then stops. No PDF-file is produced. Then I just close Sozi. I used earlier SVG-file and Sozi files, just edited a bit and wanted to export into PDF again.

Version of Sozi and other relevant software

  • Which version of Sozi are you using? v22.03.25
  • Which drawing software did you use? Inkscape 1.2.1 (9c6d41e410, 2022-07-14)
  • On which platform? EndeavourOS with KDE, all updates done + rebooted, still not exporting PDF
  • If your problem happens when playing a presentation, which browsers have you tried? No issues here.

Steps to reproduce the problem

  • open *.svg file
  • make some slides in Sozi
  • try to export PDF
  • additional window opens but nothing more and no PDF created

Expected behavior

PDF-file is produced

Observed behavior

No PDF-file.

Hints and solutions (optional)

Tried also *.AppImage - still same issue. Haven't exported since this version came out, so did not discover, that PDF-exporting is not working. I guess that separate pop-up window would not be needed. I remember from earlier times, that each slide will be showed in that pop-up window during export. I guess we have seen our document already in Inkscape, Sozi. I propose to allow to configure in Sozi, whether such pop-up will be opened during export or not.

edmundlaugasson avatar Aug 10 '22 19:08 edmundlaugasson

It would help if you could check the JavaScript error console while running the PDF export and tell me whether you get error messages. See Helping debug Sozi for details.

I will try to reproduce the problem in your specific OS, but PDF export should be platform-independent.

I propose to allow to configure in Sozi, whether such pop-up will be opened during export or not.

To save each page of the PDF, Sozi needs to display it in a window. It would be great if we could hide this window but last time I checked it did not work.

aumouvantsillage avatar Sep 12 '22 08:09 aumouvantsillage

My results:

ELECTRON_ENABLE_LOGGING=1 sozi /path/to/file/file.svg

[299380:0912/234132.765026:INFO:CONSOLE(121)] "__dirname=/opt/sozi-22.03.25/resources/app.asar/src/js", source: /opt/sozi-22.03.25/resources/app.asar/src/js/Storage.js (121)
[299380:0912/234133.059544:INFO:CONSOLE(182)] "Using handler: Inkscape", source: /opt/sozi-22.03.25/resources/app.asar/src/js/svg/SVGDocumentWrapper.js (182)
[299380:0912/234203.344071:INFO:CONSOLE(300)] "Exporting /path/to/file/file.sozi.html to PDF", source: /opt/sozi-22.03.25/resources/app.asar/src/js/exporter/index.js (300)
[299380:0912/234204.229145:INFO:CONSOLE(534)] "Unsupported message: loaded", source: file:///path/to/file/file.sozi.html (534)
[299380:0912/234204.535095:WARNING:ipc_message_attachment_set.cc(49)] MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[299380:0912/234204.535547:WARNING:ipc_message_attachment_set.cc(49)] MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[299380:0912/234204.791578:INFO:CONSOLE(368)] "Uncaught (in promise) Error: Failed to generate PDF", source: /opt/sozi-22.03.25/resources/app.asar/src/js/exporter/index.js (368)

I guess I don't need to include those referred files as you presumably already have them. EndeavourOS can be downloaded here. You can easily test as live session either in virtual machine or Live USB. For Live USB stick/disk is easy way to use Ventoy.

Pop-up window can be if needed. Just guessed, that perhaps it is not necessary to show it and if not shown, perhaps the load for computer is smaller. Just could not find practical value for pop-up window. But most critical, that PDF-export works.

edmundlaugasson avatar Sep 12 '22 21:09 edmundlaugasson

When you wrote:

I remember from earlier times, that each slide will be showed in that pop-up window during export.

Did you mean that in the current version you didn't see each slide in the pop-up window?

aumouvantsillage avatar Sep 13 '22 07:09 aumouvantsillage

I remember from earlier times, that each slide will be showed in that pop-up window during export.

Did you mean that in the current version you didn't see each slide in the pop-up window?

That's true...

edmundlaugasson avatar Sep 17 '22 23:09 edmundlaugasson

OK. So it means that rendering your presentation fails even before attempting to save it to PDF.

I understand that you do not use this feature often. Have you tried to export several presentations and got the same error, or dit it work in some cases ?

aumouvantsillage avatar Sep 18 '22 18:09 aumouvantsillage

OK. So it means that rendering your presentation fails even before attempting to save it to PDF.

Actually HTML-version of presentation is rendered fine. Only PDF-exporting fails.

I understand that you do not use this feature often.

Actually I need to export near every presentation into PDF also. People would like to print them also out. Certainly I can send also *.html file but somehow PDF is quite often preferred by people, I guess due to printing need mainly. Actually also people cannot select+copy text from HTML but from PDF there is possible to select and copy text. E.g. hold certain key to pause animation and just allow to select+copy text would be appreciated. Currently I solve it so, that I make also *.svg available - then people can select and copy text from there.

Have you tried to export several presentations and got the same error, or dit it work in some cases ?

Does not matter, which presentation I try to export - none works. I tried to create brand new slides in Inkscape and then export via Sozi into PDF - did not work either. In same computer and OS with earlier version of Sozi I've exported PDFs.

edmundlaugasson avatar Sep 18 '22 22:09 edmundlaugasson

I have just published a Beta release that addresses this issue. I had to upgrade several pieces of software that Sozi uses internally, so I think it still deserves a testing period before being officially considered as the new stable release.

aumouvantsillage avatar Sep 23 '22 20:09 aumouvantsillage

Thank you! Now I could export to PDF and that PDF opened fine and was readable. I used AppImage version. Here is the output from command line:

./Sozi-22.9.23-1663961842.appimage 
[266153:0925/190944.195320:ERROR:angle_platform_impl.cc(43)] Display.cpp:992 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[266153:0925/190944.195415:ERROR:gl_surface_egl.cc(831)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[266153:0925/190944.195424:ERROR:gl_surface_egl.cc(1353)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[266153:0925/190944.331033:ERROR:angle_platform_impl.cc(43)] Display.cpp:992 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[266153:0925/190944.331059:ERROR:gl_surface_egl.cc(831)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[266153:0925/190944.331089:ERROR:gl_surface_egl.cc(1353)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[266153:0925/190944.331098:ERROR:gl_ozone_egl.cc(23)] GLSurfaceEGL::InitializeOneOff failed.
[266153:0925/190944.335449:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[266166:0925/190944.485698:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.

edmundlaugasson avatar Sep 25 '22 16:09 edmundlaugasson

Thanks for your feedback. The error messages that you see can be safely ignored.

aumouvantsillage avatar Sep 25 '22 18:09 aumouvantsillage

I can confirm that the export to pdf works now.

ejvindh avatar Nov 30 '22 10:11 ejvindh

I encountered the same problem. Slides do not progress on .pdf export (only pptx works) OS: Linux Mint 21.1 x86_64 Sozi Version: 22.03 (.AppImage)

Running .pptx export from terminal yields the following warning message: (node:40464) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

RichardScharf avatar Jun 25 '23 15:06 RichardScharf

@RichardScharf This issue is supposed to be solved by version 22.09 Beta. Have you tried it.

aumouvantsillage avatar Jun 25 '23 16:06 aumouvantsillage

I used to have the same issue with the official v22.03.25. I've updated to the Beta v22.09.23 and I can as well confirm that the integrated pdf-conversion tool is now properly working. Thank you very much!

kingofbroccoli avatar Jul 04 '23 15:07 kingofbroccoli