Onbeforeunload Not Working

onbeforeunload is typically implemented to ask user to take some actions before leaving the website. But somehow it does not work as intended as before, not sure since when, but it does not work in the latest Google Chrome browser.

  1. Custom Alert Message The message can no longer be customised. Even though you have specified the message, it will still display to you Changes that you made may not be saved.
Read more →

Running Multiple Libreoffice Process

LibreOffice tool can be used to convert MSOffice documents to pdf file. My team noticed that our system seems failed to convert the documents randomly after we are trying to run the process in parallel. Digging up the internet, I found that it is a common issue, https://bugs.documentfoundation.org/show_bug.cgi?id=37531. Fortunately there is a simple solution to that, by simply passing an additional parameter, to specify a different installation folder. lowriter -env:UserInstallation=file://$random_dir –convert-to pdf –outdir $output_dir $input_file I am adding -env:UserInstallation parameter additionally from our existing command.
Read more →

Handling Winmail Attachment

Somehow you will receive an email contains with only winmail.dat attachment when it is sent from Microsoft Outlook client. To handle this you will need TNEF command to extract the content. $ tnef –number-backups –save-body=filename_to_be –body-pref=H –directory=/path/to/output/folder /path/to/winmail/file 2>&1 –number-backups; there could be some attachments with the same name, so this will put a digit at the end of each of duplicated files, otherwise it will be overwritten e.g. file, file.
Read more →