If you have any complaints or suggestions about our service or products, please post them here. Your comments will help us to make continuous progress.

Sat May 04, 2024 1:02 pm

I am running Spire.Office for Python in Docker using python:3.9-slim-bookworm.

The below code works on Windows with and without using a license file.
When running using bookworm, it works when I do not assign a license file. When assigning the license file it fails with exit code -11.

Python Code:

log = logging.getLogger(__name__)

process = Process(target=render_doc, args=(filename, pdf_filename))
process.start()
process.join(300)

if process.exitcode != 0:
log.warning(
'Process converting "%s" to PDF exited with code %s',
filename,
process.exitcode,
)

-> Process converting "/tmp/72e54130-a315-4dbf-a119-16a5aa0decaa.doc" to PDF exited with code -11

def render_doc(filename: str, pdf_filename: str) -> None:
"""."""
document = Document()
document.LoadFromFile(filename)
document.AcceptChanges()
document.JPEGQuality = 100
document.SaveToFile(pdf_filename, DocFileFormat.PDF)
document.Close()


Dockerfile:

FROM python:3.9-slim-bookworm

ARG DEBIAN_FRONTEND=noninteractive

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

ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1

COPY app/ /opt/app/
COPY *.py /opt/
COPY license.elic.xml /opt/

COPY requirements.txt ./
RUN pip install -r requirements.txt

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

Mon May 06, 2024 9:39 am

Hi,

Thanks for your message.
We will investigate this issue and reply to you ASAP.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 377
Joined: Mon Nov 07, 2022 8:10 am

Thu May 09, 2024 2:42 am

Hi,

Thanks for your patience!
I installed the debian bookworm system and generated the image with reference to your Dockerfile, but neither applying license nor not applying license reproduces the issue you described. I would suggest you to use License.SetLicenseKey() to apply the license and if you still have the problem, please provide your test file for us to investigate further. Thanks in advance!

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 377
Joined: Mon Nov 07, 2022 8:10 am

Thu May 23, 2024 3:39 am

I sent you a testcase via support@e-iceblue.com

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

Thu May 23, 2024 9:47 am

Hi,

Thanks for your kind sharing and feedback.
We will investigate it and get back to you as soon as possible.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 377
Joined: Mon Nov 07, 2022 8:10 am

Fri May 24, 2024 8:45 am

Hi,

Thanks for sharing the detailed project.
I have reproduced your issue and logged it in our bug tracking system as SPIREDOC-10557.Our development department will investigate and fix this issue and we will get back to you as soon as it is resolved. Sorry for any inconvenience caused.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 377
Joined: Mon Nov 07, 2022 8:10 am

Tue May 28, 2024 9:18 pm

Can you provide an ETA? This is blocking our production system.

Thank you.

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

Wed May 29, 2024 3:43 am

Hi,

Thank you for following up on this issue.
Upon further investigation, we have identified that the issue might be due to the license preventing process creation. We are conducting a deeper dive into this matter, and currently, we are unable to provide an ETA for a resolution. In the meantime, as a temporary workaround, you may refer to the code below to apply the license within the process. I've tested it on my end and it doesn't raise a RuntimeErrror. We sincerely apologize for the inconvenience caused and assure you that we are working diligently to investigate this issue further and find a more permanent solution.
Please feel free to reach out if you need any assistance or have any further questions.

Code: Select all
def _render_doc(filename: str, pdf_filename: str) -> None:
    """."""
    DocLicense.SetLicenseKey(licensekey)
    print('Render "%s" to "%s"' % (filename, pdf_filename))
    # Create a Document object
    document = Document()
    ...

def _render_ppt(filename: str, pdf_filename: str) -> None:
    """."""
    PresentationLicense.SetLicenseKey(licensekey)
    print('Render "%s" to "%s"' % (filename, pdf_filename))
    # Example: NB-salazalb-5000388-0001
    # Create a Presentation object
    presentation = Presentation()
    ...
...


Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 377
Joined: Mon Nov 07, 2022 8:10 am

Wed Jun 05, 2024 12:10 pm

Thank you very much, this will resolve the issue for now.

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

Return to Complaints & Suggestions