Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't print #2

Open
Stryno opened this issue May 19, 2021 · 20 comments
Open

Doesn't print #2

Stryno opened this issue May 19, 2021 · 20 comments

Comments

@Stryno
Copy link

Stryno commented May 19, 2021

Hi Evgeny,
I found SharpIpp on Nuget and it's what I need - send PDF file to a printer using IP. I tried to use it (got rid of async stuff though). It returns no error but the document is not printed. Not sure how to troubleshoot it as it's using client.PrintJobAsync(request) which returns OK. I'd appreciate any help.
Thank you,
Yuri

public static bool PrintPDFIPP(string printerIP,
string filename,
string paperName = null,
int copies = 1,
bool? isColor = null,
Duplex duplex = Duplex.Default)
{
var stream = File.Open(@filename, FileMode.Open);
var printerUri = new Uri(@"ipp://" + printerIP + ":631");
var request = new PrintJobRequest
{
PrinterUri = printerUri,
Document = stream,
JobName = Path.GetFileName(filename),
IppAttributeFidelity = false,
DocumentName = Path.GetFileName(filename),
DocumentFormat = "application /octet-stream",
DocumentNaturalLanguage = "en",
MultipleDocumentHandling = MultipleDocumentHandling.SeparateDocumentsCollatedCopies,
Copies = copies,
Finishings = Finishings.None,
//PageRanges = new[] { new Range(1, 1) },
Sides = (Sides)duplex,
//NumberUp = 1,
//OrientationRequested = Orientation.Portrait,
//PrinterResolution = new Resolution(600, 600, ResolutionUnit.DotsPerInch),
//PrintQuality = PrintQuality.Normal
};
SharpIppClient client = new SharpIppClient();
var response = client.PrintJobAsync(request);
return true;
}

@Zelenov
Copy link
Owner

Zelenov commented May 26, 2021

Hi, @Stryno. Could you please serialize and send me your PrintJobResponse so I can analyze AllAttributes field?
You can also try checking new print job's attributes:

var request = new GetJobAttributesRequest {PrinterUri =  new Uri(@"ipp://" + printerIP + ":631"), JobId = jobId};
var response = client.GetJobAttributesAsync(request);

There may be some strange values for the job which seems like unsuccessful.

@Stryno
Copy link
Author

Stryno commented Jun 1, 2021

Hi @Zelenov, I have changed method to async and now am getting error:
SharpIpp.Exceptions.IppResponseException: 'Printer returned error code in Print-Job response
Version: V11
StatusCode: ClientErrorBadRequest
RequestId: 1
Attributes:
(Charset) attributes-charset: utf-8
(NaturalLanguage) attributes-natural-language: en'

This exception was originally thrown at this call stack:
[External Code]
Send2Print.Program.PrintPDFIPP(string, string, string, int, bool?, System.Drawing.Printing.Duplex) in Program.cs
[External Code]
Send2Print.Program.Main(string[]) in Program.cs

SharpIpp.Exceptions.IppResponseException
HResult=0x80131500
Message=Printer returned error code in Print-Job response
Version: V11
StatusCode: ClientErrorBadRequest
RequestId: 1
Attributes:
(Charset) attributes-charset: utf-8
(NaturalLanguage) attributes-natural-language: en
Source=SharpIpp
StackTrace:
at SharpIpp.Protocol.IppProtocol.ReadPrintJobResponse(Stream stream)
at SharpIpp.SharpIppClient.<>c__DisplayClass7_0.b__1(Stream stream)
at SharpIpp.SharpIppClient.d__111.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at SharpIpp.SharpIppClient.<PrintJobAsync>d__7.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at Send2Print.Program.d__5.MoveNext() in C:\Users\yuri\source\repos\Send2Print\Send2Print\Program.cs:line 371
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Send2Print.Program.

d__3.MoveNext() in C:\Users\yuri\source\repos\Send2Print\Send2Print\Program.cs:line 255

This exception was originally thrown at this call stack:
[External Code]
Send2Print.Program.PrintPDFIPP(string, string, string, int, bool?, System.Drawing.Printing.Duplex) in Program.cs
[External Code]
Send2Print.Program.Main(string[]) in Program.cs

@Stryno
Copy link
Author

Stryno commented Jun 1, 2021

The code looks almost the same:
public static async Task PrintPDFIPP(string printerIP,
string filename,
string paperName = null,
int copies = 1,
bool? isColor = null,
Duplex duplex = Duplex.Default)
{

        FileStream stream = File.Open(@filename, FileMode.Open);
        var printerUri = new Uri(@"ipp://" + printerIP + ":631");
        string jobname = Path.GetFileName(filename);
        var request = new PrintJobRequest
        {
            PrinterUri = printerUri,
            Document = stream,
            JobName = jobname,
            IppAttributeFidelity = false,
            DocumentName = jobname,
            DocumentFormat = "application /octet-stream",
            DocumentNaturalLanguage = "en",
            MultipleDocumentHandling = MultipleDocumentHandling.SeparateDocumentsCollatedCopies,
            Copies = copies,
            Finishings = Finishings.None,
            //PageRanges = new[] { new Range(1, 1) },
            Sides = (Sides)duplex,
            //NumberUp = 1,
            //OrientationRequested = Orientation.Portrait,
            //PrinterResolution = new Resolution(600, 600, ResolutionUnit.DotsPerInch),
            //PrintQuality = PrintQuality.Normal
        };
        SharpIppClient client = new SharpIppClient();
        var response = await client.PrintJobAsync(request);

        string seresponse = response.SerializeObject();

        return true;
    }

@Zelenov
Copy link
Owner

Zelenov commented Jun 2, 2021

StatusCode: ClientErrorBadRequest

This code resembles somewhat like status code 400 for http. It tells that there's an error in the data you've just sent.
I assume that the document (Stream) you are sending is not supported by your printer.
Try printing this pdf instead: https://github.com/Zelenov/SharpIpp/blob/master/SharpIpp.Tests/Resources/word-2-pages.pdf.

Also, try printing without unnecessary parameters at all:

 var request = new PrintJobRequest
  {
      PrinterUri = printerUri,
      Document = stream
  };

@Stryno
Copy link
Author

Stryno commented Jun 2, 2021

Hi @Zelenov,
I tried the simple PrintJobRequest initialization as
var request = new PrintJobRequest
{
PrinterUri = printerUri,
Document = stream
};
and it successfully printed my file!
So the problem is in one of the properties. Not sure which one but I could turn them on one by one and figure it out.
Thank you

@Stryno
Copy link
Author

Stryno commented Jun 2, 2021

It turned out the guilty property is

DocumentFormat = "application /octet-stream"

I don't really need this so can comment it out.

Is there a way to set Color / BW ?

Thank you

@Zelenov
Copy link
Owner

Zelenov commented Jun 2, 2021

print-color-mode is not a part of ipp 1.1, it's an extension.
So you have to set it manually as additional attribute.

var request = new PrintJobRequest
{
    PrinterUri = printerUri,
    Document = stream
    AdditionalJobAttributes = new IppAttribute[]
    {
        new IppAttribute(Tag.Keyword, "print-color-mode", "monochrome")
    }
}

Available values of print-color-mode for your printer can be found in PrinterAttributes

var request = new GetPrinterAttributesRequest {PrinterUri = xxxx};
var response = await client.GetPrinterAttributesAsync(request);          
var supported = res.Sections.FirstOrDefault(s=>s.Tag==SectionTag.PrinterAttributesTag)
               ?.Attributes.Where(a => a.Name == "print-color-mode-supported")
               .Select(a => a.Value.ToString())
               .ToArray() ?? new string?[0];

@Stryno
Copy link
Author

Stryno commented Jun 2, 2021

@Zelenov - thank you very much for your support.
Not sure what is res.Sections in your sample?
The GetPrinterAttributesResponse does not contain any Sections. Did you mean AllAttributes?
The response does have bool? ColorSupported but my printer (Brother MFC-9340CDW) returns false into it which is incorrect as it does print in color.

@Zelenov
Copy link
Owner

Zelenov commented Jun 2, 2021

Try updating SharpIpp to the latest version. I've just updated it a week ago

Or use AllAttributes in the current version

@Zelenov
Copy link
Owner

Zelenov commented Jun 2, 2021

The response does have bool? ColorSupported but my printer (Brother MFC-9340CDW) returns false into it which is incorrect as it does print in color.

Could you please send me serialized PrinterAttributesResponse so
I can fix/check this bug(?)

@Stryno
Copy link
Author

Stryno commented Jun 2, 2021

Here you go:

ipp://BRWB010412572B6.local./ipp/print none none BRWB010412572B6 Brother MFC-9340CDW http://BRWB010412572B6.local./net/net/airprint.html Brother MFC-9340CDW Idle none 1.0 1.1 2.0 PrintJob ValidateJob CancelJob GetJobAttributes GetJobs GetPrinterAttributes false utf-8 utf-8 en en fr application/octet-stream application/octet-stream image/urf image/pwg-raster false 0 false attempted 287777 None 23 23 V11 SuccessfulOk 1 OperationAttributesTag PrinterAttributesTag

@Stryno
Copy link
Author

Stryno commented Jun 2, 2021

hmm it strips off all XML tags

@Zelenov
Copy link
Owner

Zelenov commented Jun 2, 2021

hmm it strips off all XML tags

Put you reply between triple tildas

Like this

@Stryno
Copy link
Author

Stryno commented Jun 2, 2021

<GetPrinterAttributesResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <PrinterUriSupported>
    <string>ipp://BRWB010412572B6.local./ipp/print</string>
  </PrinterUriSupported>
  <UriSecuritySupported>
    <string>none</string>
  </UriSecuritySupported>
  <UriAuthenticationSupported>
    <string>none</string>
  </UriAuthenticationSupported>
  <PrinterName>BRWB010412572B6</PrinterName>
  <PrinterLocation />
  <PrinterInfo>Brother MFC-9340CDW</PrinterInfo>
  <PrinterMoreInfo>http://BRWB010412572B6.local./net/net/airprint.html</PrinterMoreInfo>
  <PrinterMakeAndModel>Brother MFC-9340CDW</PrinterMakeAndModel>
  <PrinterState>Idle</PrinterState>
  <PrinterStateReasons>
    <string>none</string>
  </PrinterStateReasons>
  <IppVersionsSupported>
    <string>1.0</string>
    <string>1.1</string>
    <string>2.0</string>
  </IppVersionsSupported>
  <OperationsSupported>
    <IppOperation>PrintJob</IppOperation>
    <IppOperation>ValidateJob</IppOperation>
    <IppOperation>CancelJob</IppOperation>
    <IppOperation>GetJobAttributes</IppOperation>
    <IppOperation>GetJobs</IppOperation>
    <IppOperation>GetPrinterAttributes</IppOperation>
  </OperationsSupported>
  <MultipleDocumentJobsSupported>false</MultipleDocumentJobsSupported>
  <CharsetConfigured>utf-8</CharsetConfigured>
  <CharsetSupported>
    <string>utf-8</string>
  </CharsetSupported>
  <NaturalLanguageConfigured>en</NaturalLanguageConfigured>
  <GeneratedNaturalLanguageSupported>
    <string>en</string>
    <string>fr</string>
  </GeneratedNaturalLanguageSupported>
  <DocumentFormatDefault>application/octet-stream</DocumentFormatDefault>
  <DocumentFormatSupported>
    <string>application/octet-stream</string>
    <string>image/urf</string>
    <string>image/pwg-raster</string>
  </DocumentFormatSupported>
  <PrinterIsAcceptingJobs>false</PrinterIsAcceptingJobs>
  <QueuedJobCount>0</QueuedJobCount>
  <ColorSupported>false</ColorSupported>
  <PdlOverrideSupported>attempted</PdlOverrideSupported>
  <PrinterUpTime>287777</PrinterUpTime>
  <PrinterCurrentTime xsi:nil="true" />
  <MultipleOperationTimeOut xsi:nil="true" />
  <CompressionSupported>
    <Compression>None</Compression>
  </CompressionSupported>
  <JobKOctetsSupported xsi:nil="true" />
  <JobImpressionsSupported xsi:nil="true" />
  <JobMediaSheetsSupported xsi:nil="true" />
  <PagesPerMinute>23</PagesPerMinute>
  <PagesPerMinuteColor>23</PagesPerMinuteColor>
  <PrintScalingDefault xsi:nil="true" />
  <Version>V11</Version>
  <StatusCode>SuccessfulOk</StatusCode>
  <RequestId>1</RequestId>
  <Sections>
    <IppSection>
      <Tag>OperationAttributesTag</Tag>
      <Attributes>
        <IppAttribute />
        <IppAttribute />
      </Attributes>
    </IppSection>
    <IppSection>
      <Tag>PrinterAttributesTag</Tag>
      <Attributes>
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
        <IppAttribute />
      </Attributes>
    </IppSection>
  </Sections>
</GetPrinterAttributesResponse>~~~

@Stryno
Copy link
Author

Stryno commented Jun 2, 2021

That's after upgrading to 0.9.0

@Zelenov
Copy link
Owner

Zelenov commented Jun 2, 2021

Seems like response is not that great in xml serialization: all the attributes are empty. Could you please serialize it to json? I would add a better xml serialization and .ToString() in the future releases

@Stryno
Copy link
Author

Stryno commented Jun 2, 2021

I tried to set
request.AdditionalJobAttributes = new IppAttribute[]
{
new IppAttribute(Tag.Keyword, "print-color-mode", "monochrome")
};
but it still prints in color.

Also I set Sides = 2 which is supposed to be Duplex Vertical and it doesn't work either - prints two sheets of paper instead of one two-sided sheet.

@Stryno
Copy link
Author

Stryno commented Jun 2, 2021

{
"PrinterUriSupported": [ "ipp://BRWB010412572B6.local./ipp/print" ],
"UriSecuritySupported": [ "none" ],
"UriAuthenticationSupported": [ "none" ],
"PrinterName": "BRWB010412572B6",
"PrinterLocation": "",
"PrinterInfo": "Brother MFC-9340CDW",
"PrinterMoreInfo": "http://BRWB010412572B6.local./net/net/airprint.html",
"PrinterDriverInstaller": null,
"PrinterMakeAndModel": "Brother MFC-9340CDW",
"PrinterMoreInfoManufacturer": null,
"PrinterState": 3,
"PrinterStateReasons": [ "none" ],
"PrinterStateMessage": null,
"IppVersionsSupported": [ "1.0", "1.1", "2.0" ],
"OperationsSupported": [ 2, 4, 8, 9, 10, 11 ],
"MultipleDocumentJobsSupported": false,
"CharsetConfigured": "utf-8",
"CharsetSupported": [ "utf-8" ],
"NaturalLanguageConfigured": "en",
"GeneratedNaturalLanguageSupported": [ "en", "fr" ],
"DocumentFormatDefault": "application/octet-stream",
"DocumentFormatSupported": [ "application/octet-stream", "image/urf", "image/pwg-raster" ],
"PrinterIsAcceptingJobs": false,
"QueuedJobCount": 0,
"PrinterMessageFromOperator": null,
"ColorSupported": false,
"ReferenceUriSchemesSupported": null,
"PdlOverrideSupported": "attempted",
"PrinterUpTime": 290468,
"PrinterCurrentTime": null,
"MultipleOperationTimeOut": null,
"CompressionSupported": [ 1 ],
"JobKOctetsSupported": null,
"JobImpressionsSupported": null,
"JobMediaSheetsSupported": null,
"PagesPerMinute": 23,
"PagesPerMinuteColor": 23,
"PrintScalingDefault": null,
"PrintScalingSupported": null,
"Version": 257,
"StatusCode": 0,
"RequestId": 1,
"Sections": [
{
"Tag": 1,
"Attributes": [
{
"Tag": 71,
"Name": "attributes-charset",
"Value": "utf-8"
},
{
"Tag": 72,
"Name": "attributes-natural-language",
"Value": "en"
}
]
},
{
"Tag": 4,
"Attributes": [
{
"Tag": 33,
"Name": "copies-default",
"Value": 1
},
{
"Tag": 35,
"Name": "finishings-default",
"Value": 3
},
{
"Tag": 68,
"Name": "media-default",
"Value": "na_letter_8.5x11in"
},
{
"Tag": 52,
"Name": "media-col-default",
"Value": ""
},
{
"Tag": 74,
"Name": "media-col-default",
"Value": "media-type"
},
{
"Tag": 68,
"Name": "media-col-default",
"Value": "stationery"
},
{
"Tag": 74,
"Name": "media-col-default",
"Value": "media-size"
},
{
"Tag": 52,
"Name": "media-col-default",
"Value": ""
},
{
"Tag": 74,
"Name": "media-col-default",
"Value": "x-dimension"
},
{
"Tag": 33,
"Name": "media-col-default",
"Value": 21590
},
{
"Tag": 74,
"Name": "media-col-default",
"Value": "y-dimension"
},
{
"Tag": 33,
"Name": "media-col-default",
"Value": 27940
},
{
"Tag": 55,
"Name": "media-col-default",
"Value": {}
},
{
"Tag": 74,
"Name": "media-col-default",
"Value": "media-bottom-margin"
},
{
"Tag": 33,
"Name": "media-col-default",
"Value": 432
},
{
"Tag": 74,
"Name": "media-col-default",
"Value": "media-left-margin"
},
{
"Tag": 33,
"Name": "media-col-default",
"Value": 432
},
{
"Tag": 74,
"Name": "media-col-default",
"Value": "media-right-margin"
},
{
"Tag": 33,
"Name": "media-col-default",
"Value": 432
},
{
"Tag": 74,
"Name": "media-col-default",
"Value": "media-top-margin"
},
{
"Tag": 33,
"Name": "media-col-default",
"Value": 432
},
{
"Tag": 74,
"Name": "media-col-default",
"Value": "media-source"
},
{
"Tag": 68,
"Name": "media-col-default",
"Value": "auto"
},
{
"Tag": 55,
"Name": "media-col-default",
"Value": {}
},
{
"Tag": 35,
"Name": "orientation-requested-default",
"Value": 3
},
{
"Tag": 68,
"Name": "output-bin-default",
"Value": "face-down"
},
{
"Tag": 68,
"Name": "output-mode-default",
"Value": "color"
},
{
"Tag": 35,
"Name": "print-quality-default",
"Value": 4
},
{
"Tag": 50,
"Name": "printer-resolution-default",
"Value": {
"Width": 600,
"Height": 600,
"Units": 3
}
},
{
"Tag": 68,
"Name": "sides-default",
"Value": "one-sided"
},
{
"Tag": 68,
"Name": "print-color-mode-default",
"Value": "color"
},
{
"Tag": 51,
"Name": "copies-supported",
"Value": {
"Lower": 1,
"Upper": 1
}
},
{
"Tag": 35,
"Name": "finishings-supported",
"Value": 3
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "iso_a4_210x297mm"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "na_letter_8.5x11in"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "na_legal_8.5x14in"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "na_executive_7.25x10.5in"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "iso_a5_148x210mm"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "iso_a6_105x148mm"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "iso_b5_176x250mm"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "jis_b5_182x257mm"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "na_number-10_4.125x9.5in"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "iso_dl_110x220mm"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "iso_c5_162x229mm"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "na_monarch_3.875x7.5in"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "na_index-3x5_3x5in"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "om_folio_210x330mm"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "custom_min_76.2x127mm"
},
{
"Tag": 68,
"Name": "media-supported",
"Value": "custom_max_215.9x355.6mm"
},
{
"Tag": 68,
"Name": "media-col-supported",
"Value": "media-type"
},
{
"Tag": 68,
"Name": "media-col-supported",
"Value": "media-size"
},
{
"Tag": 68,
"Name": "media-col-supported",
"Value": "media-top-margin"
},
{
"Tag": 68,
"Name": "media-col-supported",
"Value": "media-left-margin"
},
{
"Tag": 68,
"Name": "media-col-supported",
"Value": "media-right-margin"
},
{
"Tag": 68,
"Name": "media-col-supported",
"Value": "media-bottom-margin"
},
{
"Tag": 68,
"Name": "media-col-supported",
"Value": "media-source"
},
{
"Tag": 35,
"Name": "orientation-requested-supported",
"Value": 3
},
{
"Tag": 35,
"Name": "orientation-requested-supported",
"Value": 4
},
{
"Tag": 68,
"Name": "output-bin-supported",
"Value": "face-down"
},
{
"Tag": 68,
"Name": "output-mode-supported",
"Value": "color"
},
{
"Tag": 68,
"Name": "output-mode-supported",
"Value": "auto"
},
{
"Tag": 68,
"Name": "output-mode-supported",
"Value": "monochrome"
},
{
"Tag": 35,
"Name": "print-quality-supported",
"Value": 4
},
{
"Tag": 35,
"Name": "print-quality-supported",
"Value": 5
},
{
"Tag": 50,
"Name": "printer-resolution-supported",
"Value": {
"Width": 600,
"Height": 600,
"Units": 3
}
},
{
"Tag": 50,
"Name": "printer-resolution-supported",
"Value": {
"Width": 2400,
"Height": 600,
"Units": 3
}
},
{
"Tag": 68,
"Name": "sides-supported",
"Value": "one-sided"
},
{
"Tag": 68,
"Name": "sides-supported",
"Value": "two-sided-long-edge"
},
{
"Tag": 68,
"Name": "sides-supported",
"Value": "two-sided-short-edge"
},
{
"Tag": 68,
"Name": "print-color-mode-supported",
"Value": "auto"
},
{
"Tag": 68,
"Name": "print-color-mode-supported",
"Value": "color"
},
{
"Tag": 68,
"Name": "print-color-mode-supported",
"Value": "monochrome"
},
{
"Tag": 72,
"Name": "generated-natural-language-supported",
"Value": "en"
},
{
"Tag": 72,
"Name": "generated-natural-language-supported",
"Value": "fr"
},
{
"Tag": 69,
"Name": "printer-uri-supported",
"Value": "ipp://BRWB010412572B6.local./ipp/print"
},
{
"Tag": 68,
"Name": "uri-security-supported",
"Value": "none"
},
{
"Tag": 68,
"Name": "uri-authentication-supported",
"Value": "none"
},
{
"Tag": 66,
"Name": "printer-name",
"Value": "BRWB010412572B6"
},
{
"Tag": 65,
"Name": "printer-location",
"Value": ""
},
{
"Tag": 65,
"Name": "printer-info",
"Value": "Brother MFC-9340CDW"
},
{
"Tag": 65,
"Name": "printer-make-and-model",
"Value": "Brother MFC-9340CDW"
},
{
"Tag": 35,
"Name": "printer-state",
"Value": 3
},
{
"Tag": 68,
"Name": "printer-state-reasons",
"Value": "none"
},
{
"Tag": 68,
"Name": "ipp-versions-supported",
"Value": "1.0"
},
{
"Tag": 68,
"Name": "ipp-versions-supported",
"Value": "1.1"
},
{
"Tag": 68,
"Name": "ipp-versions-supported",
"Value": "2.0"
},
{
"Tag": 35,
"Name": "operations-supported",
"Value": 2
},
{
"Tag": 35,
"Name": "operations-supported",
"Value": 4
},
{
"Tag": 35,
"Name": "operations-supported",
"Value": 8
},
{
"Tag": 35,
"Name": "operations-supported",
"Value": 9
},
{
"Tag": 35,
"Name": "operations-supported",
"Value": 10
},
{
"Tag": 35,
"Name": "operations-supported",
"Value": 11
},
{
"Tag": 34,
"Name": "multiple-document-jobs-supported",
"Value": false
},
{
"Tag": 72,
"Name": "natural-language-configured",
"Value": "en"
},
{
"Tag": 71,
"Name": "charset-configured",
"Value": "utf-8"
},
{
"Tag": 71,
"Name": "charset-supported",
"Value": "utf-8"
},
{
"Tag": 73,
"Name": "document-format-supported",
"Value": "application/octet-stream"
},
{
"Tag": 73,
"Name": "document-format-supported",
"Value": "image/urf"
},
{
"Tag": 73,
"Name": "document-format-supported",
"Value": "image/pwg-raster"
},
{
"Tag": 73,
"Name": "document-format-default",
"Value": "application/octet-stream"
},
{
"Tag": 34,
"Name": "printer-is-accepting-jobs",
"Value": false
},
{
"Tag": 33,
"Name": "queued-job-count",
"Value": 0
},
{
"Tag": 68,
"Name": "pdl-override-supported",
"Value": "attempted"
},
{
"Tag": 33,
"Name": "printer-up-time",
"Value": 290468
},
{
"Tag": 68,
"Name": "compression-supported",
"Value": "none"
},
{
"Tag": 34,
"Name": "color-supported",
"Value": false
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "copies"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "finishings"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "ipp-attribute-fidelity"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "job-name"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "media"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "media-col"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "orientation-requested"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "output-bin"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "output-mode"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "print-quality"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "printer-resolution"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "requesting-user-name"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "sides"
},
{
"Tag": 68,
"Name": "job-creation-attributes-supported",
"Value": "print-color-mode"
},
{
"Tag": 35,
"Name": "landscape-orientation-requested-preferred",
"Value": 5
},
{
"Tag": 66,
"Name": "marker-colors",
"Value": "#000000"
},
{
"Tag": 66,
"Name": "marker-colors",
"Value": "#00FFFF"
},
{
"Tag": 66,
"Name": "marker-colors",
"Value": "#FF00FF"
},
{
"Tag": 66,
"Name": "marker-colors",
"Value": "#FFFF00"
},
{
"Tag": 33,
"Name": "marker-high-levels",
"Value": 100
},
{
"Tag": 33,
"Name": "marker-high-levels",
"Value": 100
},
{
"Tag": 33,
"Name": "marker-high-levels",
"Value": 100
},
{
"Tag": 33,
"Name": "marker-high-levels",
"Value": 100
},
{
"Tag": 33,
"Name": "marker-levels",
"Value": 50
},
{
"Tag": 33,
"Name": "marker-levels",
"Value": 30
},
{
"Tag": 33,
"Name": "marker-levels",
"Value": 30
},
{
"Tag": 33,
"Name": "marker-levels",
"Value": 30
},
{
"Tag": 33,
"Name": "marker-low-levels",
"Value": 10
},
{
"Tag": 33,
"Name": "marker-low-levels",
"Value": 10
},
{
"Tag": 33,
"Name": "marker-low-levels",
"Value": 10
},
{
"Tag": 33,
"Name": "marker-low-levels",
"Value": 10
},
{
"Tag": 66,
"Name": "marker-names",
"Value": "Black Toner Cartridge"
},
{
"Tag": 66,
"Name": "marker-names",
"Value": "Cyan Toner Cartridge"
},
{
"Tag": 66,
"Name": "marker-names",
"Value": "Magenta Toner Cartridge"
},
{
"Tag": 66,
"Name": "marker-names",
"Value": "Yellow Toner Cartridge"
},
{
"Tag": 68,
"Name": "marker-types",
"Value": "toner"
},
{
"Tag": 68,
"Name": "marker-types",
"Value": "toner"
},
{
"Tag": 68,
"Name": "marker-types",
"Value": "toner"
},
{
"Tag": 68,
"Name": "marker-types",
"Value": "toner"
},
{
"Tag": 33,
"Name": "media-bottom-margin-supported",
"Value": 432
},
{
"Tag": 33,
"Name": "media-left-margin-supported",
"Value": 432
},
{
"Tag": 33,
"Name": "media-right-margin-supported",
"Value": 432
},
{
"Tag": 68,
"Name": "media-source-supported",
"Value": "auto"
},
{
"Tag": 68,
"Name": "media-source-supported",
"Value": "manual"
},
{
"Tag": 68,
"Name": "media-source-supported",
"Value": "tray-1"
},
{
"Tag": 33,
"Name": "media-top-margin-supported",
"Value": 432
},
{
"Tag": 68,
"Name": "media-type-supported",
"Value": "stationery"
},
{
"Tag": 68,
"Name": "media-type-supported",
"Value": "stationery-lightweight"
},
{
"Tag": 68,
"Name": "media-type-supported",
"Value": "stationery-heavyweight"
},
{
"Tag": 68,
"Name": "media-type-supported",
"Value": "stationery-cover"
},
{
"Tag": 68,
"Name": "media-type-supported",
"Value": "envelope"
},
{
"Tag": 68,
"Name": "media-type-supported",
"Value": "envelope-heavyweight"
},
{
"Tag": 68,
"Name": "media-type-supported",
"Value": "envelope-lightweight"
},
{
"Tag": 68,
"Name": "media-type-supported",
"Value": "stationery-recycled"
},
{
"Tag": 68,
"Name": "media-type-supported",
"Value": "labels"
},
{
"Tag": 68,
"Name": "media-type-supported",
"Value": "photographic-glossy"
},
{
"Tag": 68,
"Name": "media-type-supported",
"Value": "stationery-bond"
},
{
"Tag": 33,
"Name": "pages-per-minute",
"Value": 23
},
{
"Tag": 33,
"Name": "pages-per-minute-color",
"Value": 23
},
{
"Tag": 68,
"Name": "pdf-versions-supported",
"Value": "none"
},
{
"Tag": 65,
"Name": "printer-device-id",
"Value": "MFG:Brother;CMD:PJL,PCL,PCLXL,URF;MDL:MFC-9340CDW;CLS:PRINTER;CID:Brother Color Type4;URF:SRGB24,W8,CP1,IS1-4,MT1-3-4-5-8-11,OB10,PQ4-5,RS600,DM1;"
},
{
"Tag": 69,
"Name": "printer-icons",
"Value": "http://BRWB010412572B6.local./ipp/printer-icons-128.png"
},
{
"Tag": 69,
"Name": "printer-icons",
"Value": "http://BRWB010412572B6.local./ipp/printer-icons-512.png"
},
{
"Tag": 69,
"Name": "printer-more-info",
"Value": "http://BRWB010412572B6.local./net/net/airprint.html"
},
{
"Tag": 69,
"Name": "printer-uuid",
"Value": "urn:uuid:e3248000-80ce-11db-8000-30055c6f5dc8"
},
{
"Tag": 68,
"Name": "urf-supported",
"Value": "SRGB24"
},
{
"Tag": 68,
"Name": "urf-supported",
"Value": "W8"
},
{
"Tag": 68,
"Name": "urf-supported",
"Value": "CP1"
},
{
"Tag": 68,
"Name": "urf-supported",
"Value": "IS1-4"
},
{
"Tag": 68,
"Name": "urf-supported",
"Value": "MT1-3-4-5-8-11"
},
{
"Tag": 68,
"Name": "urf-supported",
"Value": "OB10"
},
{
"Tag": 68,
"Name": "urf-supported",
"Value": "PQ4-5"
},
{
"Tag": 68,
"Name": "urf-supported",
"Value": "RS600"
},
{
"Tag": 68,
"Name": "urf-supported",
"Value": "DM1"
},
{
"Tag": 68,
"Name": "ipp-features-supported",
"Value": "wfds-print-1.0"
},
{
"Tag": 50,
"Name": "pwg-raster-document-resolution-supported",
"Value": {
"Width": 600,
"Height": 600,
"Units": 3
}
},
{
"Tag": 68,
"Name": "pwg-raster-document-sheet-back-supported",
"Value": "Rotated"
},
{
"Tag": 68,
"Name": "pwg-raster-document-type-supported",
"Value": "srgb_8"
},
{
"Tag": 68,
"Name": "pwg-raster-document-type-supported",
"Value": "sgray_8"
}
]
}
]
}

@Stryno
Copy link
Author

Stryno commented Jun 23, 2021

@Zelenov Hi Evgeny - any chance you'd get back to this project any time soon? Thank you

@Zelenov
Copy link
Owner

Zelenov commented Jun 23, 2021

Hi, have no color ipp-printer available. The only way I can debug this stuff is if someone gives me access to it. On the other hand, your output seems ok (no errors at least).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants