Hi team,
We are facing issue while converting a pdf having arabic text to word format. It is converting the doc and format is also maintained but some text is breaking and some is overlapping.
Can you please help with the same?
We are using aspose pdf for C#
.
When converting a PDF containing Arabic text to Word format using Aspose.PDF for C#, issues such as text breaking and overlapping can occur. To address these problems, you can try the following approach:
- Use the Correct Save Options: Ensure that you are using the
DocSaveOptions
with the appropriate recognition mode. Specifically, set the mode toDocSaveOptions.RecognitionMode.Flow
orDocSaveOptions.RecognitionMode.EnhancedFlow
. This helps maintain the layout and flow of the text during conversion.
Here is a sample code snippet that demonstrates how to implement this:
using Aspose.Pdf;
class Program
{
static void Main()
{
// Load the PDF document
Document pdfDocument = new Document("path/to/your/input.pdf");
// Create DocSaveOptions and set the format and mode
DocSaveOptions saveOptions = new DocSaveOptions();
saveOptions.Format = DocSaveOptions.DocFormat.DocX;
saveOptions.Mode = DocSaveOptions.RecognitionMode.Flow; // or EnhancedFlow
// Save the document to DOCX format
pdfDocument.Save("path/to/your/output.docx", saveOptions);
}
}
- Check for Anomalies: After conversion, if you still notice any issues, it would be helpful to share screenshots or the specific files that exhibit these problems. This allows for better troubleshooting and assistance.
By following these steps, you should be able to improve the conversion quality of Arabic text from PDF to Word. If issues persist, consider reaching out with specific examples for further support.
Sources:
[1]: Arabic pdf to word conversion
[2]: Arabic pdf to word conversion
[3]: Arabic pdf to word conversion