A key layout of my application has a container field into which a design diagram is loaded. A script dynamically retrieves the diagram as a .pdf file. If there is no file for this particular record, a .pdf icon appears. If there is content, the .pdf icon still appears on top of the diagram, making key parts unusable. See attached diagram and the script which is triggered by OnRecordLoad.
How do I get rid of the .pdf icon?