PDF logo fix

This commit is contained in:
rajesh
2025-09-16 13:19:32 +05:30
parent 0688854824
commit dd905e279c

View File

@@ -77,7 +77,7 @@ public class PdfDao {
// CustomPageEvent pageEvent = new CustomPageEvent(call.getName(), 0); // CustomPageEvent pageEvent = new CustomPageEvent(call.getName(), 0);
// writer.setPageEvent(pageEvent); // writer.setPageEvent(pageEvent);
document.open(); document.open();
String logoUrl=null; String logoUrl=defaultLogoUrl;
Optional<HubEntity> hubEntity=hubRepository.findById(applicationEntity.getHubId()); Optional<HubEntity> hubEntity=hubRepository.findById(applicationEntity.getHubId());
if (Boolean.TRUE.equals(validator.isProductionProfileActivated()) && applicationEntity.getCall().getId().equals(23l)) { if (Boolean.TRUE.equals(validator.isProductionProfileActivated()) && applicationEntity.getCall().getId().equals(23l)) {
@@ -85,12 +85,12 @@ public class PdfDao {
} }
else if(hubEntity.isPresent()) { else if(hubEntity.isPresent()) {
if (hubEntity.get().getUniqueUuid().equals("p4lk3bcx1RStqTaIVVbXs")) { if (hubEntity.get().getUniqueUuid().equals("p4lk3bcx1RStqTaIVVbXs")) {
defaultLogoUrl = hubEntity.get().getPdfBanner(); logoUrl = hubEntity.get().getPdfBanner();
} }
if (hubEntity.get().getUniqueUuid().equals("t7jh5wfg9QXylNaTZkPoE")) { if (hubEntity.get().getUniqueUuid().equals("t7jh5wfg9QXylNaTZkPoE")) {
defaultLogoUrl = hubEntity.get().getPdfBanner(); logoUrl = hubEntity.get().getPdfBanner();
} }
logoUrl=defaultLogoUrl;
} }
// pageEvent.setTotalPages(writer.getPageNumber()); // pageEvent.setTotalPages(writer.getPageNumber());
// addLogo(document, "logo.jpg"); // Add your image path here the migration code after cherry-pick // addLogo(document, "logo.jpg"); // Add your image path here the migration code after cherry-pick