Sign In  Sign Up Live-Chat

Problem with Text Justification when converting from Word to PDF

Last post 07-10-2007, 12:28 AM by pemergis. 3 replies.
Sort Posts: Previous Next
  •  07-07-2007, 10:59 AM 83084

    Problem with Text Justification when converting from Word to PDF

    Attachment: Present (inaccessible)

    Justification does not seem to work when we convert word to PDF. We are using Aspose.Word version 4.2.6.0 and Aspose.PDF version 3.5.2.

    Below is the Vb.Net code we are using for the conversion:

            Dim l_pdfDoc As Aspose.Pdf.Pdf = Nothing
            Dim l_memStream As MemoryStream = Nothing
            Dim l_xml As XmlDocument = Nothing

            Try
                ConvertToPDF = Nothing
                '---------------------------------------------------------------------------
                ' Create Memory stream so that we can do the conversion in memory without
                ' saving the word document to the file system. Save the word to PDF XML.
                '---------------------------------------------------------------------------

                l_memStream = New MemoryStream()
                l_xml = New XmlDocument()

                m_wordDoc.Save(l_memStream, Aspose.Words.SaveFormat.AsposePdf)
                l_memStream.Position = 0
                l_xml.Load(l_memStream)

                'l_xml.Save("c:\temp\test.xml")

                '---------------------------------------------------------------------------
                ' Now convert the work doc to PDF and close the memory stream
                '---------------------------------------------------------------------------

                l_pdfDoc = New Aspose.Pdf.Pdf()
                l_pdfDoc.BindXML(l_xml, Nothing)
                'l_pdfDoc.IsCoreFontUsed = False
                l_pdfDoc.IsTruetypeFontMapCached = True
                If Not g_app_path.EndsWith("\") Then g_app_path += "\"
                l_pdfDoc.TruetypeFontMapPath = g_app_path & "Aspose"
                l_memStream.Close()

                Return l_pdfDoc

            Catch ex As Exception
                Throw New Exception("", ex)
                Return Nothing
            End Try

     
  •  07-07-2007, 8:22 PM 83088 in reply to 83084

    Re: Problem with Text Justification when converting from Word to PDF

    Hi,

    Thank you for considering Aspose.

    I have reproduced this error and logged this issue. We will try to fix it soon.


    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-08-2007, 9:58 PM 83118 in reply to 83088

    Re: Problem with Text Justification when converting from Word to PDF

    We have fixed this bug. Please download hotfix 3.5.3.
    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-10-2007, 12:28 AM 83305 in reply to 83118

    Re: Problem with Text Justification when converting from Word to PDF

    Thanks for the quick turnaround time. We have implemented the change and it fixes the problem.
     
View as RSS news feed in XML