Having issue instatiating a PDF document from this Word template

I used the following code to replace an image in the embedded picture content control in a word document.

string docxFilePath = @"c:\temp\replaced.docx";
NodeCollection shapes = asposeWordDoc.GetChildNodes(NodeType.Shape, true);

Image replacementImage = Image.FromFile(@"c:\temp\replacementImage.jpg");
foreach (Aspose.Words.Drawing.Shape nshape in shapes)
{
	if (nshape.AlternativeText.ToLower().Trim() == variableName.ToLower().Trim())
	//nshape.ImageData.SetImage(replacementImage );
	{
		nshape.ImageData.SetImage(imagePath);
		replacedCount++;
	}
}
asposeWordDoc.Save(docxFilePath);

What resulted is a docx that seems to have my images replaced correctly. I tried to attach the
docx file but your forum doesn’t allow upload (probably because there are embedded image files)

However. when I tried to convert this docx into Aspose PDF by the following code…

Stream stream = File.OpenRead(docxfilepath);
Aspose.Pdf.Document pdfdoc = new Aspose.Pdf.Document(stream);

I am getting exception Startxref not found during the instatiation of the PDF Document.
I have no idea what that is… Can you tell me why ?

Thanks.

@nick1234

Please note that you cannot load DOCX using Aspose.Pdf.Document. Please use Aspose.Words to load Word document.

Please ZIP and attach your input Word document and images along with code example to reproduce your issue at our end. We will investigate the issue and provide you more information on it.