Your CODE and your description do not fit together.
Where did you place your buttons and checkboxes?
Can you show a screenshot of your constalation?
This here hides all your buttons emidiately when no data found for each datafield(data-column) in your DATABASE, when REPEATER is READY.
$w.onReady(function () {
$w("#repeater1").onItemReady(($item, itemData, index) => {
console.log(itemData.pdf);
if(itemData.pdf === undefined ) {$item("#button1").hide();}
if(itemData.labelnew1 === undefined ) {$item("#button3").hide();}
if(itemData.labelbukken === undefined ) {$item("#button4").hide();}
});
});
What next ?