I installed a node server in the docker and am using Libre Office. It works normally in a Windows environment, but in a Docker environment, the characters are broken and the cause is unknown. Below is an image of the docker file and broken letters.
FROM node:12-alpine
WORKDIR "/app"
COPY package*.json ./
RUN apk update && apk add libreoffice
# RUN npm install
RUN npm ci --only=production
COPY . .
CMD ["npm", "start"]
convert,
const libre = require(`libreoffice-convert`)
// Read file
const file = fs.readFileSync(enterPath);
// Convert it to pdf format with undefined filter (see Libreoffice doc about filter)
const status = await new Promise((resolve, reject) => {
libre.convert(file, pdfExtend, undefined, (err, done) => {
if (err) {
console.log(err)
reject(err)
}
// Here in done you have pdf file which you can save or transfer in another stream
fs.writeFileSync(outputPath, done);
resolve(200)
});
})
result,
help me