You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.
Trying to init the provider. Error happens on this line, toward the bottom
var token = await provider.GenerateAccessTokenAsync(refreshToken);
context:
// Create a cloud job ticket first, it contains the printer setting of the document
var cjt = new CloudJobTicket {
Print = new PrintTicketSection {
Color = new ColorTicketItem {
Type = GoogleCloudPrintApi.Models.Printer.Color.Type.STANDARD_MONOCHROME
},
Duplex = new DuplexTicketItem {
Type = Duplex.Type.LONG_EDGE
},
PageOrientation = new PageOrientationTicketItem {
Type = PageOrientation.Type.LANDSCAPE
},
Copies = new CopiesTicketItem {
Copies = 3
}
}
};
// Create a request for file submission, you can either submit a url with SubmitFileLink class, or a local file with SubmitFileStream class
var request = new SubmitRequest {
PrinterId = Properties.Settings.Default.CPPrinterId,
Title = orderId,
Ticket = cjt,
//Content = new SubmitFileLink(url) // or new SubmitFileStream(contentType, fileName, fileStream)
Content = new SubmitFileStream("application/pdf", orderId, outputMemstream)
};
var clientId = Properties.Settings.Default.CPClientId;
var clientSecret = Properties.Settings.Default.CPClientSecret;
var refreshToken = Properties.Settings.Default.CPRefreshToken;
var provider = new GoogleCloudPrintOAuth2Provider(clientId, clientSecret);
/* Your method to retrieve authorization code from the above url */
var token = await provider.GenerateAccessTokenAsync(refreshToken);
var CPClient = new GoogleCloudPrintClient(provider, token);
// Submit request
var response = CPClient.SubmitJobAsync(request);
The text was updated successfully, but these errors were encountered:
HI anyone else seen this? I'm quite stuck :(
Trying to init the provider. Error happens on this line, toward the bottom
var token = await provider.GenerateAccessTokenAsync(refreshToken);
context:
The text was updated successfully, but these errors were encountered: