eneam / mboxviewer

A small but powerfull app for viewing MBOX files
Other
432 stars 24 forks source link

PDF conversion is broken #64

Closed jorussell1 closed 1 month ago

jorussell1 commented 2 months ago

I can't get a pdf to generate. I've tried with Microsoft Edge, Google Chrome, and the custom script; each is broken in its own separate way.

Here's what happens for each method

chrome

  1. It prompts me to change my path for chrome
  2. I do so and run it again
  3. When clicking on view file I get a file not find error
  4. when clicking on show file location I can see there is an html file but no pdf

edge

  1. Edge produces an html file and no pdf

    Custom script

  2. Custom script produces an html file and no pdf

What I expect to happen

I want it to produce a pdf.

zigm commented 2 months ago

Thanks for raising the issue. I discovered the issue yesterday and have a fix. One of the command line options to Edge/Chrome have changed suddenly from "--headless to --headless=old". Also, It looks that "--headless=old" option will eventually be obsoleted in the future and "--headless=new" should be used.

I will need to make a new release to resolve the issue. It will take probably more than few days unfortunately because I am currently prototyping support for other languages than English. I let you know when I have a new load.

There is work around until new load is available if you are interested. Please follow the below steps:

  1. Select "File->Print Config" and then select "User Defined Script" option.

  2. Update the last part of path to script as follow (path will differ in your case): From: G:\C\mboxview-releases\mbox-viewer.exe-v1.0.3.44\scripts**HTML2PDF-single-wkhtmltopdf.cmd To: G:\C\mboxview-releases\mbox-viewer.exe-v1.0.3.44\scripts\HTML2PDF-single-chrome.cmd**

  3. Update the following line in the HTML2PDF-single-chrome.cmd file in the scripts folder as follow:

call "%CmdPath%" --headless=old --disable-gpu --print-to-pdf-no-header --no-pdf-header-footer --print-to-pdf="%PDFdir%\%HTMLNameBase%.pdf" "%HTMLFilePath%" Insert "=old" after "--headless"

Let me know if you are willing to make temporary change and whether it worked for you.

zigm commented 2 months ago

I see typo in my comment. The "\" was lost. Correction below:

Update the last part of path to script as follow (path will differ in your case): From: G:\C\mboxview-releases\mbox-viewer.exe-v1.0.3.44\scripts\HTML2PDF-single-wkhtmltopdf.cmd To: G:\C\mboxview-releases\mbox-viewer.exe-v1.0.3.44\scripts\HTML2PDF-single-chrome.cmd

zigm commented 2 months ago

@jorussell1 I released v1.0.3.45 to resolve the issue you reported. Thanks for detailed description of the problem.

Hope v1.0.3.45 works for you.

jorussell1 commented 2 months ago

Thank you for your quick response. That seems to resolve this issue on my machine. I'm going to try it once more on the intended user's machine and then I'll close this issue.