Problems while converting doc to pdf

My code is like below. It’s simple. I am trying to convert .doc to .pdf with Aspose.Words but I am encountering problems header and footer pictures in the document is not coming to pdf. But If I try to convert a .docx document they all are coming. Unfortunately I have to go with .doc. I’ve tried converting .doc to .docx but it also doesnt capture images. Could you please help? Thank you so much.

static void Main(string[] args)
{
Document doc = new Document(@“C: \Users\U04328\Desktop\New folder\Vanilla Opsiyon_2 M MAKINA MUMESSILL_68061_20171115_972146.doc”);
doc.Save(@“C: \Users\U04328\Desktop\New folder\Vanilla Opsiyon_2 M MAKINA MUMESSILL_68061_20171115_972146_yeni.pdf”);
}

@lordvader,

Thanks for your inquiry. Please ZIP and attach your input Word document here for testing. We will investigate the issue on our side and provide you more information.

Vanilla Opsiyon_85473_20171109_967605.zip (40.3 KB)

Thank you so much for the quick reply, here it is.

Hi again, maybe it will help, I’ve just figured out it shows the file format as Mhtml. But file is actually a .doc file. If I convert it first to Mhtml it loses it’s pictures. Thank you for the help again.

FileFormatInfo info = FileFormatUtil.DetectFileFormat(@“C: \Users\U04328\Desktop\New folder\Vanilla Opsiyon_85473_20171109_967605 - Copy.doc”);
string fileFormat = info.LoadFormat.ToString();

@lordvader,

Thanks for sharing the detail.

It is hard to meaningfully output headers and footers to MHTML because it is not paginated. However, we have logged this problem in our issue tracking system as WORDSNET-16254. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Tahir, thank you so much for your support I’d appreciated,

For anyone wondering I’ve managed to do look a like copy with the help of these page Working with Headers and Footers in C#|Aspose.Words for .NET

@lordvader,

Your input document was saved by MS Word and it is MHT file. Aspose.Words does not recognize and use special CSS styles and HTML elements saved by MS Word to facilitate conversion back to DOCX. This is related to missing feature WORDSNET-10399 (Add support of MSO attributes durng HTML import). We will inform you via this forum thread once this issue is resolved.

We apologize for your inconvenience.