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 Jun 14, 2018 9:22 am

Hi,
we habe the following problem:
Our scanner create a pdf with many invoices. We use Spire.PDF to split this PDF in single pages. Now if we save this new PDF documents in a Microsoft SharePoint Document-Library the Office Web Apps could not open the file. The same problem occurs if I would open the new document in Microsoft Word. The original document from the scanner works. If I split the document than I receive the error. I attach a single page. I am able to open the PDF in Adobe or any other PDF-Viewer, but the Word-Conversion fails.
If I edit the splitted document with a PDF Editor than the documents works fine.
I tried the newest version of Spire.PDF.

How can I create PDFs with usage in a Word-Viewer?

Thanks.

Best

bipos
 
Posts: 3
Joined: Mon Apr 23, 2018 9:28 am

Thu Jun 14, 2018 9:41 am

Dear bipos,

Thanks for your inquiry.
In order to help us investigate your issue further, please share your input document rather than split file and the code you were using.

Besides, our Spire.PDF supports converting PDF to Word, might you could convert the split PDF to Word and then use MS Word to open it.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Jun 14, 2018 10:06 am

Hi,
I need the PDF. The Word Viewer only necessary to get a preview from SharePoint.

I tried the following:

Code: Select all
            doc.LoadFromFile(fileName);
            string pattern = "Splitfile-{0}.pdf";
            doc.Split(pattern);
            doc.Close();


The second trial:

Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(fileName);
               
for (int j = 0; j < pageSplit.Length - 1; j++)
{
        PdfDocument pdf1 = new PdfDocument();
        PdfPageBase page = null;

   for (int i = int.Parse(pageSplit[j]); i < int.Parse(pageSplit[j + 1]) - 1; i++)
        {
           page = pdf1.Pages.Add(doc.Pages[i].Size, new Spire.Pdf.Graphics.PdfMargins(0));
      doc.Pages[i].CreateTemplate().Draw(page, new System.Drawing.PointF(0, 0));
   }
       
        pdf1.FileInfo.Version = PdfVersion.Version1_7;
        pdf1.SaveToFile(dirArchiv + @"\" + scanFileName);
}
doc.Close();




Best regards
Harald

bipos
 
Posts: 3
Joined: Mon Apr 23, 2018 9:28 am

Fri Jun 15, 2018 3:01 am

Dear Harald,

Thanks for your code.
I tested your case with my sample PDF, and noticed there was the issue you mentioned. I have posted the issue to our Dev team, we will let you know once there is any progress.
Besides, every document has unique structure, to make sure we fix your issue completely, please provide your input PDF for testing.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Jul 16, 2018 12:40 pm

Dear Betsy,

do you have an idea, when the problem will be solved?
We couldn't use spire.pdf with SharePoint and our customer asked for a working solution.

I tested also the latest version from last week, but the problem is still in the product.

Kind regards
Harald

bipos
 
Posts: 3
Joined: Mon Apr 23, 2018 9:28 am

Tue Jul 17, 2018 8:02 am

Dear bipos,

Sorry that we cannot give you the time regarding the fix at present. There is still no progress due to the complexity of your issue. However I have requested our development team to share an ETA at their earliest. We will update you as soon as I get a feedback.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Apr 04, 2019 10:19 am

Hi,

Hope you are doing well.
Glad to inform you that the issue is solved in Spire.PDF Pack(Hot Fix) Version:5.4.1.
Our website link: https://www.e-iceblue.com/Download/down ... t-now.html
NuGet link: https://www.nuget.org/packages/Spire.PDF/

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF