Hi ,
I tried to implement the stretchdraw as recommended however I was not able to find this method in the .net Wrapper following is the code snippet I am working on .
Code
// Output PDF file name
var pdfFileName = Path.Combine(output, fileName + ".pdf");
FileHelper.Delete(pdfFileName);
// Document properties, each page is 8.5 by 11 inches at 300 DPI. Typical dimensions
using (var control = new wPDF.PDFControl())
{
control.PDFMode = eDevMode.ClipRectSupport;
control.PDFOptions = ePDFOptions.CreateAutoLinks;
control.Thumbnails = eThumbnails.Color;
control.SetLicense("*******", "********", ********);
control.BeginDoc(pdfFileName);
foreach (string inputMetaFile in inputfiles)
{
control.StartPage(ePage.DinA4, false);
var metaFile = new Metafile(inputMetaFile);
//HACK: Do not know why scale can't be correctly calculated
var pageWidth = ((float) metaFile.Width / (float) this._book.GetRect().Width) * 96;
var pageHeight = ((float) metaFile.Height / (float) this._book.GetRect().Height) * 96;
control.DrawMetafile(metaFile, (int) pageWidth, (int) pageHeight);
control.EndPage();
}
control.EndDoc();
}
// Show the PDF file
return pdfFileName;
Alles anzeigen