Skip to content

Commit

Permalink
Add printer requirement for PDF printing
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuth committed Dec 12, 2024
1 parent cc993e5 commit dbea1ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ implementation("de.gmuth:ipp-client:3.2")

### [IppPrinter](https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/client/IppPrinter.kt) and [IppJob](https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/client/IppJob.kt)

Printing a PDF file [requires the printer to support rendering PDF](https://github.com/gmuth/ipp-client-kotlin/issues/15). `ippPrinter.documentFormatSupported` contains a list of formats (pdls) supported by your printer.

```kotlin
// Initialize printer connection and log printer attributes
val ippPrinter = IppPrinter(URI.create("ipp://colorjet.local/ipp/printer"))
Expand All @@ -38,7 +40,7 @@ ippPrinter.log(logger)
ippPrinter.markers.forEach { println(it) }
println("black: ${ippPrinter.marker(BLACK).levelPercent()} %")

// Print file
// Submit PDF file to a printer that supports rendering PDF
val file = File("A4-ten-pages.pdf")
val job = ippPrinter.printJob(
file,
Expand Down

0 comments on commit dbea1ec

Please sign in to comment.