In AutoCAD’s COM API, Layout.SetCustomScale(1, 0.2) may not apply as expected when plotting directly to PDF because the plot settings must be applied to the active layout’s PlotConfiguration and saved before plotting. You should call doc.ActiveLayout = layout, then use layout.StandardScale = 0 (Custom), set CustomScaleNumerator and CustomScaleDenominator instead of SetCustomScale, and finally doc.Regen(1) before PlotToFile to ensure the custom scale is honored.