PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllGets or sets the resolution for new pages.
|
| LONG Resolution { get; set; } |
Value
Page resolution in DPI.
Remarks
Resolution is used for setting resolution (DPI) for new pages. This property does not apply to existing pages.
Default value is 72.
Analogue in new interface: IPDFDocument4::PageResolution.
Example
How to keep image sizes 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


