Skip to content

Instantly share code, notes, and snippets.

@whatsmate
whatsmate / PdfTextExtractor.vb
Created March 5, 2026 10:06
Converting PDF file to text in VB.NET in VS2022
Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Text.Json
Namespace PdfTextExtractor
Public Class Program
' When you have your own client ID and secret, specify them here:
Private Const CLIENT_ID As String = "FREE_TRIAL_ACCOUNT"
Private Const CLIENT_SECRET As String = "PUBLIC_SECRET"
@whatsmate
whatsmate / PdfTextExtractor.cs
Created March 5, 2026 08:39
Converting PDF file to text in C# using VS2022
using System;
using System.Net;
using System.Text;
using System.Text.Json;
namespace PdfTextExtractor
{
class Program
{
// When you have your own client ID and secret, specify them here:
@whatsmate
whatsmate / translate-text-vb-vs2022.vb
Created March 4, 2026 07:46
Translating natural languages in VB.NET using VS2022
Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Text.Json
Public Class Translator
''' TODO: If you have your own Premium account credentials, put them down here:
Private Const CLIENT_ID As String = "FREE_TRIAL_ACCOUNT"
@whatsmate
whatsmate / translate-text.cs
Created March 4, 2026 04:48
Translating natural languages in C# using VS2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class Translator
{
// TODO: If you have your own Premium account credentials, put them down here:
private static string CLIENT_ID = "FREE_TRIAL_ACCOUNT";
@whatsmate
whatsmate / group-send-telegram-opus.cs
Created July 21, 2022 07:42
How to send a voice note file to a Telegram group in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramGroupOpusSender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / group-send-telegram-mp3.cs
Created July 21, 2022 07:36
How to send an audio file to a Telegram group in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramGroupMp3Sender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / group-send-telegram-pdf.cs
Created July 21, 2022 07:31
How to send a PDF file to a Telegram group in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramGroupPdfSender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / group-send-telegram-image.cs
Created July 21, 2022 07:24
How to send an image to a Telegram group in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramGroupImageSender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";
@whatsmate
whatsmate / group-send-telegram-text.cs
Created July 21, 2022 07:18
How to send messages to a Telegram group in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramGroupMessageSender
{
// TODO: Replace the following with your gateway instance ID, Premium Account client ID and secret:
private static string INSTANCE_ID = "YOUR_INSTANCE_ID_HERE";
@whatsmate
whatsmate / send-telegram-opus.cs
Created July 21, 2022 06:49
How to send a voice note file to a Telegram user in C# using Visual Studio 2022
using System;
using System.Net;
using System.Text.Json;
using System.IO;
using System.Text;
class TelegramOpusSender
{
// TODO: Replace the following with your gateway instance ID, client ID and secret!
private static string INSTANCE_ID = "YOUR_INSTANCE_ID";