Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Thu Sep 12, 2024 7:04 am

"ffi_prep_cif_var failed" exception was thrown when using some features of spire-pdf version 10.8.1 on Ubuntu 22.

keerthana_11
 
Posts: 2
Joined: Thu Sep 12, 2024 6:45 am

Fri Sep 13, 2024 6:37 am

Hello,

Thanks for your inquiry. I tested some features on Ubuntu 22, but the exception message you described did not occur. I am unable to determine which feature you are using. To help us investigate, please provide us with the complete code that can cause the exception you described(Please attach the input documents if any). You can upload here or send it to us via email( support@e-iceblue.com ). Thank you in advance.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 277
Joined: Mon Jul 15, 2024 5:40 am

Fri Sep 13, 2024 7:20 am

this is the code I'm trying to run in ubuntu 22

from spire.pdf.common import *
from spire.pdf import *

# Create a PdfDocument object
doc = PdfDocument()

# Initialize a variable to store the extracted text
all_text = ""

# Load a PDF document
doc.LoadFromFile(r"file_name")

# Loop through each page in the PDF using index
for page_number in range(doc.Pages.Count):
# Get the page using the index
page = doc.Pages[page_number]

# Create a PdfTextExtractor object for the current page
textExtractor = PdfTextExtractor(page)

# Create a PdfTextExtractOptions object
extractOptions = PdfTextExtractOptions()

# Set IsExtractAllText to True
extractOptions.IsExtractAllText = True

# Extract text from the page keeping white spaces
text = textExtractor.ExtractText(extractOptions)

# Append the extracted text to all_text
all_text += text + "\n" # Add a newline to separate pages

# Optionally print the text from each file
print(all_text)

this is the error encountered on using spire-pdf version 10.8.1: ffi_prep_cif_var failed

keerthana_11
 
Posts: 2
Joined: Thu Sep 12, 2024 6:45 am

Sat Sep 14, 2024 7:00 am

Hello,

Thank you for your feedback. I have successfully reproduced your issue using the code you provided. This issue has been logged in our bug tracking system under the number SPIREPDF-7039. Our Dev team will investigate it further, once there is any update, we will let you know.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 277
Joined: Mon Jul 15, 2024 5:40 am

Return to Spire.PDF