google / cloudprint_logocert

Google Cloud Print Logo Certification Automation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(logocert_api) testLocalPrintLayout expects a different output for the file sent

dansinadjan opened this issue · comments

I am now failing on testLocalPrintLayout which I am previously passing in the version 1 of the tool.

I noticed that the test sends the same image/pwg-raster file twice with these parameters respectively: "page_orientation": {"type": "PORTRAIT"}; and "page_orientation": {"type": "LANDSCAPE"}.
screen shot 2017-04-03 at 4 24 04 pm

I'm now getting two portrait printouts, which made me wonder why I passed the test on the previous version. So what I did is that I sniffed out the data while printing from the Chrome browser and manually selecting LANDSCAPE.

This is the image that is sent to the printer:
screen shot 2017-04-03 at 4 23 37 pm

The image is already sent in landscape format.

I've checked with our engineers and confirmed that we don't handle the page orientation in the job ticket because Chrome is already handling the orientation. Receiving an already landscaped page and getting it to rotate to landscape will result in a portrait image. This is why we are passing in the previous version of the tool because we don't do anything with the orientation in the ticket.

I don't think we need to run this test (in Local Printing) if the Chrome browser already takes care of the orientation but let me know if I'm wrong.

Thanks.

commented

Hi,

Thanks for the detailed write up of the issue. You are correct, in the case of a printer that only supports the PWGRaster format for local printing, it is not the printer's responsibility to handle the orientation; Chrome does the image transformation and sends the Raster file to the printer directly.

This issue has been resolved already in a commit on March 23rd: 8318cc4

For Local printing with PWGRaster as input, only 2 CJT options are tested now:

  • Color
  • Duplex

As for Local printing with PDF as input, all 6 of the CJT options are tested:

  • Color
  • Duplex
  • Margins
  • Layout
  • Page Range
  • Copies

Since this branch is still in development, please pull from it often to keep it up-to-date. There has been other changes since March 23rd; however, they are mostly small fixes and improvements. One noteworthy change that may apply to you is that a new test has been added to the Cloud Printing suite, testPrintMarginsOptions.

Please let me know if the issue has been resolved after updating the tool. Thanks for bearing with us and providing feedback while we finalize on the tool, we are getting close!

Thanks,
Kevin

commented

The driving force behind Logocert 2.0 is to replace all Chrome interactions with API calls; therefore, there is no longer any automated tests that print via the Chrome dialog or Mgmt Page.

The interfaces for GCP printing are:

  1. Cloud Print - Submit (GCP API)
  2. Local Print - CreateJob & SubmitDoc (Privet API)

Since the goal of this tool is to certify a printer, there are no differences in starting a print job via Chrome or Mgmt page since they call the same underlying APIs anyway. We understand that this is the most common use case for GCP printing and so we still have manual tests to verify Chrome-related print jobs.

For LocalPrintPDFPageRange, we want to test the printer's ability to handle the page range specification in the CJT sent via SubmitDoc instead of Chrome's ability to truncate the document before sending it to the printer.

Hopefully that helps!

Cheers,
Kevin

commented

Hi Dan,

The printer's Local Printing Privet API needs to work with Chrome, GCP Servers, and any other applications that may interact with it. Therefore, this test is necessary for the certification of a printer.

Regarding local printing a PDF file via the Chrome browser, indeed there is no orientation option to specify, but the user may right-click and rotate the image in the print dialogue view. Either way, Chrome just uses 'AUTO' as the orientation option in the CJT. In this case, the printer does not have to handle the transformation and just uses the default orientation option to print the job.

Since you cannot specify orientation from Chrome's local printing, I'm assuming you are referring to Cloud Print which is sending an already transformed image with the Landscape option in the CJT. In the case of Cloud Printing, similar logic as local printing is applied, the image is transformed at the server but the orientation option in the CJT should be 'PORTRAIT'. It is strange that your printer is getting 'LANDSCAPE' in the CJT.

Please verify this by kicking off a job with the landscape orientation set. Then you can inspect the CJT that is sent by the GCP servers using the Job Fetch API on https://www.google.com/cloudprint/simulate.html. Just fill in the 'Job ID' field, check the 'Use CJT' box, and click 'Get Print Ticket'.

image

In the resulting page, the CJT will be shown. The 'page_orientation' field should be 'PORTRAIT' regardless of the orientation specification you've specified earlier. Please let me know if this is not that case for you.

Cheers,
Kevin

commented

Hi Dan,

The general idea is correct.

As for whether or not the 'flipped' image should be centered, I would just kick off Cloud Print jobs with the same image but with different orientations and see how the GCP server handles it.

In my experience, I have seen the 'flipped' images printed near the top of the page instead of in the center.

Thanks,
Kevin

Since all clarifications had been addressed, I'll close this issue. Thanks for the accommodation, Kevin.