0

The command line command:

ipptool http://192.168.1.102:631 print_pdf

The contents of print_pdf:

{
    VERSION 2.0
    OPERATION Print-Job
    REQUEST-ID 5

    GROUP operation-attributes-tag
    ATTR charset "attributes-charset" "utf-8"
    ATTR naturalLanguage "attributes-natural-language" "en"
    ATTR uri "printer-uri" "http://192.168.1.102:631"
    ATTR name "requesting-user-name" "John"
    ATTR mimeMediaType "document-format" "application/pdf"

    FILE "steampunk.pdf"
}

EDIT: Now I have the error client-error-document-format-not-supported, even though this is the standard application/pdf format.

The docs in the repository do not discuss this error too thoroughly. The image below appears to be where the issue is raised, something to do with a ppd file? enter image description here What could be the issue?

Cheetaiean
  • 262
  • 3
  • 14
  • Since you're not giving a full path to print_pdf, does ipp_tool automatically know where to find it and does have proper permission to access the file? – pell Jul 02 '23 at 13:23
  • Not quite, the issue was with the printer uri. Now however I have a different error – Cheetaiean Jul 02 '23 at 18:44
  • Is it a printer on the other side, or is it a CUPS print server? I'm not entirely sure if the `printer-uri` `http://192.168.1.102:631` is entirely valid, I think it needs to actually target a destination (under `/printers/` or `/classes/`). You can get the default via a `Cups-Get-Default` operation if it's a cups server. If you're directly sending to a printer, you might want to check the printer's `document-format-supported` attribute from a `Get-Printer-Supported-Values` operation. – Torin Jul 02 '23 at 19:07
  • Get-Printer-Supported-Values is not a supported server operation, a `Get-Printer-Attributes` fails with the same error: `{ OPERATION Get-Printer-Attributes GROUP operation-attributes-tag ATTR charset "attributes-charset" "utf-8" ATTR naturalLanguage "attributes-natural-language" "en" ATTR uri "printer-uri" "http://192.168.1.102:631" ATTR name "requesting-user-name" "John Doe" ATTR mimeMediaType "document-format" "application/pdf" ATTR keyword "requested-attributes" "printer-description","job-template","media-col-database" }` – Cheetaiean Jul 02 '23 at 19:21
  • 1
    Could you try the same `Get-Printer-Attributes` operation, but remove `ATTR mimeMediaType "document-format" "application/pdf"` and add `document-format-supported` to the `requested-attributes` list? – Torin Jul 02 '23 at 19:32
  • It is successful, as the only supported format I get `application/vnd.brother-hbp`. I guess that explains it – Cheetaiean Jul 02 '23 at 19:57

0 Answers0