Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Mon Jul 22, 2024 3:25 pm

We have identified several issues when rendering .ppt files created with an older Office version to PDF:

Slideshow (1): The image seems to get cut off. The table gets shifted down and to the left. The mu symbols get converted to m.

Slideshow (2): The tables and images get shifted around. Arrows are missing arrow heads. Footers on the PowerPoint are missing. Symbols get changed (mu to m, q turns into box or q). One structure has an odd box around the ‘()n’

Slideshow (3): Similar problem to Slideshow (1). The image seems to get cut off. The table gets shifted down and to the left. The mu symbols get converted to m.

Slideshow (4): Images in the PowerPoint are being rendered as blurry. Footer is missing.

Slideshow (5): The text boxes, tables, and images get shifted around. Footers on the PowerPoint are missing. Symbols get changed (mu to m, q turns into q).

wolfgang.colsman
 
Posts: 30
Joined: Mon Jan 15, 2024 2:14 pm

Tue Jul 23, 2024 9:23 am

Hello,

Thanks for your inquriy.
Yes, I did reproduce your issues. And I have logged these issues to our tracking system, our dev team will investigate and fix them further. The following are the ticket numbers corresponding to the issues. In addition, Additionally, Additionally, regarding the issue of changes in unit symbols, it may be related to the "Symbol" font. Please install this font and retest. The attached screenshot is used to illustrate this issue.
Slideshow (1) --> SPIREPPT-2566
Slideshow (2) Slideshow (5) -->SPIREPPT-2563
Slideshow (3) -->SPIREPPT-2564
Slideshow (4) -->SPIREPPT-2565
Symbol.png


Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Mon Aug 12, 2024 3:32 pm

I have been working on adding the Symbol Font to our Dockerfile so that the symbols show up as you suggested in the previous message, but I am still unable to get the symbols to show up properly. I have tried installing various font packages such as fonts-opensymbol and fonts-symbola, but could not get the symbols to show. I have also manually installed a Symbol.ttf into the Dockerfile and then updated the font config and that did not seem to work either. Attached is the Dockerfile code being used with the manual install of the Symbol.ttf. Can you help direct me towards a solution for this Dockerfile.

Code: Select all
# Define global args
ARG DOCKER_REGISTRY
ARG RUNTIME_VERSION="3.12"
ARG SERVERLESS_TAG="3.38.0"

# Stage 1 - bundle base image + runtime
# Grab a fresh copy of the image

FROM $DOCKER_REGISTRY/python:${RUNTIME_VERSION}-slim-bookworm AS python-slim-bookworm

# Stage 2 - build function and dependencies
FROM python-slim-bookworm AS build-image

# Upgrade pip and wheel
RUN python3 -m pip install --upgrade pip && \
  pip3 install --upgrade wheel

# Install aws-lambda-cpp build dependencies
RUN apt-get update && \
  apt-get install -y \
  g++ \
  make \
  cmake \
  unzip \
  libcurl4-openssl-dev \
  git

# Include global args in this stage of the build
ARG SERVERLESS_TAG

# Create function directory
RUN mkdir -p /opt/

# Install Lambda Runtime Interface Client for Python
RUN python -m pip install awslambdaric --target /opt/

# Copy required files
COPY api/ /opt/api/
COPY *.py /opt/
COPY logging.yml /opt/
COPY license.elic.xml /opt/
COPY Amazon_Root_CA_1.pem /opt/

# Install the function's dependencies
COPY requirements.txt ./

# import pip install command including environment variables from secret location:
RUN --mount=type=secret,id=pip_install sh /run/secrets/pip_install

# Stage 3 - final runtime image
# Grab a fresh copy of the Python image
FROM python-slim-bookworm

# Required by xhtml2pdf
RUN \
  apt-get -y update && \
  apt-get -y install --no-install-recommends pkg-config libcairo2-dev gcc && \
  apt-get -y clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

# Required by Spire.
RUN \
  echo "deb http://deb.debian.org/debian bookworm contrib non-free" > /etc/apt/sources.list.d/contrib.list && \
  apt-get -y update && \
  apt-get -y install --no-install-recommends tk ttf-mscorefonts-installer fontconfig && \
  apt-get -y clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

COPY Symbol.ttf /usr/share/fonts/truetype/msttcorefonts/
RUN fc-cache -f -v

# Install libicu
RUN \
  apt-get -y update && \ 
  apt-get -y install --no-install-recommends libicu72 && \
  apt-get -y clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

# Disable the invariant mode
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
    LC_ALL=en_US.UTF-8 \
    LANG=en_US.UTF-8

# Set working directory to function root directory
WORKDIR /opt

# Copy in the built dependencies
COPY --from=build-image /opt /opt

# Add user
RUN adduser --home /home/lambda --shell /bin/bash --uid 3000 --gid 0 lambda
USER lambda

# Add entrypoint
ENTRYPOINT [ "python3", "-m", "awslambdaric" ]
CMD [ "api_handler.handler" ]


emarsh_zontal
 
Posts: 10
Joined: Tue Jul 23, 2024 5:27 pm

Tue Aug 13, 2024 8:33 am

Hello,

Thanks for your reply.
Please add the following command to your Dockerfile and retest. Please add the following command to the Dockerfile and test again. If it still doesn't work, I suggest you check whether the font is installed successfully in the container and use the python command to directly run the py file to check whether the result is correct.
Code: Select all
ENV LD_LIBRARY_PATH=/usr/share/fonts:usr/local/share/fonts

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Tue Aug 20, 2024 12:46 am

Setting LD_LIBRARY_PATH did not help. I shared our testcase using email

wolfgang.colsman
 
Posts: 30
Joined: Mon Jan 15, 2024 2:14 pm

Thu Aug 29, 2024 5:48 pm

Hello, I just wanted to know if I could get a status update on the these tickets:

SPIREPPT-2566
SPIREPPT-2563
SPIREPPT-2564
SPIREPPT-2565

emarsh_zontal
 
Posts: 10
Joined: Tue Jul 23, 2024 5:27 pm

Fri Aug 30, 2024 6:14 am

Hello,

Thanks for your feedback.
Sorry, there is no breakthrough progress on the your issue. I have raised the priority of your issues and the development team will further investigate the solutions. If there is any progress, I will inform you in time. Sorry for the inconvenience caused to you.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Wed Sep 11, 2024 12:44 pm

We have been able to resolve the issue with the Symbol font. The cause was that we did not run the image as root, so extra permissions needed to be given to the font files.

Dockerfile
Code: Select all
# Define global args
ARG DOCKER_REGISTRY
ARG RUNTIME_VERSION="3.11"

# Stage 1 - bundle base image + runtime
# Grab a fresh copy of the image
FROM $DOCKER_REGISTRY/python:${RUNTIME_VERSION}-slim-bookworm AS python-slim-bookworm

# Stage 2 - build function and dependencies
FROM python-slim-bookworm AS build-image

ENV DEBIAN_FRONTEND=noninteractive

# Upgrade pip, wheel and setuptools
RUN python3 -m pip install --upgrade pip && \
  pip3 install --upgrade wheel setuptools

# Install aws-lambda-cpp build dependencies
RUN apt-get update && \
  apt-get install -y \
  g++ \
  make \
  cmake \
  unzip \
  libcurl4-openssl-dev \
  git

# Create function directory
RUN mkdir -p /opt/

# Install Lambda Runtime Interface Client for Python
RUN python -m pip install awslambdaric --target /opt/

# Copy required files
COPY api/ /opt/api/
COPY *.py /opt/
COPY logging.yml /opt/
COPY license.elic.xml /opt/
COPY Amazon_Root_CA_1.pem /opt/

# Install the function's dependencies
COPY requirements.txt ./

# import pip install command including environment variables from secret location:
RUN --mount=type=secret,id=pip_install sh /run/secrets/pip_install

# Stage 3 - final runtime image
# Grab a fresh copy of the Python image
FROM python-slim-bookworm

# Required by xhtml2pdf
RUN \
  apt-get -y update && \
  apt-get -y install --no-install-recommends pkg-config libcairo2-dev gcc && \
  apt-get -y clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

# Required by Spire.
RUN \
  echo "deb http://deb.debian.org/debian bookworm contrib non-free" > /etc/apt/sources.list.d/contrib.list && \
  apt-get -y update && \
  apt-get -y install --no-install-recommends fontconfig tk ttf-mscorefonts-installer && \
  apt-get -y clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

# Install additional fonts
# https://www.fontsupply.com/fonts/
COPY fonts/* /usr/share/fonts/

# Address "Fontconfig error: No writable cache directories"
# Change the cache and usr font directory
# https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
RUN \
  sed -i 's/\/usr\/local\/share\/fonts/\/tmp\/fonts/g' /etc/fonts/fonts.conf && \
  sed -i 's/\/var\/cache/\/tmp\/cache/g' /etc/fonts/fonts.conf && \
  # Permissions for lambda user
  chmod 755 -R /etc/fonts && \
  chmod 755 -R /usr/share/fonts && \
  chmod 755 -R /usr/share/fontconfig && \ 
  # Rebuild font cache and list installed fonts
  fc-cache -fv && fc-list

# Disable the invariant mode
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
    LC_ALL=en_US.UTF-8 \
    LANG=en_US.UTF-8
   
# Install libicu
RUN \
  apt-get -y update && \ 
  apt-get -y install --no-install-recommends libicu72 && \
  apt-get -y clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

# Set working directory to function root directory
WORKDIR /opt

# Copy in the built dependencies
COPY --from=build-image /opt /opt

# Add user
RUN adduser --home /home/lambda --shell /bin/bash --uid 3000 --gid 0 lambda
USER lambda

# Add entrypoint
ENTRYPOINT [ "python3", "-m", "awslambdaric" ]
CMD [ "api_handler.handler" ]

wolfgang.colsman
 
Posts: 30
Joined: Mon Jan 15, 2024 2:14 pm

Wed Sep 11, 2024 1:17 pm

Any ETA on SPIREPPT-2566, SPIREPPT-2563, SPIREPPT-2564 and SPIREPPT-2565?

Sorry for pushing, this is impacting our production system.

Thank you

wolfgang.colsman
 
Posts: 30
Joined: Mon Jan 15, 2024 2:14 pm

Thu Sep 12, 2024 10:33 am

Hello,

Thanks for following up.
Sorry, there is no breakthrough on the above issues yet. I have raised them to the highest priority and the development will further investigate the solution. If there is any progress, I will inform you as soon as possible.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Mon Sep 23, 2024 1:12 pm

Hello,

I just wanted to check in with this issue set again. Sorry again for the push, I am just wondering if you have any relative timelines about these issues. Thank you for all of your help.

emarsh_zontal
 
Posts: 10
Joined: Tue Jul 23, 2024 5:27 pm

Tue Sep 24, 2024 9:17 am

Hello,

Thanks for your following up.
Sorry, due to the complexity of the issues, our development team has not made any breakthrough progress at present, so it is difficult for us to estimate the repair time. We will further investigate the solution, and I will notify you as soon as there is any progress. Sorry for any inconvenience caused to you.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Fri Oct 04, 2024 6:44 pm

Hi,

Just wanted to check in on this again. Is there progress on any of these tickets?

emarsh_zontal
 
Posts: 10
Joined: Tue Jul 23, 2024 5:27 pm

Tue Oct 08, 2024 10:37 am

Hello,

Thank you for your follow-up.
Sorry, the document you provided is in ppt format instead of pptx format. The document structure of this format is very complex. In addition, the pictures contained in the document are in wmf format. We currently do not have a suitable parsing solution for pictures in this format. Therefore, there is no breakthrough progress at present. Our development team will investigate further and I will inform you if there is any progress. Thank you for your understanding

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Tue Oct 22, 2024 11:57 am

Hi William,

you will also need to consider EMF files. Both WMF and EMF specifications are publicly available.
Thank you.

wolfgang.colsman
 
Posts: 30
Joined: Mon Jan 15, 2024 2:14 pm

Return to Spire.Presentation