Seal with Signature Printing Issue

Discussion in 'Free Source Codes' started by Santosh, Sep 13, 2023.

    
  1. Santosh

    Santosh Member


    Dear Member,
    using this code for seal & signature in invoice but when pdf printer then image show correctly but if direct print then image part going up side at company name please help....

    using below code:-

    [#Part: Company F11 Other Features]
    Local:part:Cfg PartContent:Add:Lines:After:CMP Enable TrackVouchers :CMP EnableSignatureImage


    [Line: CMP EnableSignatureImage]
    Field: Medium Prompt, CMP EnableSignatureImage
    Local: Field: Medium Prompt: Info: "Enable Signature Print ? "

    Space Top: 1

    [Field: CMP EnableSignatureImage]
    Use: Logical Field
    Storage: EnableSignature
    Set as: If $$IsEmpty:$$Value then "No" else $$Value
    Sub Form: Cmp CompanySign Path: $$Value = "Yes"

    [Report : CMP CompanySign Path]

    Form : CMP CompanySign Path

    [Form : CMP CompanySign Path]

    Parts : Form SubTitle, CMP CompanySign Path
    Option : Small Size Form
    FullWidth : No
    FullHeight : No
    SpaceTop : 1
    SpaceBottom : 1
    SpaceLeft : 1
    SpaceRight : 1
    Background : @@SV_COSTCATEGORY
    Local : Field : Form SubTitle: Info : $$LocaleString:"Company Logo"
    Horizontal Alignment: Centre
    Vertical Alignment : Centre

    [Part : CMP CompanySign Path]

    Line : CMP CompanySign Path, CompanyLogo PathNotesOne

    [Line : CompanyLogo PathNotesOne]

    Field : CompanyLogo PathNotes
    Space Top : 1
    Space Bottom : 0.4

    Local : Field : CompanyLogo PathNotes: Set as : "- " + $$LocaleString:"Formats supported are BMP and JPEG."



    [Field: CompanyLogo PathNotes]

    Style : Normal Italic
    FullWidth : Yes
    Align : Left
    Skip : Yes
    Fixed : Yes

    [Line : CMP CompanySignPath]

    Fields : Medium Prompt, CMP CompanySign Path
    Local : Field : Medium Prompt : Info : $$Localestring:"Location of Signature:"

    [Field : CMP CompanySign Path]

    Use : Name Field
    Case : Normal
    Set as : $SignaturePath:Company:##SVCurrentCompany
    Storage : SignaturePath
    Setalways : Yes
    Width : @@LongWidth
    Max : 100
    Control : CMPLogoPathExist : ($$IsEmpty:$$Value OR Not $$IsFileExists:$$Value OR ($$FileSize:$$Value > 1048577))
    Modifies : SASignPath : Yes

    [System : Formula]

    CMPLogoPathExist : (If $$IsEmpty:$$Value then $$LocaleString:"Logo path cannot be empty." +
    Else If Not $$IsFileExists:$$Value then $$LocaleString:"Logo path specified is invalid or file not found." +
    Else IF $$FileSize:$$Value > 1048577 Then "File size exceeds 1 MB." +
    Else $$LocaleString:"Format Not Supported")

    [#Report: ChangeCurrentCompany]
    Local : Form : Modify Variables : On :Form Accept : Yes : SET : SASignPath:$SignaturePath:Company:##SvCurrentCompany

    [#Report: Voucher]
    SET : SASignPath:$SignaturePath:Company:##SvCurrentCompany

    [System:Variable]
    SASignPath : $SignaturePath:Company:##SvCurrentCompany

    [Variable: SASignPath]
    Type : String
    Persistent : Yes


    [System:UDF]
    EnableSignature : Logical : 1000
    SignaturePath : String : 1001



    [#Part: EXPINV Signature]

    Delete:Line: EXPSMP Signature
    Delete:Bottom Lines: EXPSMP Authourity

    Top Part : Test Image Part1
    Top Part : Test Image Part12
    Right Part : Test Image Part
    Bottom Parts : Test Image Part2

    Vertical: Yes
    Height: 35 mms
    Width: 60 mms
    Option : Small Size Part
    Horizontal Align: Right
    Option : TraderInv AuthSignInfo : (@@IsDealerExciseSalesInvoice OR @@IsExciseMfgrRule11Invoice) AND NOT ##SATraderCommercial AND (NOT $$IsEmpty:##SAAuthorisedSignName OR NOT $$IsEmpty:##SAAuthorisedSignDesgn)


    [Part:Test Image Part]
    Line : Test Image Line
    Graph Type : ##SASignPath
    Height : 20 mms
    Width : 50 mms
    Horizontal Align: Right
    Invisible : Not $EnableSignature:Company:##SVCurrentCompany
    ;Height : If ((NOT $$InPrintMode) AND ($$InExportAction OR $$InMailAction)) Then 15% Else 8% Page

    [Part:Test Image Part1]
    Line : EXPSMP Signature
    Height: 4 mms
    Width:50 mms

    [Part:Test Image Part12]
    Line : blankline1
    Height: 2 mms




    [Part:Test Image Part2]
    Line : EXPSMP Authourity
    Height: 4 mms
    Width:50 mms

    [Line:blankline1]
    Right Field: Blank Field
    Space Top : If $$InPrintMode Then 1 Else 1

    [Field:Blank Field]
    Set as:""
    Align : Right


    [Line:Test Image Line]
    Field: Test Image Field
    Space Top : If $$InPrintMode Then 1 Else 1

    [Field:Test Image Field]
    Set as:""
    Alignment: Right
    Pdf Printer.jpg Pdf Printer.jpg Pdf Printer.jpg Pdf Printer.jpg Direct Print.jpg Pdf Printer.jpg Pdf Printer.jpg Direct Print.jpg
     


  2. rajiv jaiswal

    rajiv jaiswal Member


     
    Santosh likes this.


  3. Johar

    Johar Member


    you have mentioned in this increase the value to fit best

    Space Top : If $$InPrintMode Then 4 Else 1
     
    Santosh likes this.


  4. Santosh

    Santosh Member


    thank you for your reply sir
    but after this correction same issue
    please guide me
     


  5. Santosh

    Santosh Member


    Amit sir please help
     


  6. Jenny

    Jenny Active Member


    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SIGNATURE LOGO;;;;;;;;;;;;;;;;;;;;;;;;
    
    [#Part  : CMP TallyShopFeatures Left]
        Add : Line :At End : Set Scan Sign
    
    
    
    [Line    :    Set Scan Sign]
         Fields      : Medium Prompt, CMP ScanedSign
            Local       : Field : Medium Prompt : Info    : $$LocaleString:"Enable Scaned Signature?"             
            Space Top   : 0.4
            Local: Field: Default: Color: Blue
          
    [Field : CMP ScanedSign]
    
        Use      : Logical Field
        Storage  : IsSignEnable
        Sub Form : CMP ScanedSign Path : $IsSignEnable
      
    [System    :    UDF]
        IsSignEnable    :    Logical    :    20003
        ScanedSignPath    :    String    :    20007
      
    [Report  : CMP ScanedSign Path]
    
        Form    : CMP ScanedSign Path
    
    [Form : CMP ScanedSign Path]
    
                Parts           : Form SubTitle, CMP ScanedSign Path
    
                Part   : eienvftitle, eienvfExplosion    ;; Sign Height width left right space configuration
      
                 Option          : Small Size Form
                FullWidth       : No
                FullHeight        : No
                SpaceTop        : 1
                SpaceBottom     : 1
                SpaceLeft       : 1
                SpaceRight      : 1
                Background      : @@SV_COSTCATEGORY
                Local           : Field : Form SubTitle: Info           : $$LocaleString:"Signature"
                Horizontal Alignment: Centre
                Vertical Alignment      : Centre
    
    [Part : CMP ScanedSign Path]
    
        Line : CMP ScanedSign Path, CompanyScanedSign NotesOne, CompanyScanedSign NotesTwo, CompanyScanedSign NotesThree
    
    [Line : CompanyScanedSignNotesOne]
    
        Field            : CompanyScanedSign Notes
        Space Top    : 1
        Space Bottom : 0.4
    
        Local : Field : CompanyScanedSignNotes: Set as      : "- " + $$LocaleString:"Formats supported JPEG."
    
    [Line : CompanyScanedSignNotesTwo]
    
        Field            : CompanyScanedSignNotes
        Space Bottom : 0.4
    
        Local : Field : CompanyScanedSignNotes: Set as      : "- " + $$LocaleString:"Recommended size is 96 pixels in width by 80 pixels in height."
    
    [Line : CompanyScanedSignNotesThree]
    
        Field            : CompanyScanedSignNotes
        Space Bottom : 1
    
        Local : Field : CompanyScanedSignNotes: Set as      : "- " + $$LocaleString:"Company logo is printed on specific reports and vouchers only."
    
    
    [Field: CompanyScanedSignNotes]
    
        Style       : Normal Italic
        FullWidth   : Yes  
        Align       : Left
        Skip        : Yes
        Fixed       : Yes
    
    [Line : CMP ScanedSignPath]
    
        Fields : Medium Prompt, CMP CompanyScanedSign Path
        Local : Field : Medium Prompt : Info : $$Localestring:"Location of Signature:"
    
    [Field : CMP CompanyScanedSign Path]
    
        Use     : Name Field      
        Case    : Normal
        Set as  : $ScanedSignPath:Company:##SVCurrentCompany
        Storage : ScanedSignPath
        Setalways : Yes
        Width   : @@LongWidth
        Max     : 100
        Control : CMPScanedSignPathExist : ($$IsEmpty:$$Value OR Not $$IsFileExists:$$Value OR ($$FileSize:$$Value > 1048577))
    
    [System : Formula]
    
        CMPScanedSignPathExist : (If $$IsEmpty:$$Value then $$LocaleString:"ScanedSign cannot be empty." +
                           Else If Not $$IsFileExists:$$Value then $$LocaleString:"ScanedSign Path specified is invalid or file not found." +
                           Else IF $$FileSize:$$Value > 1048577 Then "File size exceeds 1 MB." +
                           Else $$LocaleString:"Format Not Supported")
        IsSignEnable    :    $IsSignEnable:Company:##SVCurrentCompany ;; AND ##SACompSign AND ($$IsFileExists:##SASignPath)
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    [Part:For TaxInv]  ;;;;;;use your part
    Add:Part: VDS Signature
    Option    :    VDS Signature    :    @@IsSignEnable AND ($IsSales OR $IsDebitNote OR $IsCreditNote OR $IsDelNote OR $IsReceipt OR $IsPurcOrder OR $IsSalesOrder OR $IsOutSourceOrder OR $IsJobWorkOrder OR $IsMaterialIn OR $IsMaterialOut)
    Border:TrThinLeft  
    ;Option:Empty: not @@IsSignEnable
    Invisible    : If $$InPrintMode OR $$InMailAction OR ($$InExportMode And $$IsSysNameEqual:HTML:##SVExportFormat) then No Else Yes
    
    [Part    :    VDS Signature]
        Add : Top Part    : CMP Name, Empty
        Add : Part        : ScanedSign
        Add : Bottom Part: Empty, CMP Authorised
        Vertical    :    Yes
    
                      
    [Part    :    CMP Name]
        Add    :    Top Line    :    EXPSMP Signature
      
    [#Line: EXPSMP Signature]
    Right Fields    : Simple Field
    Local            : Field : Simple Field :Print FG:LapisBlue
    [#Line: EXPSMP Authourity]
    Local           : Field : Simple Field :Print FG:LapisBlue  
    
      
    [Part    :    CMP Authorised]
        Add    :    Bottom Line    :    EXPSMP Authourity
    
                    [Part: ScanedSign]
                        Right Part: ScanedSignLeft
                      
    [Part    :    ScanedSignLeft]
        Horizontal Align: Right
                        Lines        : ScanedSign
                        Graph Type    : $ScanedSignPath:Company:##SVCurrentCompany
    
                        ;Invisible    : If $$InPrintMode OR $$InMailAction OR ($$InExportMode And $$IsSysNameEqual:HTML:##SVExportFormat) then No Else Yes
                        Invisible : Not $IsSignEnable:Company:##SVCurrentCompany
                      
        Space Top    : ($spctop:company:##svcurrentcompany) % Page
        Space Bottom: ($spcbottom:company:##svcurrentcompany) % Page
        Space Left    : ($spcleft:company:##svcurrentcompany) % Page
        Space Right    : ($spcrght:company:##svcurrentcompany) % Page
        Width        : ($spcw:company:##svcurrentcompany) % Page
        Height        : ($spch:company:##svcurrentcompany) % Page
    
    
    [Line: ScanedSign]
                      
        Right Field    : ScanedSign
                          
    [Field: ScanedSign]
        Set as        : ""
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    [Part: eienvftitle]
        Line : eienvfcolumn
    [Line: eienvfColumn]
        Field  : NameTitleField
        Local  : Field : Name Title Field : Info       : $$LocaleString:"SIGN CONFIGURATION"
        Local  : Field : Name Title Field : Align      : Center
        Local  : Field : Name Title Field : Full Width : Yes
        Border : Column Titles
      
    [Part:eienvfExplosion]
        Lines:spctop,spcbottom,spcleft,spcrght,spcw,spch;,envstyle
      
    [Line:spctop]
        Space Top:0.25
        Field:short prompt,spctop
        Local:Field:short prompt:Set as : "Space Top"
        Local:Field:short prompt:Width  : 18
        local:field:short prompt:Skip   : Yes
        Local:Field:short prompt:Style  : small
    [Field:spctop]
        Use     : number field
        Storage : spctop
        Format  : "no zero,decimal:2"
        Width   : 15
          
    [Line:spcbottom]
        Space Top:0.25
        Field:short prompt,spcbottom
        Local:Field:short prompt:Set as : "Space Bottom"
        Local:Field:short prompt:Width  : 18
        Local:Field:short prompt:Skip   : Yes
        Local:Field:short prompt:Style  : small
    [Field:spcbottom]
        Use     : number field
        Storage : spcbottom
        Format  : "no zero,decimal:2"
        Width   : 15
          
    [Line:spcleft]
        Space Top:0.25
        Field:short prompt,spcleft
        Local:Field:short prompt:Set as : "Space Left"
        Local:Field:short prompt:Width  : 18
        Local:Field:short prompt:Skip   : Yes
        Local:Field:short prompt:Style  : small
    [Field:spcleft]
        Use     : number field
        Storage : spcleft
        Format  : "no zero,decimal:2"
        Width   : 15
          
    [Line:spcrght]
        Space Top:0.25
        Field:short prompt,spcrght
        Local:Field:short prompt:Set as : "Space Right"
        Local:Field:short prompt:Width  : 18
        Local:Field:short prompt:Skip   : Yes
        Local:Field:short prompt:Style  : small
    [Field:spcrght]
        Use     : number field
        Storage : spcrght
        Format  : "no zero,decimal:2"
        Width   : 15
    
    [Line:spcw]
        Space Top:0.25
        Field:short prompt,spcw
        Local:Field:short prompt:Set as : "width"
        Local:Field:short prompt:Width  : 18
        Local:Field:short prompt:Skip   : Yes
        Local:Field:short prompt:Style  : small
    [Field:spcw]
        Use     : number field
        Storage : spcw
        Format  : "no zero,decimal:2"
        Width   : 15
      
    [Line:spch]
        Space Top:0.25
        Field:short prompt,spch
        Local:Field:short prompt:Set as : "height"
        Local:Field:short prompt:Width  : 18
        Local:Field:short prompt:Skip   : Yes
        Local:Field:short prompt:Style  : small
    [Field:spch]
        Use     : number field
        Storage : spch
        Format  : "no zero,decimal:2"
        Width   : 15
    
    [System:UDF]
        spctop      : Number  : 1001
        spcbottom   : Number  : 1002
        spcleft     : Number  : 1003
        spcrght     : Number  : 1004
        eienvconfig : Logical : 1005
        spcw        : Number  : 1006
        spch        : Number  : 1007
    
     
    Hari Malhotra and Santosh like this.


  7. Santosh

    Santosh Member


    Thank you very much jenny your help
    but still issue not solve
    if i use your ready code then image not display in print preview
    please help
     


  8. Jenny

    Jenny Active Member


    where to put image path? and in image path there a configuration screen for width and height...so mention it

    upload_2023-9-14_14-22-11.png
     
    Santosh likes this.


  9. Santosh

    Santosh Member


    upload_2023-9-14_14-29-48.png upload_2023-9-14_14-30-37.png
     


  10. Access

    Access Member


    Use bmp or png format
     
    Santosh likes this.


  11. Hems

    Hems Member


    Another suggestion
    [#part: expinv signature]
    First delete the line
    Expsmp signature
    Expsmp authority

    then a new part in it
    new line
    graph type

    Take this entire image in it
    And
    IMG_20230915_102839.jpg height width set up
     
    Santosh likes this.


  12. ASHOK

    ASHOK Member



    Signature not showing please update
     
    Santosh likes this.


  13. Atul Khakher

    Atul Khakher Member


    Please reduce Height/width of image and put size in same unit... as in program or mention in mms then it will work properly
     
    Santosh likes this.


  14. Santosh

    Santosh Member


    Thank you sir, but i check all possibilities. issue not resolve
     


  15. Systecg

    Systecg Member


    Try BMP File

    There is no issue in BMP
     
    Santosh likes this.


  16. Himanshu-2002

    Himanshu-2002 Active Member


    Maybe Just Export that to pdf and print.... there can be issue from Printer End also
     
    Santosh likes this.


  17. ASHOK

    ASHOK Member


    Sir ji please send me your signature and stamp jpg file my email address is akumar300965@gmail.com please send
     
    Santosh likes this.


  18. Santosh

    Santosh Member


    Please help me
     


  19. parthiban.M

    parthiban.M Member


    [#Part: CMP TallyShopFeatures Left]
    Add: Line: CMP EnableSignatureImage
    [Line: CMP EnableSignatureImage]
    Field: Medium Prompt, CMP EnableSignatureImage
    Local: Field: Medium Prompt: Info: "Enable Signature Print ? "
    Space Top: 1
    [Field: CMP EnableSignatureImage]
    Use: Logical Field
    Storage: EnableSignature
    Set as: If $$IsEmpty:$$Value then "No" else $$Value
    Sub Form: Cmp CompanySign Path: $$Value = "Yes"
    [Report : CMP CompanySign Path]
    Form : CMP CompanySign Path
    [Form : CMP CompanySign Path]
    Parts : Form SubTitle, CMP CompanySign Path
    Option : Small Size Form
    FullWidth : No
    FullHeight : No
    SpaceTop : 1
    SpaceBottom : 1
    SpaceLeft : 1
    SpaceRight : 1
    Background : @@SV_COSTCATEGORY
    Local : Field : Form SubTitle: Info : $$LocaleString:"Company Logo"
    Horizontal Alignment: Centre
    Vertical Alignment : Centre
    [Part : CMP CompanySign Path]
    Line : CMP CompanySign Path, CompanyLogo PathNotesOne
    [Line : CompanyLogo PathNotesOne]
    Field : CompanyLogo PathNotes
    Space Top : 1
    Space Bottom : 0.4
    Local : Field : CompanyLogo PathNotes: Set as : "- " + $$LocaleString:"Formats supported are BMP and JPEG."
    [Field: CompanyLogo PathNotes]
    Style : Normal Italic
    FullWidth : Yes
    Align : Left
    Skip : Yes
    Fixed : Yes
    [Line : CMP CompanySignPath]
    Fields : Medium Prompt, CMP CompanySign Path
    Local : Field : Medium Prompt : Info : $$Localestring:"Location of Signature:"
    [Field : CMP CompanySign Path]
    Use : Name Field
    Case : Normal
    Set as : $SignaturePath:Company:##SVCurrentCompany
    Storage : SignaturePath
    Setalways : Yes
    Width : @@LongWidth
    Max : 100
    Control : CMPLogoPathExist : ($$IsEmpty:$$Value OR Not $$IsFileExists:$$Value OR ($$FileSize:$$Value > 1048577))
    Modifies : SASignPath : Yes
    [System : Formula]
    CMPLogoPathExist : (If $$IsEmpty:$$Value then $$LocaleString:"Logo path cannot be empty." +
    Else If Not $$IsFileExists:$$Value then $$LocaleString:"Logo path specified is invalid or file not found." +
    Else IF $$FileSize:$$Value > 1048577 Then "File size exceeds 1 MB." +
    Else $$LocaleString:"Format Not Supported")
    [#Report: ChangeCurrentCompany]
    Local : Form : Modify Variables : On :Form Accept : Yes : SET : SASignPath:$SignaturePath:Company:##SvCurrentCompany
    [#Report: Voucher]
    SET : SASignPath:$SignaturePath:Company:##SvCurrentCompany
    [System:Variable]
    SASignPath : $SignaturePath:Company:##SvCurrentCompany
    [Variable: SASignPath]
    Type : String
    Persistent : Yes
    [System:UDF]
    EnableSignature : Logical : 1000
    SignaturePath : String : 1001
    [#Part: EXPINV Signature]
    Delete:Line: EXPSMP Signature
    Delete:Bottom Lines: EXPSMP Authourity
    Top Part : Test Image Part1
    Top Part : Test Image Part12
    Right Part : Test Image Part
    Bottom Part : Test Image Part2
    Vertical: Yes
    Height: 25 MMS
    Width: 100 MMS
    Delete: Border
    Option : Small Size Part
    Horizontal Align: Right
    Option : TraderInv AuthSignInfo : (@@IsDealerExciseSalesInvoice OR @@IsExciseMfgrRule11Invoice) AND NOT ##SATraderCommercial AND (NOT $$IsEmpty:##SAAuthorisedSignName OR NOT $$IsEmpty:##SAAuthorisedSignDesgn)
    [#Part: EXPSMP Signature]
    Delete:Line : EXPSMP Signature
    Delete:Bottom Lines: EXPSMP Authourity
    Top Part : Test Image Part1
    Top Part : Test Image Part12
    Right Part : Test Image Part
    Bottom Part : Test Image Part2
    Vertical: Yes
    Height: 25 MMS
    Width: 50 MMS
    Delete: Border
    Option : Small Size Part
    Horizontal Align: Right
    Option : TraderInv AuthSignInfo : (@@IsDealerExciseSalesInvoice OR @@IsExciseMfgrRule11Invoice) AND NOT ##SATraderCommercial AND (NOT $$IsEmpty:##SAAuthorisedSignName OR NOT $$IsEmpty:##SAAuthorisedSignDesgn)
    [Part:Test Image Part1]
    Line : EXPSMP Signature
    Height: 4 mms
    [Part:Test Image Part12]
    Line : blankline1
    Height: 4 mms
    [Part:Test Image Part]
    Line : Test Image Line
    Graph Type : ##SASignPath ;$SignaturePath:Company:##SVCurrentCompany
    Height : 13 mms
    Width : 100 mms
    Horizontal Align: Right
    Invisible : Not $EnableSignature:Company:##SVCurrentCompany ; If $$InPrintMode OR $$InMailAction OR ($$InExportMode And $$IsSysNameEqual:HTML:##SVExportFormat) then No Else Yes
    [Part:Test Image Part2]
    Line : EXPSMP Authourity
    Height: 4 mms
    [Line:blankline1]
    Right Field: Blank Field
    Space Top : If $$InPrintMode Then 1 Else 1
    [Field:Blank Field]
    Set as:""
    Align : Right
    [Line:Test Image Line]
    Right Field: Test Image Field
    Space Top : If $$InPrintMode Then 1 Else 1
    [Field:Test Image Field]
    Set as:""
    Align: Right

    Check with this code.......
     
    Santosh likes this.


  20. Dilip Jodhavat

    Dilip Jodhavat New Member


    In Preview Signature show son proper place but when print it goes up.
     
    Santosh likes this.


  21. parthiban.M

    parthiban.M Member


    in the sign part give space top according to ur placement
     
    Santosh likes this.


  22. Santosh

    Santosh Member


    Tried and tried but can't get the result
     


Share This Page