LONG PageResolution { get; set; } |
{ PDF object is supposed to be created } PDF.PageResolution := 600; { set any DPI here } ind := PDF.AddImageFromFile('1.jpg'); w := PDF.GetImageWidth(ind); h := PDF.GetImageHeight(ind); r := PDF.GetImageResolution(ind); coeff := PDF.PageResolution / r; { Show image at 100% sizes but in PDF page's resolution } PDF.DrawImage(ind, 0, 0, w*coeff, h*coeff, 0); PDF.SaveToFile('test.pdf', true);
// PDF object is supposed to be created PDF->PageResolution = 600; // set any DPI here long ind = PDF->AddImageFromFile("1.jpg"); long w = PDF->GetImageWidth(ind); long h = PDF->GetImageHeight(ind); float r = PDF->GetImageResolution(ind); float coeff = PDF->PageResolution / r; // Show image at 100% sizes but in PDF page's resolution PDF->DrawImage(ind, 0, 0, w*coeff, h*coeff, 0); PDF->SaveToFile("test.pdf", true);
// PDF object is supposed to be created PDF.PageResolution = 600; // set any DPI here long ind = PDF.AddImageFromFile("1.jpg"); long w = PDF.GetImageWidth(ind); long h = PDF.GetImageHeight(ind); float r = PDF.GetImageResolution(ind); float coeff = PDF.PageResolution / r; // Show image at 100% sizes but in PDF page's resolution PDF.DrawImage(ind, 0, 0, w*coeff, h*coeff, 0); PDF.SaveToFile("test.pdf", true);
' PDF object is supposed to be created PDF.PageResolution = 600 ' set any DPI here ind = PDF.AddImageFromFile("1.jpg") w = PDF.GetImageWidth(ind) h = PDF.GetImageHeight(ind) r = PDF.GetImageResolution(ind) coeff = PDF.PageResolution / r ' Show image at 100% sizes but in PDF page's resolution PDF.DrawImage ind, 0, 0, w*coeff, h*coeff, 0 PDF.SaveToFile "test.pdf", true