Hi @Dear_AT ,
1. Once you generate the PDF post hitting the API, get the path lets say at /content/somelocation/generatedPdf.pdf, save the path/resource using session.save() if you are using Node API or resourceResolver.commit() if you want to use Resource API.
2. Then simply publish the same path using com.day.cq.replication.Replicator API
public void replicateAsset(ResourceResolver resourceResolver, String assetPath) throws ReplicationException {
replicator.replicate(resourceResolver.adaptTo(Session.class), ReplicationActionType.ACTIVATE, pathToGeneratedPdf);
}