How to use LibreOffice and unoserver to convert docx to pdf in Ubuntu/Debian

  1. Install LibreOffice and unoserver with the following commands:
  2. Make sure the environment is ok:
  3. Start unoserver and take a conversion in diffrerent command line prompt:

  4. If you encounter the font problem, you should add windows fonts to Linux with the following steps.
    1. Copy all fonts files under C:\Windows\Fonts
    2. Remove the .fon files
    3. Copy the font files to Linux and paste the files in /usr/share/fonts/win/. and you should create win directory by yourself.
    4. Update the font cache with the following commands in /usr/share/fonts/win/ :

      If you cannot find the commands, run
    5. You can also check the font status via fc-list
  5. Create a system service for unoserver in /etc/systemd/system/unoserver.service:

    You should also use systemctl daemon-reload to take effect. And if you want to make the service on startup, run systemctl enable daemon-reload

Bypass TPM check in Windows 11 Installation

  1. Press Shift + F10 to enter  the command prompt
  2. Type regedit to enter Windows Register Editor
  3. Go to HKEY_LOCAL_MACHINE\SYSTEM\Setup, and create “LabConfig” key
  4. Add three DWORD (32-bit) value,  BypassTPMCheck, BypassRAMCheck, BypassSecureBootCheck and set all the value to 1.
  5. Closed the regedit and command prompt and enjoy Windows 11 installation.