This is a migrated thread and some comments may be shown as answers.

Convert Docx file to PDf file

1 Answer 574 Views
WordsProcessing
This is a migrated thread and some comments may be shown as answers.
Moe
Top achievements
Rank 1
Iron
Iron
Veteran
Moe asked on 22 Mar 2019, 09:19 AM

Hi 

I coding below . I can convert file but document file inside textbox , these textbox can't convert to pdf file and document file inside picture alignment fix positing on page but can't convert to pdf file. I am using below code and I got empty page after convert pdf file. Because my doc file inside picture and textbox.

I try other document file include pic (in line with text ) and not include textbox. These file can get correct format with pdf file.

 

My Coding.....
            Dim fileFormatProvider As IFormatProvider(Of Flow.Model.RadFlowDocument) = New Flow.FormatProviders.Docx.DocxFormatProvider()
            Dim documentToConvert As Flow.Model.RadFlowDocument = New Flow.Model.RadFlowDocument()

            Using input As FileStream = New FileStream("H:\\Files\\Testing.docx", FileMode.Open)
                documentToConvert = fileFormatProvider.Import(input)
            End Using

            fileFormatProvider = New Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider()

            Using output As Stream = New FileStream(pathpdf, FileMode.OpenOrCreate)
                fileFormatProvider.Export(documentToConvert, output)
            End Using

 

 

Thanks

Moe

 

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 26 Mar 2019, 09:57 AM
Hello Moe,

I just posted a reply in the other thread which seems to be discussing the same question: Convert from Word to PDF. Please, check it and let me know in case I am missing something.

Regards,
Tanya
Progress Telerik
Get quickly and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
WordsProcessing
Asked by
Moe
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Tanya
Telerik team
Share this question
or