Thanks for contacting support.
In order to set the Image Height and Width inside resultant PDF document, please try using FixHeight and FixWidth properties of Aspose.Pdf.Image class. Now concerning to your requirement, I have tested the scenario using following code snippet and as per my observations, the BarCode image appears in dimensions specified in code (even though it looks weird because Image Height is larger than width for this landscape image). Also please note that the default unit in Aspose.Pdf is Point, where 1 inch = 72 points and 1 cm = 1/2.54 inch = 0.3937 inch = 28.3 points.
doc = new Document();<o:p></o:p>
img = new Aspose.Pdf.Image();
img.File = "c:/pdftest/2015-07-06_1147.png";
// 1cm = 28.3 points
// 1 mm = 0.1 cm
// Height 50.673 mm = 5.06 cm = 5.06 X
28.3 = 143.198 points
// Width 10.00 mm = 1.0 cm = 1.0 X 28.3
= 28.3 points
img.FixWidth = 28.3;
// in case of Images with DPI, pixels =
( points / 72 ) * DPI