Hi there,
public override void Convert(FileInfo source, FileInfo target)
{
Pdf pdf = new Pdf();Section section = pdf.Sections.Add(); var image = new Image(section); section.Paragraphs.Add(image); image.ImageInfo.File = source.FullName; image.ImageInfo.ImageFileType = GetImageFileType(source); image.ImageInfo.Title = source.Name; if (image.ImageWidth > image.ImageHeight) { FlipToLandscapeOrientation(section); } pdf.Save(target.FullName); }</pre></div><div><br></div><div>The problem here is that <b>FlipToLandscapeOrientation()</b> is never called because <b>image.ImageWidth</b> and <b>image.ImageHeight</b> are always <b>0</b>.</div><div><br></div><div>How can I force these to populate with the real width and height of the image I've supplied?</div><div><br></div><div><br></div><div>Many thanks,</div><div><br></div><div><br></div><div>Bart</div>