You can use cardboard as a shim, but only on internal doors. The minute moisture penetrates the cardboard, it disintegrates, so keeping it dry is crucial.