pci dss – How does a card issuer comply with PCI if they have to print PANs in clear text?

To print something, we generally need a file that contains what we are
going to print. So in that context is allowed to store the pan in
clear text? If no, how issuers print the card?

No, in that context the PAN would need to be stored reversibly encrypted as per DSS ยง3.4. The actual decryption for printing purposes is not “storage” and does not trigger the same requirements.

PAN gets passed around unencrypted in multiple steps of the credit card payment process. It’s storage and transmission of PAN data that have requirements around encryption or obfuscation; the actual use of PAN data cannot be so limited for the obvious reasons.