use pdfcpu for pagecount
All checks were successful
Go / build (push) Successful in 13m36s

This commit is contained in:
2025-07-02 00:50:04 +02:00
parent 16c68cd0f8
commit b75c46ec2f
4 changed files with 43 additions and 51 deletions

View File

@@ -135,6 +135,7 @@ func (p *PrintJob) CalculatePrintCosts() (float64, error) {
pageCount := utils.CountPagesAtPath(p.ShopItem.Pdf)
if pageCount == 0 {
fmt.Println("Pagecount of 0 - something is wrong here.")
return 0, fmt.Errorf("Cant calculate price, pdf seems to be empty")
}