Create a toolbar in c# that analyzes webpage text - c#

I wanted to know if this was at all possible before I started researching. We have phones that come equipped with a javascript dialing api. Basically we open a webpage that is
phone.htm?ip=xxx&dialNumber=xxx
Is it possible to create an internet explorer toolbar to scan all the text on a webpage and either: show the phone numbers on the webpage in the toolbar, so they can click and delete them OR replace all the phone numbers on the webpage with links? Which would be more practical?

Seems like, what you are trying to do is similar to the Skype's Click-To-Call
http://www.skype.com/en/download-skype/click-to-call/
I advice you to follow the same thing that they did where the numbers in webpages turns into links

Related

How To Automate Text from a C# Textbox to a Div Textbox in a website

So I am simply making my life easier as a Youtuber content Creator by being able to post my own work onto Reddit Website. There is a time limit on how often I can Post here:https://www.reddit.com/submit. I am trying to automate the text box with text from a Textbox in C# every So often using a amount of times. I have tried several different Idea's since I'm using the Chromium WebBrowser under CefSharp. Here is a link to my full project so you can see for yourself: https://drive.google.com/drive/folders/1jR5xRGYGZuLG_rE5fCH4RbWEd2WeioFa?usp=sharing
I need help in the ability to Enter any text I have in my Textbox in Form 1, and when I Press Start, it opens the submit location (Plan on doing a auto sign in later) and then paste or "Automate" the typing of what I have in my Text Box onto the Text Box on the Website. How Can I do this? I need help!
Photo 1 of what my code in C# Works.
Photo 2 of what my code in C# Works.

Printing a formatted document with sql data without using windows forms

Currently we're making a c# application (using WPF) and everything goes well. The only problem we have right now is that we want our application to be able to print documents directly from our application to the printer.
What we need to print is a list of customers, but not listed on a sheet, instead it should print 1 full page of information from every customer that yet haven't been printed. The document should also contain some formatting such as a "Result" section where you manually fill in information using a pen later on.
I've found several solutions but they all require us to either use iTextSharp and have Acrobat Reader installed. This way works but just complicated things for later on as some of our teachers doesn't even know what google chrome is, and less so even grasp the concept of having to install acrobat reader to be able to run this program.
Our other option is to create a simple report directly in c#, but all the tutorials use windows forms and a datagrid which doesn't feel very effective for what we're trying to achieve. Also we can't find reports in the "add new" menu for the solution explorer and we're not using windows forms.
Basically we want to press a button which automatically prints all the new customers that yet haven't been printed out. We're all good with the other backend stuff like marking the customer to not be printed again and so on, it's just the actual document formatting that've had us stuck for days now. I've searched for "c# create invoice" and so on, but every tutorial uses windows forms or Crystal Reports while we can't.
Any suggestions?

Display PDF preview in WPF and search for a phrase

I need to display PDF preview in WPF control, programmatically search for text in it, highlight found text and be able to copy text. Sounds simple, but I am struggling with different approaches for a week already.
Here what I have considered:
Find PDF controls for WPF
Most of them just render PDF as images or cost too much. Royalty or subscription fee is not an option.
The only suitable control that I found is:
http://www.syncfusion.com/products/wpf/pdf-viewer
I was even able to do searches programmatically with reflection hacks, but it renders text too blurry (Syncfusion promise to fix this soon) and load pages with a noticeable lag during scrolling.
Using AcroPDFlib as an ActiveX component
I was not able to make it work with the latest Adobe reader on Windows 10 64-bit. But I don't see methods for search anyway, so I dropped this. Also, it seems that it is not free for commercial use:
AcroPDFlib, AxAcroPDFLib commercial use
Load PDF in WebBrowser control
It works and even allow searches, but it can search only for single words which make this search useless. If I search for "big apple" it highlights all big and apple and also open this search panel that cover the document.
Send CTRL+F and text to the browser control to trigger search
I have tried to use this library
http://inputsimulator.codeplex.com/
But PDF in browser control seems to ignore keystrokes from there or maybe I am doing something wrong. Still considering this option.
Use pdf.js in browser control
IE7-based control from WPF won't support that, so I need another browser control. And it seems that I also need to start nodejs to make it work. Seems like a too much overhead for this task. And also it is not clear does PDF.js supports search for a phrase or not.
But I am still not discarding this option. Does anyone were able to make it work inside WPF?
Any suggestions?

Winforms control for displaying html text

I am coding a Windows Forms Application in C#, and one of the requirements is to display some html code in a control, with the correct colors that correspond to the relevant tags.
E.g. When right clicking on a webpage in Google Chrome, then selecting View Page Source, a form is shown with all the html, correctly formatted, with tag colors and each line of code's line number.
Is there a free, reliable control that can do this? Is there an inbuilt Microsoft control that does this?
As I am new to this area of coding, can someone please provide me with some useful names, and some resource links if possible? I am not sure of the correct name for a control that does this, and as such, my Google searches have not come up with what I am looking for.
Also, the control needs to be trustworthy.
Thanks
You can try ScintillaNET control. It's open source and has HTML syntax highlighting as well as many other features.

PrintDialog 2013 Not Available

I am creating a web application and I want to print contents of my webpage. I have seen quite a lot of videos and support forums but I cant find what I'm looking for.
Basically PrintDialog is not available in my Visual Studio 2013 toolbox, is there any way of getting it?
Or if possible not use PrintDialog because I cant find it. I have been using C#.
I just want to know the simplest way to print.
P.S I am new at coding, any help and suggestions would be greatly appreciated.
Thank you all
New Info ----
Sorry I should have been more clearer, basically I have different reports on my web page and i want users to be able to print the individual reports. They are mini reports in one page in different sections, I want to be able to print seperate sections
Because the PrintDialog is for forms applications.
Each browser has its own printing implementation that you cannot influence.
To print the content of a webpage, you use the BROWSER's printdialog. In VERY OLD DAYS people added a "Click here to print" on websites, but actually you can just call:
window.print();
from Javascript OR press [CTRL+P] (or whatever key the browser you are using wants) or use the menues in the browser where there will be a print function available too.
The problem is that you dont instantiate the print from a HTML-server aka a webserver, and if you want to simulate that behaviour anyways, you will need a script, like Javascript in the page that will call the window.print() function.
This will still bring out the Printdialog and the user will still need actively to choose to actually print the thing, so you cant force it out on paper from server/site.
Think of the browser as a viewer/reader. Nothing else, and the server as the document storage.

Categories