LONG PDFPAGE_Resolution { get; set; } |
The default value is 72.
Equivalent in new interface: IPDFDocument4::PageResolution.
{ PDF object is supposed to be created } PDF.Resolution := 600 { set any DPI here } PDF.BeginDoc; i := PDF.AddImageFromFile('picture.gif'); w := PDF.GetImageWidth(ind); h := PDF.GetImageHeight(ind); r := PDF.GetImageResolution(ind); coeff := PDF.Resolution / r; { Show image in 100% sizes but in PDF page's resolution } PDF.PDFPAGE_ShowImage(i, 10, 10, w*coeff, h*coeff, 0.0); PDF.EndDoc;
// PDF object is supposed to be created PDF->Resolution = 600; // set any DPI here PDF->BeginDoc(); LONG i = PDF->AddImageFromFile("picture.gif"); LONG w = PDF->GetImageWidth(ind); LONG h = PDF->GetImageHeight(ind); LONG r = PDF->GetImageResolution(ind); DOUBLE coeff = (DOUBLE)PDF.Resolution / r; // Show image in 100% sizes but in PDF page's resolution PDF.PDFPAGE_ShowImage(i, 10, 10, w*coeff, h*coeff, 0.0); PDF.EndDoc();
// PDF object is supposed to be created PDF.Resolution = 600; // set any DPI here PDF.BeginDoc(); long i = PDF.AddImageFromFile("picture.gif"); long w = PDF.GetImageWidth(ind); long h = PDF.GetImageHeight(ind); long r = PDF.GetImageResolution(ind); double coeff = (double)PDF.Resolution / r; // Show image in 100% sizes but in PDF page's resolution PDF.PDFPAGE_ShowImage(i, 10, 10, w*coeff, h*coeff, 0.0); PDF.EndDoc();
' PDF object is supposed to be created PDF.Resolution = 600 ' set any DPI here PDF.BeginDoc ind = PDF.AddImageFromFile("picture.gif") w = PDF.GetImageWidth(ind) h = PDF.GetImageHeight(ind) r = PDF.GetImageResolution(ind) coeff = PDF.Resolution / r ' Show image in 100% sizes but in PDF page's resolution PDF.PDFPAGE_ShowImage i, 10, 10, w*coeff, h*coeff, 0.0 PDF.EndDoc