none
Add custom features in Print ticket. RRS feed

  • Question

  • Hi all,

    I am developing the javascript constraint for v4 printer.I have two questions.

    1)While debugging the javascript constraint validatePrintTicket,ConvertDevmodeToPrintTicet and CompletePrintCapabilty was hitting but ConvertPrintTicketToDevmode was not hitting.In what case ConvertPrintTicketToDevmode function will hit?

    2)The print ticket has only those features and selected option which are mentioned in GPD file,but how to add other features which are not mentioned in GPD from printer extension.Because this print ticket is to be used as parameter in ConvertPrintTicketToDevmode for storing values in devmode property bag.How I will set the values for custom features?

    Any help will be appreciated.

    Regards

    Prakhar 

    Wednesday, February 7, 2018 1:31 PM

All replies

  • Hi,

    #1 Do you have a Desktop Printer Extension app? ConvertPrintTicketToDevMode will be called when the DPE is dismissed. 

    #2 Is your driver GPD or PDC based? If GPD based, you should still define your custom features in your GPD. 

    *Feature: TestFeature
    {
        *Name: "test feature"
        *DefaultOption: TestOption
        *PrintSchemaNamespace: "http://www.contoso.com/ns/printschema/custom"
        *Option: TestOption
        {
            *Name: "test option"
        }
    }

    Thanks 

    Thursday, February 8, 2018 4:51 PM
  • Hi,

    Thanks for the reply.

    But if suppose user give the print operation without launching the printer extension than in that case ConvertPrintTicketToDevmode will not be called.

    Also i have one more question regarding setting value in devmode property bag.

    I was trying to set some property value in devmode property bag from ConvertDevmodeToPrintTicket,its throwing exception when i am calling SetString("Property","Value") but is working fine in case of get value(GetString("Property")).Though its returning null value but its not throwing exception in this case.

    Regards

    Prakhar 


    Friday, February 9, 2018 5:11 AM