Right now the size (and mostly also the position) does not represent the exported geometry.
You can calculate the extents of the entities on the Model Space and try to set the paper size for the Paper Space according to them. But the paper sizes set can also contain no paper to represent your geometry correctly.
Or you can set the following plot settings:
OdDbPlotSettings *pPlotSettings = pLayout.get();
OdDbPlotSettingsValidatorPtr pValidator = pPlotSettings->database()->appServices()->plotSettingsValidator();
pValidator->setStdScaleType(pPlotSettings, OdDbPlotSettings::kScaleToFit);
pValidator->setPlotType(pPlotSettings, OdDbPlotSettings::kExtents);
//and optional
pValidator->setPlotCentered(pPlotSettings, true);
so your geometry will be scaled to fit the chosen paper size.
to change paper size you can use:
pPlotValidator->setCanonicalMediaName(pPlotSettings, OD_T("ISO_A1_(841.00_x_594.00_MM)"));
"ISO_A1_(841.00_x_594.00_MM)" - it is one of the many possible sizes.