Divisors of differentials. Let $\mathbb{C}$ be the base field. Suppose $C \subset \mathbb{P}_2$ is a nonsingular projective curve of degree $d > 3$. Must it be the case that $D \in \text{Div}(C)$ is the divisor of a differential on $C$ which is everywhere regular if and only if $D = C \cdot E$, where $E \subset \mathbb{P}_2$ is a curve of degree $d-3$ (possibly defined by a polynomial with repeated factors)?
 A: Yes, it must necessarily be the case.
We introduce two lemmas.

Lemma 1. Let $C \subset \mathbb{CP}^2$ be nonsingular of degree $d$ with genus $(d-1)(d-2)/2$, and suppose that $\omega \in \Omega_{K_C/k}$ $($which we will call $\Omega(C)$ from now on$)$ is not zero. Then$$\deg(\text{div}(\omega)) = d(d-3) = 2g - 2 = -\chi(C).$$$($See here for a definition of $\Omega_{K_C/k}$.$)$

Proof. Suppose $C$ is defined by $F(x, y, z) = 0$, so that $C \cap \{z = 0\}$ is finite. We may also assume that there are no points in $C \cap \{z = 0\} \cap \{F_y = 0\}$. It suffices to show that $$\deg(\text{div}(dx)) = d(d-3).$$Suppose $p = [x_0, y_0, 1] \in C'$ $($the affinization$)$. Then $v_P(dx) = 0$ whenever $f_y \neq 0$. If $f_y =  0$, then $x - x_0$ is not a uniformizing parameter, but $y - y_0$ is a uniformizing parameter. Hence, $$f_x\,dx + f_y\,dy = 0 \implies dx = -{{{f_y}\,dy}\over{f_x}},$$so$$v_p(dx) = v_p(f_y) - v_p(f_x) + v_p(dy) = v_p(f_y),$$since the latter two terms must be zero. This is$$\text{dim}\, \mathcal{O}_p(C)/(f_y) = \dim \mathbb{C}[x - x_0, y - y_0]_{x - x_0,\,y - y_0}/(f, f_y) = I_{(x_0,y_0)}(C, f_Y)$$$($where we abuse notation by using $f_Y$ to denote the curve it traces out$)$.
What about the points at infinity which we cut out when we affinized? Suppose $p = [x_0, y_0, 0] \in C$. We know that$$xF_x + yF_y + zF_z = ,$$hence$$x_0F_x(p) + y_0F_y(p) = 0.$$Hence,$$y_0 = -{{x_0F_x(p)}\over{F_y(p)}}.$$Therefore, $x_0 \neq 0$.
We now look at the affinization by throwing out $x = 0$ instead of throwing out $z = 0$, so take $g(y, z) = F(1, y, z)$. We only need to look at the point $(1, y_0/x_0, 0)$. The uniformizing parameter here is $z$ since $F_y \neq 0$. But $z$ is $1/x$ $($from the other affinization coordinate patch$)$, so $$dz = -{{dx}\over{x^2}} \implies dx = -{{dz}\over{z^2}},$$so $$v_p(dx) = -2$$ at this point.
Hence,$$\deg(\text{div}(\omega)) = \deg(F_y \cdot C) - \deg(2L \cdot C),$$where $L = \{z = 0\}$, so by Bézout's Theorem, this is$$d(d-1) - 2d = d(d-3).$$
$$\tag*{$\square$}$$

Lemma 2. Any divisor in the canonical class can be expressed as $G \cdot C - H \cdot C$, where$$\deg G = k,\text{ }\deg H = k + 3 - d.$$

Proof. We make the same assumptions as last time. Consider $${{Gz^2}\over{HF_y}}\,dx = \omega.$$Then if $L$ is the line $z = 0$, and $M$ is the curve of $F_y$, we have$$\text{div}(\omega) = G \cdot C - H \cdot C + 2L \cdot C - F_y \cdot C + F_y \cdot C - 2 L \cdot C = G \cdot C - H \cdot C,$$where we used the computation from the proof of Lemma 1.
$$\tag*{$\square$}$$
We now return to the original problem. If $D$ is the divisor associated to regular $\omega \in \Omega(C)$, we know from Lemma 2 that it can be expressed as $G \cdot C - H \cdot C$, where $$\deg G = k,\text{ }\deg H = k + 3 - d.$$We want to show that we can choose $k = d-3$, or equivalently, $\deg H = 0$. But from the proof of Lemma 2, under suitably transformed coordinates, we have that $$\omega = {{Gz^2}\over{HF_y}}dx.$$So if $H$ has a zero which $G$ does not, $\omega$ is not regular, so we are done.
Conversely, if $D = G \cdot C$ where $\deg G = d- 3$, then, after a suitable projective transformation, $$\omega = {{Gz^2}\over{F_y}}dx$$will do the trick by the reversal of the same logic.
A: I am not sure I understand your question, but the canonical divisor of $C\subset \mathbb P^2$ is $C\cdot E$, with $E$ as you wrote a general curve of degree $d-3$. At the level of invertible sheaves:
$$K_C=(K_{\mathbb P^2}+C)|_C=\mathcal O_{\mathbb P^2}(-3H+C)|_C=\mathcal O_C(d-3).$$ The key word here is adjunction formula.
