Using PDFnet 10.2 for .Net Framework I am trying to simply resize the pages of a pdf til A4.
internal static void ResizeToA4(this Page page)
{
double pagewidth = page.GetPageWidth();
double pageheight = page.GetPageHeight();
double scale = 1.0;
double widthinuserunits = 8.27 / (page.GetUserUnitSize() /72); // inches
double heightinuserunits = 11.69 / (page.GetUserUnitSize() / 72); // inches
if (pagewidth < pageheight)
scale = widthinuserunits / pagewidth;
else
scale = widthinuserunits / pageheight;
page.Scale(scale);
}
However it does not resize images on the page.
How do I scale the page with all content ?