[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with PageLayout and Print panel
From: |
Fred Kiefer |
Subject: |
Re: Problem with PageLayout and Print panel |
Date: |
Sat, 07 Mar 2015 23:37:00 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Am 06.03.2015 um 01:19 schrieb Germán Arias:
> El jue, 05-03-2015 a las 23:41 +0100, Fred Kiefer escribió:
>> Am 25.02.2015 um 07:56 schrieb Germán Arias:
>>> OK, the problem is because NSPrinter can't load the PPD file of my
>>> printer. The application get trapped in the loop "while" of the method
>>> -loadPPDAtPath:symbolValues:inclusionSet: in NSPrinter class. Attached
>>> the ppd file of my printer.
>>>
>>> Germán
>>>
>>
>> I had a look at your PPD file and into the specification. It seems that
>> the translation in your PPD file doesn't follow the specification. In
>> your file we have these lines:
>>
>> *de.Translation MediaType/Medientyp: PickOne: ""
>> *de.MediaType plain/Normalpapier: "<</MediaType(plain)>>setpagedevice": ""
>>
>> In the first line "de.Translation" is the main key, "MediaType" the
>> option keyword and "Medientyp" the translation of the option keyword.
>> "PickOne" is the value and everything after that is just not allowed by
>> the specification.
>>
>> We could add a work around in the parser for this case, but first we
>> need to find out for sure, whether this is a valid PPD file and where it
>> comes from.
>>
>> Hope this helps
>> Fred
>
> The driver is here (official page):
>
> http://www.canon-printerdrivers.com/2014/11/canon-pixma-mg2400-softrware-and.html
>
> and I don't have problem to use the printer with LibreOffice.
>
> Germán
Thank you for that information, that should make it a valid PPD file.
Still I don't understand where that format is defined in the
specification. If you feel comfortable with changing the parse to ignore
trailing nonsense without having a specification for that, please feel
free to go ahead and change the code in NSPrinter.m.
It should be enough to add
[ppdData scanUpToCharactersFromSet: newlineSet
intoString: NULL];
before the end of the loop in loadPPDAtPath:symbolValues:inclusionSet:
Fred