diff --git a/services/src/main/java/org/fao/geonet/api/records/CatalogApi.java b/services/src/main/java/org/fao/geonet/api/records/CatalogApi.java index e6751f8e3ef..08d060e3ca5 100644 --- a/services/src/main/java/org/fao/geonet/api/records/CatalogApi.java +++ b/services/src/main/java/org/fao/geonet/api/records/CatalogApi.java @@ -389,8 +389,8 @@ public void exportAsPdf( final SearchResponse searchResponse = searchManager.query( String.format( - "uuid:(\"%s\")", - String.join("\" or \"", uuidList)), + "uuid:(\"%s\") AND NOT draft:\"y\"", // Skip working copies as duplicate UUIDs cause the PDF xslt to fail + String.join("\" OR \"", uuidList)), EsFilterBuilder.buildPermissionsFilter(ApiUtils.createServiceContext(httpRequest)), searchFieldsForPdf, 0, maxhits);