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.

Tue Aug 20, 2024 10:35 am

While converting some PDF files to xls format, the spacing between words is lost for a given cell .
This happens for selected PDFs from some vendors. For other files, such issue is not observed. But for such PDFs the spacing is lost in all the words in that file, no exceptions.
e.g.
AMOUNTDUE
StatementDate:
MinimumService

If the same PDF is extracted to text file format, this issue is not observed.
Due to confidentiality we cannot share the document, but has this issue been reported ever and is there a solution.

abhijit.deshpande
 
Posts: 4
Joined: Wed Feb 07, 2024 3:27 pm

Wed Aug 21, 2024 7:57 am

Hello,

Thank you for your inquiry.You can use the following code to test problematic PDF documents. If the problem still exists. To help us solve your problem faster and more accurately, please provide us with your original input PDF document.You can upload here or send it to us via email( support@e-iceblue.com ). Thank you in advance.
Code: Select all
 PdfDocument pdf = new PdfDocument();
             pdf.LoadFromFile(@"input.pdf ");
            XlsxLineLayoutOptions xlsxLineLayoutOptions = new XlsxLineLayoutOptions(true, true, true);
            pdf.ConvertOptions.SetPdfToXlsxOptions(xlsxLineLayoutOptions);
            pdf.SaveToFile(@"output.xlsx", Spire.Pdf.FileFormat.XLSX);

Sincerely,
Amin
E-iceblue support team
User avatar

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

Return to Spire.PDF

cron