Split document page issue


#1

Dear team,
i run into a problem when split document to multiple documents, when i invoke DocumentPageSplitter method, the first page of document is splitted up two pages, the second page only contain one word “be”,
this is not expected, the attachment contain test code and word
document splitter.zip (67.6 KB)


PageSplitter Malfunction Aspose.Words.Net 17.3
#2

@TommyZhou

You need to install fonts that are used in your document on the machine where you are splitting document’s pages into separate documents. Please install font OpenDyslexic at your system. If you still face problem, please ZIP and attach this font here for testing.


#3

Thanks for your help, i have installed the associated fonts on the run machine, but there are still problem, the attachment is fonts and splitted documents.Font.zip (351.6 KB)


#4

@TommyZhou

In your case, we suggest you please convert each page of document to PDF using Aspose.Words. Please check the following code example.

Document doc = new Document(MyDir + @"Issue document.docx");
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.PageSavingCallback = new PageSavingCallback();
doc.Save(MyDir + @"19.10.pdf", pdfSaveOptions);

private class PageSavingCallback : IPageSavingCallback
{
    public void PageSaving(PageSavingArgs args)
    {
        args.PageFileName = string.Format(MyDir + @"Page_{0}.pdf", args.PageIndex);
    }
}

Once you convert the document’s pages to PDF, please use Aspose.PDF to convert PDF to Word document. Please check the following code example.

Aspose.Pdf.Document pdf = new Aspose.Pdf.Document(MyDir + "output.pdf");
Aspose.Pdf.DocSaveOptions saveOptions = new Aspose.Pdf.DocSaveOptions();
saveOptions.Mode = Aspose.Pdf.DocSaveOptions.RecognitionMode.Flow;
pdf.Save(MyDir + "output.doc", saveOptions);

#5

Thanks!
I have tested code that convert word to pdf, it seems all right, but convert pdf to word document is not what we excepted, when set “SaveOptions.Mode = Aspose.Pdf.DocSaveOptions.RecognitionMode.Flow” ,the output document look different from the original pdf, so, there is other method or workaround to do this.

ps:
I found out why the split document failed, when we insert any style list included bulleted list or numbered list to the table cell which across the page, there will be problem when split the one document to multiple document, the attachment document is one example, could you help me to explore what setting or workaround to solve or avoid the issue, thanks.
test.zip (123.7 KB)


#6

@TommyZhou

Please use the latest version of Aspose.Words for .NET 19.10 and Aspose.Pdf for .NET 19.9.

If you still face problem, please share the screenshots of problematic sections of output document. We will investigate this issue and provide you more information on it.


#7

I have used the latest version of Aspose.Words 19.10 and Aspose Pdf for .NET 19.9, installed the OpenDyslexic font, font.png (31.2 KB)
there are still problem, the original pdf document is Page_0.pdf (45.2 KB), the converted word document is Page_0.zip (43.4 KB) ,word screenshot word.png (72.0 KB)


#8

@TommyZhou

Your query is more related to Aspose.PDF. We are moving this forum thread to Aspose.Total forum where you will be guided appropriately.


#9

@TommyZhou

Thank you for elaborating further.

We have been able to reproduce the problem while converting attached PDF document, Page_0.pdf. A ticket with ID PDFNET-47126 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.