Image in Word Header Not displaying in PDF


#1

My word Doc is generating nicely from my word template, however, when I save as PDF, it generates, but doesn’t display the image embedded in the word template header.

Attached includes. Template file, Word output file and pdf output file.

Code Snippet below.


If docType.ToLower().Trim() = “word” Then

Dim fileName As String = _FilePath & “\Word” & “ProfileReport” & _Rpt.rptID.ToString() & “.doc”

dstDoc.Save(fileName, SaveFormat.FormatDocument)

_email.SendAsposeReport(_Rpt.rptID, _Rpt.rptDESCRIPTION, _EmailAddress, _FilePath & “\Word”, “word”)

ElseIf docType.ToLower().Trim() = “pdf” Then

'Save the document in Aspose.Pdf.Xml format.

dstDoc.Save(_FilePath & “\XML\ProfileReport” & _Rpt.rptID.ToString() & “.xml”, SaveFormat.FormatAsposePdf)

'Read the document in Aspose.Pdf.Xml format into Aspose.Pdf.

Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf

pdf.BindXML(_FilePath & “\XML\ProfileReport” & _Rpt.rptID.ToString() & “.xml”, Nothing)

'Instruct to delete temporary image files.

pdf.IsImagesInXmlDeleteNeeded = True

'Produce the PDF file.

pdf.Save(_FilePath & “\PDF\ProfileReport” & _Rpt.rptID.ToString() & “.PDF”)

_email.SendAsposeReport(_Rpt.rptID, _Rpt.rptDESCRIPTION, _EmailAddress, _FilePath & “\Pdf”, “pdf”)


#2

Hi,

Thank you for considering Aspose.

I made the image absolutely positioned in page coordinates in accordance with this article:

http://www.aspose.com/wiki/default.aspx/Aspose.Word/ImageExportLimitations.html

and attached the modified template. Please try it.


#3

Thanks, That Corrected my issue.