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.

Fri Dec 19, 2025 1:27 am

Hello Spire Support Team,

I'm experiencing a critical FFI (Foreign Function Interface) error when attempting to set shape position properties (Left and Top) using Spire.Presentation for Python on macOS. This is blocking a production application that relies on programmatic PowerPoint editing.

IMPORTANT NOTE: This issue is a deciding factor in our purchasing decision between Spire.Presentation and Aspose.Slides. We need a reliable solution for programmatic PowerPoint editing on macOS, and the ability to set shape positions is essential for our use case. If this cannot be resolved, we will need to proceed with Aspose.Slides instead.

ISSUE DESCRIPTION

When attempting to set the Left or Top properties on shape objects, the library throws a RuntimeError: ffi_prep_cif_var failed exception. This occurs even with simple operations:

from spire.presentation import Presentation, FileFormat

presentation = Presentation()
presentation.LoadFromFile("test.pptx")
first_slide = presentation.Slides[0]
shape = first_slide.Shapes[0]

# This line throws: RuntimeError: ffi_prep_cif_var failed
shape.Left = 500
shape.Top = 300

SYSTEM INFORMATION

Operating System: macOS (Darwin 24.6.0)
Python Version: 3.12.7 (also tested with 3.13.11 - same issue)
Spire.Presentation Version: 10.12.0
Architecture: x86_64 (Intel-based Mac)
Installation Method: pip install Spire.Presentation

ADDITIONAL OBSERVATIONS

1. Reading properties works fine: shape.Left and shape.Top can be read without errors
2. Text editing works: Setting text content via TextFrame.Paragraphs[0].Text works correctly
3. RectangleF creation also fails: Attempting to create RectangleF objects throws the same FFI error
4. Error is consistent: Occurs 100% of the time when trying to set position properties

SIMILAR ISSUES FIXED IN OTHER SPIRE PRODUCTS

I understand that similar FFI errors have been successfully resolved in other Spire products:

- Spire.Doc for Python 12.7.1 (July 2024): Fixed ffi_prep_cif_var failed exception on Ubuntu 22 (Ticket: SPIREDOC-10645)
- Spire.PDF for Python 10.11.2 (November 2024): Fixed ffi_prep_cif_var failed exception when extracting text on Ubuntu 22 (Ticket: SPIREPDF-7039)

Both fixes addressed libffi compatibility issues by recompiling the native bindings against the correct libffi version. I believe a similar fix is needed for Spire.Presentation on macOS.

BUSINESS IMPACT

This issue is blocking a production application that requires:
- Programmatic adjustment of shape positions (alignment fixes)
- Automated correction of spacing and layout issues
- Batch processing of PowerPoint presentations

Without the ability to set position properties, we cannot use Spire.Presentation for its intended purpose of programmatic PowerPoint editing.

QUESTIONS

1. Is there a known workaround for this issue on macOS?
2. Is this issue being tracked in your internal bug tracking system? If so, what is the ticket number?
3. What is the timeline for a fix similar to the ones implemented in Spire.Doc and Spire.PDF?
4. Do you need additional information or test cases to reproduce and fix this issue?

I am happy to provide:
- Additional system information
- Sample PPTX files that reproduce the issue
- More detailed error logs
- Testing on different macOS versions if needed

MINIMAL REPRODUCIBLE EXAMPLE

Here is a minimal reproducible example:

from spire.presentation import Presentation, FileFormat

try:
presentation = Presentation()
presentation.LoadFromFile("test.pptx")

first_slide = presentation.Slides[0]
if first_slide.Shapes.Count > 0:
shape = first_slide.Shapes[0]

# Reading works
current_left = shape.Left
current_top = shape.Top
print(f"Current position: {current_left}, {current_top}")

# Writing fails with FFI error
shape.Left = 500 # RuntimeError: ffi_prep_cif_var failed
shape.Top = 300

presentation.SaveToFile("output.pptx", FileFormat.Pptx2016)

presentation.Dispose()
except Exception as e:
print(f"Error: {type(e).__name__}: {e}")

FULL ERROR TRACEBACK

RuntimeError: ffi_prep_cif_var failed

Thank you for your attention to this matter. I look forward to your response and am available to assist with testing or providing additional information as needed.

thekatemeadows
 
Posts: 1
Joined: Wed Dec 17, 2025 9:45 pm

Fri Dec 19, 2025 4:02 am

Hello,

Thank you for providing the detailed information.
I reproduced your issue and logged it into our bug tracking system with the ticket SPIREPPT-3052. Our development team will investigate and address it as soon as possible, once it is resolved or there is any update, I will notify you immediately. Apologize for the inconvenience caused.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 341
Joined: Mon Apr 14, 2025 3:33 am

Wed Dec 24, 2025 6:08 am

Hello,

Our further investigation suggests that the issue is related to the Python version. Specifically, the issue occurs when using Python 3.12, but it does not appear in earlier versions such as Python 3.7 in our testing environment. As an interim solution, you may consider using an earlier version of Python (e.g., Python 3.7) to avoid this problem. In parallel, our Dev team will investigate SPIREPPT-3052 to develop a permanent fix for this issue in newer Python environments. We sincerely apologize for any inconvenience this may have caused and will keep you updated as we make progress.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 341
Joined: Mon Apr 14, 2025 3:33 am

Thu Jan 08, 2026 10:10 am

Hello,

Thank you for your patience.
We just release official version(Spire.Presentation.Python Version:11.1.0) which fixed the issue(SPIREPPT-3052), welcome to test. Looking forward to your testing feedback.
Website Link:https://www.e-iceblue.com/Download/Spire-Presentation-Python.html
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 341
Joined: Mon Apr 14, 2025 3:33 am

Return to Spire.Presentation

cron