The imidation of nitronaphthalic anhydride with an amino compound is conducted using glacial acetic acid. Will this procedure yield the desired product?
The answer depends on the amine. Aniline derivatives with electron-releasing groups ortho and para to the NH2 will probably be turned into the imides by intimately mixing (that is, grinding together or ball-milling) the anhydride and the aniline neat (no solvent or only a catalytic amount of polar aprotic solvent like DMF) followed by heating and driving off water vapor. Here's what I mean as a published example: Melwin Colaço, Jean Dubois, and Johan Wouters. "Mechanochemical synthesis of phthalimides with crystal structures of intermediates and products. CrystEngComm, 2015,17, 2523-2528. The yield should be nearly quantitative.
However, alkylamines and amino esters will not work this way. They will decompose under these conditions, as there are many side-reactions including polymerization and formation of other ring systems (other than the desired imide ring system). It is possible to find highly specific (as opposed to generally applicable) conditions for a specific pair of anhydride and amine that gives middling yields. Here's a literature example: Ivanova, M., Legros, J., Poisson, T. et al. A multi-step continuous flow synthesis of pomalidomide. J Flow Chem 12, 383–387 (2022). https://doi.org/10.1007/s41981-022-00223-3. The key step in this flow synthesis requires high temperature and pressure: roughly, the conditions include a specific solvent system (Acetic Acid:water:1,4-dioxane in a 2:1:1 ratio), flowing at 1 mL/min. through a narrow tube while being heated to 130 degrees C for 1 hour and 40 minutes at 250 psi, giving a 71% yield of imide. See the paper for more details.
There is hope that you can achieve the synthesis you want but it may take some exploration of the literature and many failed attempts. Don't give up. There are also many hidden limitations that are usually not fully explored in the literature. For example, the first paper's conditions may work for some aniline derivatives that have electron-withdrawing groups but absolutely fail for others for no apparent reason. What all these have in common are acidic solvent systems, high temperatures, sometimes high pressures and sometimes removal of water from the reaction to help drive the equilibrium processes forward (Le Chatelier's Principle). Best wishes.