The pdf page is 210X297 mm, and import an image with file.InsertImage(image).
Left is with GetX(), top with GetY() functions, but the others?
Code: Select all
bool InsertImage(wxString image)
{
AddPage(-1,210,297);
wxImage pageimage(image);
double x=210
double y=297
double dx=pageimage.GetWidth();
double dy=pageimage.GetHeight();
double x1=10;
double y1=30;
if(x/dx<=y/dy)
Image(image,x1,y1,x-2*x1,0);
else
Image(image,x1,y1,0,y-2*y1+x1);
return true;
}