This is a topic I have LOTS of experience with a would like to help, however I'm not sure I'm following what you are asking/saying by your description. Lets start from the beginning...not the fender.
You need to door to fit the CAB first. Depending on the condition of the hinge pins & bushings (which should be changed first if worn) the cab (rust, previously replaced, ect.) some things may not be as simple as they should be or able to be made "right" without possibly jacking, reworking, starting over with repairs.
Here is the basics: You will use the bolts that hold the hinges to the cowl/front post (the one on the top hinge is accessed through the rubber grommet inside the truck that the dome light switch wire goes through) to place the door forward/backward to achieve even gaps between the windshield post, roof, cab corner & rocker. Keep in mind, these trucks DID NOT fit all that well everywhere even when new, much less after years of use/abuse. I would prioritize the cab corner as your most important gap...the rocker is harder to see, the drip molding kind of takes your eye away from the roof area & the windshield post is small & at a different angle so it's less noticeable.
The hinges to cab also can be used to raise/lower the door.
The bolts between the hinge & door are used to move the door in/out & also can be used to raise/lower the door.
Once you have the best fit of the door to the cab, you can start working on the gap between the door & fender. The one at the top of the cowl is the most important...it sets the in/out & use shims under there to set the higth, then place shims behind the one into the cowl in the door jamb so it doesn't bend inward when tightened. The bottom one in from the rocker can be shimmed out to match the door, then tightened to the proper gap with the door. Many times a 2x4 levered between the tire & bottom of the fender can help get it where it needs to be.
Depending on the condition of your frame, cab bushings, prior rust/replacement...all of this can go all the way from: rather easy to not possible to get real nice. If you have trouble...post up some photos, they can tell a whole lot of what is going on. Good Luck! If you get stuck, snap some photos & we'll help, Lorne