Error 482 Printer Error with custom page size introduced after build 1253

Posted by: comm-cyber-strategy-org on 4 August 2017, 5:44 am EST

  • Posted 4 August 2017, 5:44 am EST

    Hi,



    When printing a report to a printer with custom paper size the following error is thrown by Printer.StartJob:



    Operating system 482, Printer Error,  Source: Printer Object



    This error DOES NOT happen in build 1253 (eval or registered), but does happen in both 1264 and 1279.



    No other application has problems with custom paper on this printer, but the error is printer dependent (with another printer and custom paper it works fine)



    Since this error definitely does not happen in build 1253, whatever happened between 1253 and 1264 in regards to starting a print job must have introduced this.



    Any ideas?



    Our product is about to release. Am I asking for trouble by releasing it with build 1253?



    Thank you,



    Alex Khain

    Cyber-Strategy, Inc.

  • Posted 4 August 2017, 5:44 am EST

    1279 should have corrected this.  If you can provide me with a sample that I can run on my machine that can reproduce this issue, we will look into it.  All the test applications that I had regarding this issue were fixed. 



    There were some rather large changes made to the printing of custom paper sizes after 1253.  Apparently, we have not ironed out every issue with this new code.  If all your tests pass with build 1253, you should be okay.  But I do recommend getting us a test application so that you will be able to run future builds successfully.

  • Posted 4 August 2017, 5:44 am EST

    Thanks for the reply. I am releasing with the 1253 and keeping my fingers crossed[:O]. I will try to build a test app for you later this week, but it will be difficult to reproduce at your side, since it is printer-specific (Samsung ML-1210).



    I have looked in detail into this printer family driver’s behavior and I think I have an idea what could be causing this:



    I have noticed that when the custom paper is selected for this printer, the AR Printer object does not return the correct paper width and height, but nonsensical values close to 0. 



    When I call GetDeviceCaps(hDC, PHYSICALWIDTH or PHYSICALHEIGHT) Windows API function, it returns the correct dimensions.

     

    In my experience calling GetDeviceCaps is the only reliable way to get the paper dimensions.



    The alternative ways, such as retrieving the driver DEVMODE structure and accessing its public members (dmPaperWidth, dmPaperLength) directly may not yield the correct results for all printers when custom paper is selected.



    If you switched from calling GetDeviceCaps to DEVMODE after build 1253, then it could be it.



    I hope this helps. If you need more info on this, or have a debug build that you would want me to try for you, I would be happy to do it.



    Regards,



    Alex Khain

    Cyber-Strategy, Inc.

    Portland, Oregon

  • Posted 4 August 2017, 5:44 am EST

    We do have an Okidata ML 320 that we use for most of our dot matrix testing.  I imagine I will see the same issue you describe if you can send a small running sample for me to test.

  • Posted 4 August 2017, 5:44 am EST

    Hi Peter,



    Enclosed is a small example demonstrating the issue. I repeat that the problem only shows on a Samsung LASER printer with custom paper and AR build LATER than 1253.



    I doubt you will be able to reproduce it on a dot matrix. Samsungs, are, however, ubiquitous enough that I do not dare to just let this issue go. Plus, all other apps print to that printer just fine, custom paper or not.



    The attached example assumes that the tested printer is the Windows default printer and has the custom size paper set in the Printing Preferences via Start->Settings->Printers & Faxes before the example program is run.



    Under build 1253, the example program previews and prints fine on all printers.



    Under 1279, the preview works fine on all printers, but pressing the Print button on the main form triggers a Printer Error on the Samsung printer with custom paper set.



    We have also seen a variation on this problem where the error is not generated but nothing is printed.



    As I said, with custom paper the Printer object does not have meaningful values set in the paper dimensions, so that is where I would start looking.



    I hope this is of some help, I would be happy to try on the offending printer whatever experiment you need to track it down.



    Regards,

    Alex Khain

    Cyber-Strategy, Inc.

    2005/10/CustomPaperExample.zip

  • Posted 4 August 2017, 5:44 am EST

    I would like to have you try the latest custom paper size fix.  Are you using the professional edition or standard edition?  Also, confirm that your forum address is valid for receiving ZIP attachments.

  • Posted 4 August 2017, 5:44 am EST

    Peter,



    No problem, let’s try it. I have Standard Edition. My e-mail in the forum will accept zip attachments (but not self-extracting .exe attachments unless they are renamed first).



    Regards,

    Alex

    AuC?Ÿ

  • Posted 4 August 2017, 5:44 am EST

    Sent.  Let me know if you do not receive it within the next hour.

  • Posted 4 August 2017, 5:44 am EST

    Peter,



    I got the file, installed it, tried it.

    Unfortunately, no dice. Exactly the same behavior as with build 1279.



    Too bad… I hope you can think of something else to try.



    Thanks for the concentrated effort you are putting into this.



    Regards,



    Alex Khain

    Cyber-Strategy, Inc.

    Portland, Oregon, USA

  • Posted 4 August 2017, 5:44 am EST

    Are you using the 1210 XP driver posted here:

    www. samsungusa.com/cs/printer/download.html



    I have installed this printer and will use it to print to file.  Please try this on your machine to verify that you get the same result.



    Do you have a small sample application I can test this with to produce the 482 error?  My initial testing did not produce any difficulties.

  • Posted 4 August 2017, 5:44 am EST

    Yes, I use this driver (in USB mode):



    http://product.samsung.com/SamsungUSA/DOWNLOAD/20030815/Ml1210_Win.exe



    As for the test application, I uploaded it yesterday. See my post Yesterday at 2:20 AM.



    Regards,



    Alex Khain

    Cyber-Strategy, Inc.

  • Posted 4 August 2017, 5:44 am EST

    I need to know if you see this error when you print to FILE: (on the ports tab of the printer).

  • Posted 4 August 2017, 5:44 am EST

    Yes, Peter, it does.



    If I switch the port from USB to FILE, the error is still there. It errors even before it prompts for the file name. Prints to file fine if the paper size is NOT custom.



    I tested this with the 1280 build you sent me. The Samsung driver I have reports version 4.38. I believe it is the latest.



    I am running the test from the VB6 environment.



    Please let me know if I can be of further assistance.



    Regards,

    Alex Khain

    Cyber-Strategy, Inc.

  • Posted 4 August 2017, 5:44 am EST

    I was able to reproduce your issue and verified that it did not exist in build 1240.  I have created CR 18253 for this issue.  You will be notified via email when this is fixed.

  • Posted 4 August 2017, 5:44 am EST

    Great news!



    Thank you very much!



    Alex Khain

    Cyber-Strategy, Inc.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels