Problem with image replication when converting Word 2 PDF


#1

I just licensed my Aspose.Word and Aspose.PDF and I´m trying to convert a .doc file into a PDF one. Fact is, after converting it I get the only image in the .doc file repeated several times all over the PDF document. Looks like the licensed version is not working properly even though I did not see any watermarks or garbled text after putting the Aspose.Custom.lic file in my project. I attached the doc file so you can check what´s happening. It shows how the PDF should look like after the convertion is done but there is a copy of the company logo every time there is a line feed and the header border is out of alignment.

help please. Thanks

here is the code:

Public Class PDFMaker
Public Sub GeraPDF(ByVal sCaminhoArquivoWord As String, ByVal sArquivoWord As String, ByVal sCaminhoArquivoPDF As String, ByVal sArquivoPDF As String)
Try
Dim LicenseWord As New Aspose.Word.License
Dim LicensePdf As New Aspose.Pdf.License

LicenseWord.SetLicense("c:\inetpub\wwwroot\padrao\DLL Ref\Aspose.Custom.lic")
LicensePdf.SetLicense("c:\inetpub\wwwroot\padrao\DLL Ref\Aspose.Custom.lic")

Dim doc As Document = New Document(sCaminhoArquivoWord & sArquivoWord)
doc.Save(sCaminhoArquivoPDF & "input.xml", SaveFormat.FormatAsposePdf)

Dim pdf As Pdf = New Pdf
pdf.BindXML(sCaminhoArquivoPDF & "input.xml", Nothing)
pdf.Save(sCaminhoArquivoPDF & sArquivoPDF)

Kill(sCaminhoArquivoPDF & "input.xml")

Catch ex As Exception
Throw New Exception(ex.Message)
End Try
End Sub
End Class


#2

Hi,

Thank you for the report. I've logged the issue so please check back later.


#3

Please give us some more time to investigate the real cause of this bug. If you can't wait, remaking the document from scratch could probably help in the meantime. Basically, you should avoid use of continuous section breaks because they seemed to be the main cause of repeating the image although they actually shouldn't. I tried to remake the document myself but there's still one unexpected "instance" of the image at the very beginning of the resulting document body although I definitely can't find it in the original document and. Generally, I must admit that your document behaves strangely for us, and that's the reason we're asking you to wait.

Thanks for patience.


#4

Thanks Dmitry. Hope to hear from you pretty soon.


#5

We've just released Aspose.Word 3.2.1.

  • Fixed picture repeated multiple times in PDF export.
  • http://www.aspose.com/Community/Blogs/Roman.Korchagin/