**Highlights** 1)Exports Ledger Statements and Sales Invoices to PDF with Password Protected 2)There are two Kinds of Password - User password and Owner Password 3)With user password, they can view the pdf but cannot alter 4)Screen readers are allowed to read the content **Requirements** 1)PdfLocker.dll - for password protection 2)PdfLocker.txt(TDL) - for handling export and Invoking dll from tally 3).Net Framework v4 or higher You can download from here: https://dotnet.microsoft.com/download/dotnet-framework/net40 **Get Started** 1)Download all the files (PdfLocker.dll,PdfLocker.txt,itextsharp.dll) from the below Link 2)Register the dll - PdfLocker.dll (with below steps) 3)Load the TCP in tally - PdfLocker.txt 4)Export Ledger Statement or Sales Invoices by clicking on Encrypt PDF Button (Right Side) 5)It will ask for user password and owner password 6)After that Report will be exported and Encrypted with given passwords 7)PDF's will be Stored in Encrypted PDF's folder in Tally working directory(Tally Folder) **Registering the DLL** 1) Open CMD in administrator Mode (Elevated mode) For 64 Bit 2) Type cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319 ;; change directory For 32 Bit 3) Type cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 ;; change directory 4) Type regasm PdfLocker.dll /codebase ;;Give Full path of the PdfLocker.dll file 5) you will get a success message after it registered **You can extend the tdl as per your requirements** Link to Download Files - Project Repo : https://github.com/tejavarma-aln/Password-Protected-PDF-TDL Watch this video to get started Cheers, Varma.
I have written this tdl to call a dll mehod from .net,But it is giving error"Failed to find class COM INTERFACE"Please check if the COM SERVER IS REGISTERED OR NOT [COM Interfacepushdata] ProjectprojectName.DAL Class:AdapterClass Interface:TDLCollection Parameters: p1 : Number : In Return:Number [#Form:Voucher] On:Form Accept:Yes:Callpushdata [Functionpushdata] Variable : p1 : Number : 2 01:Exec COM Interface pushdata:##p1 02:Log:$$LastResult
1)You have to register the DLL before calling it from tally(TDL) https://www.geeksengine.com/article/register-dll.html 2)Make sure it is COM VISIBLE in assembly information under project properties, so it will expose the assembly information to other processes who want to use this DLL.
Thanks for the suggestion, I didn't follow the second point previously now I go through the second point. and then build the project added the dll file on specific path. Then registered a dll one more time. But Still the issue is there.Can you please help me to find out the what goes wrong? This is a method from .net public int TDLCollection(int CusMID) { return 10; }
Check wether DLL is registered : goto->powershell->paste the following command and press enter Code: Get-ChildItem HKLM:\Software\Classes -ErrorAction SilentlyContinue | Where-Object { $_.PSChildName -match '^\w+\.\w+$' -and (Test-Path -Path "$($_.PSPath)\CLSID") } | Select-Object -ExpandProperty PSChildName It will list all the registered Com interfaces(DLL's) In that list search whether your DLL is listed. the name will be like this - 'ProjectName.ClassName' One more thing is: 32bit applications cannot use 64bit DLL. As per your screenshot, you are registering for 64bit. So tally must be a 64bit application else register the DLL for 32bit. If you open the tally folder (where application exist) there will be an application named 'regodbc64' or 'regodbc32' if regodbc64 exist then the tally is 32bit if regodbc32 exist then the tally is 64bit
Thanks a lot, for this knowledge.In the power shell dll is not present with ProjectName.ClassName. May be it is not registered.
Yes may project is not compiled properly or There is a chance that it is registered successfully because you got 'Types registered successfully' while registering using the Command prompt So it needs to troubleshoot step by step.
Hello,I run the below command in the shell, It gives a ID associated with the dll. Is it means registered? reg query HKLM\SOFTWARE\Classes /s /f ProjectName.dll output: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{FFB75A02-E8EC-3918-8E9C-B22FA907DACA}\InprocServer32\1.0.0.0 CodeBase REG_SZ file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/ProjectName.DLL
Hello, I made change in the tdl. Instead of a project name I put a Name space name in a project, and now the dll registration associated error was gone.But It is saying that "Failed to create an object of class COM Interface".Can you please guild me to find out the reason for this error?
Hello Sir, In an .net project Com interface method internally calling an API method which gives an error in tally calculator."Call to COM interface was made but an error occurred. This can because of wrong number of parameters or wrong type of parameters". After commenting API call method line, working fine.(API method is in another project reference is given) Please help me to solve this issue. Thanks