PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() ![]() ![]() Collapse AllThis property gets or sets the resolution for new pages.
|
| LONG Resolution { get; set; } |
Value
Resolution of the page (in DPI)
Remarks
The resolution property is used for setting resolution (DPI) for new pages. This property does not apply to existing pages.
The default value is 72.
Equivalent in new interface: IPDFDocument4::PageResolution.
Example
How to Keep Images Sizes the Same in Different Resolutions
Delphi
[copy to clipboard]
{ 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;
C/C++
[copy to clipboard]
// 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();
C#
[copy to clipboard]
// 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();
Visual Basic
[copy to clipboard]
' 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
See Also


