I have solved this. The problem was that Lexmark Optra E310 printer is not supported by Gutenprint project, so the CUPS/Gutenprint system automatically installs a driver for the Lexmark Optra E321, that is a very different printer and it works, or not, depending on document or other circumstances.
The solution was install the original PPD file made for the Optra E310 printer by Lexmark. I attach the file with this message in case it can be helpful for someone with the same problem. Greetings. ** Attachment added: "Original Lekmark Optra E310 PPD file" https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1759921/+attachment/5101051/+files/lope310.ppd -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to cups in Ubuntu. https://bugs.launchpad.net/bugs/1759921 Title: Problem with Lexmark Optra E310: printing system doesn't work Status in cups package in Ubuntu: New Bug description: My printer, Lexmark Optra E310, is configured automatically by the system and it worked perfectly in Linux until now. The Printer is OK, it works perfectly in Windows, but now in Linux everytime I try to print something, whatever it is, it prints the next messages on paper: ERROR: configurationerror OFFENDING COMMAND: setpagedevice STACK: --nostringval-- false 842 595 0 0 842 595 --nostringval-- 5 ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: cups 2.1.3-4ubuntu0.4 ProcVersionSignature: Ubuntu 4.4.0-116.140-generic 4.4.98 Uname: Linux 4.4.0-116-generic x86_64 ApportVersion: 2.20.1-0ubuntu2.15 Architecture: amd64 Date: Thu Mar 29 19:38:02 2018 Lpstat: device for Lexmark-Optra-E310: usb://Lexmark/Optra%20E310?serial=5163293 MachineType: To Be Filled By O.E.M. To Be Filled By O.E.M. Papersize: a4 PpdFiles: Lexmark-Optra-E310: Lexmark Optra E310 Foomatic/Postscript (recommended) ProcEnviron: LANGUAGE=es_ES TERM=xterm PATH=(custom, no user) LANG=es_ES.UTF-8 SHELL=/bin/bash ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-116-generic root=UUID=6a60c9b5-8fd9-472c-95f2-6fb8dcdd7e1d ro splash quiet vt.handoff=7 SourcePackage: cups UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 09/19/2011 dmi.bios.vendor: American Megatrends Inc. dmi.bios.version: P1.40 dmi.board.name: N68-GS3 UCC dmi.board.vendor: ASRock dmi.chassis.asset.tag: To Be Filled By O.E.M. dmi.chassis.type: 3 dmi.chassis.vendor: To Be Filled By O.E.M. dmi.chassis.version: To Be Filled By O.E.M. dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrP1.40:bd09/19/2011:svnToBeFilledByO.E.M.:pnToBeFilledByO.E.M.:pvrToBeFilledByO.E.M.:rvnASRock:rnN68-GS3UCC:rvr:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.: dmi.product.name: To Be Filled By O.E.M. dmi.product.version: To Be Filled By O.E.M. dmi.sys.vendor: To Be Filled By O.E.M. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1759921/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp