# Preimage of Cartier divisor under finite morphism

Let $f: C' \to C$ a finite morphism between two integral curves, so $1$-dimensional, proper $k$-schemes for a fixed field $k$.

Since $f$ is finite and therefore by definition affine, we conclude that $C' = Spec(\mathcal{A}')$ is the relative spectrum for a coherent $\mathcal{O}_C$-algebra $\mathcal{A}' = f_*(\mathcal{O}_{C'})$.

It's obvious that $\mathcal{A}'$ is locally free on regular locus $Reg(C)$. I suppose that follows from the structure theorem about PID's over Dedekind rings,

therefore for small enough open enviroments $U \subset C$ we get $\mathcal{A} \vert _U \cong \mathcal{O}_U ^{\oplus r}$.

Futhermore let $D \subset C$ be an effective Cartier Divisor of $C$ with corresponding ideal sheaf (=invertible sheaf) $\mathcal{L} := \mathcal{O}_{C}(D)$.

Via $f^{-1}(D) := D'$ we get a Cartier divisor on $C'$.

My question is:

Why holds $f_*(\mathcal{O}_{D'}) = \mathcal{O}_D ^{\oplus r}$ ?