Click here to Skip to main content
15,867,330 members
Everything / Document

Document

document

Great Reads

by Mario Z
Pure .NET solution for performing find and replace text on Word documents (DOCX file format)
by Howard 9448490
Creating a reusable editor for C# Applications using the RichTextBox Control
by Jesús Utrera
Using text retrieval TF-IDF technique to rank tokens in a text document
by InvisibleMedia
ScrollBars implementation with Windows Forms because the AutoScroll didn't fit my needs

Latest Articles

by Leonid Chashnikov
Discover an efficient way to implement document search using inverted index
by InvisibleMedia
ScrollBars implementation with Windows Forms because the AutoScroll didn't fit my needs
by ToughDev
How to restore text from PDF files Encoded using custom CID fonts
by V. Subhash
Learn to create documents in popular formats using only free and open-source software

All Articles

Sort by Score

Document 

14 Jun 2016 by Mario Z
Pure .NET solution for performing find and replace text on Word documents (DOCX file format)
14 Feb 2022 by Howard 9448490
Creating a reusable editor for C# Applications using the RichTextBox Control
16 Dec 2015 by Jesús Utrera
Using text retrieval TF-IDF technique to rank tokens in a text document
25 Aug 2023 by InvisibleMedia
ScrollBars implementation with Windows Forms because the AutoScroll didn't fit my needs
11 Mar 2014 by Bob@work
It depends on the version of Word(r) you're wanting to target. For the old .DOC files, Microsoft has a robust interop assembly, but it needs to reside on the computer/server running the tasks. This may present security concerns for public-facing machines.For the new .DOCX files, I was able...
11 Dec 2017 by Dave Kreskowiak
Nobody else pointed out that you're code will leak resource and eventually crash Windows. Those Font and Brush objects you're newing up need to have Dispose called on them to free up GDI resources. You cannot just new them up "fire and forget" style. A much cleaner version of the code would...
25 Sep 2023 by Leonid Chashnikov
Discover an efficient way to implement document search using inverted index
5 Dec 2013 by Sergey Alexandrovich Kryukov
Please see this CodeProject article: MoonPdfPanel - A WPF-based PDF Viewer Control[^].—SA
8 Dec 2014 by alliswell7
you can use iTextsharp pdf creator. just download the library ie itextsharp dll and add it to your references from sourceforge and use this codenote u have to edit where not applicable like connection strings, tablenames, variables, namespace, classnames. also note this code was implemented...
8 Dec 2014 by George Jonsson
If you have the possibility to first generate an XML document, you could then use XSLT to transform the data into various other formats, such as HTML, PDF, Word, plain text and into another XML format.It is a bit of a threshold to learn XSLT so it depends on your time frame, but it might be...
27 Nov 2017 by Jochen Arndt
If your document uses a format that is registered for printing, you might use the PowerShell (e.g. by writing a script executed from your console application): start-process -File-Path "path-to-document" -Verb Print Otherwise you have to prepare your data to be in a format understood by the...
25 Jul 2023 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
11 Oct 2013 by ASP.NET Community
The PlaceHolder control can be used as a container control within a document to dynamically load other controls. The PlaceHolder control has no
xml
11 Oct 2013 by ASP.NET Community
Use the Xml control to display the contents of an XML document or the results of an XSL Transform.The XML document to display is specified by
15 Oct 2013 by Member 10339112
hey,in all other Document Mode my WYSIWYG editor destroys my semantic syntax, in document mode IE8 it works. Is there a way to force IE to use always this document mode?I just found http://www.mediawiki.org/wiki/Manual%3a%24wgDocType but this doenst help me.Default is...
5 Dec 2013 by Rakesh Meel
visit here ..http://hugeonion.com/2009/04/06/displaying-a-pdf-file-within-a-wpf-application/[^]
19 Dec 2013 by ebukaegonu2
Im confused and need a step by step guide on how to show Microsoft Word, Microsoft Excel and PDF documents on an ASP.NET page. Please any help will be appreciatedthank all.
19 Dec 2013 by Member 10434230
Check if this helps you : Reading Ms Word Document and Display in the page
23 Dec 2013 by Pradeep Kumar Patel
HiFirst of All I never found a good answer in your tutorial but I'm trying again to search or write in your blog.My Question is that I want to scan a document and upload a scanned document in specific folder in asp.net using by c#.Please guys help me out if any body have a good...
24 Dec 2013 by thatraja
Always post the questions(related to particular article) at bottom of that article. Atleast mention the article url in your question.Probably you need a 3rd party solution for this(Even in Codeproject you could find those)Closer thing I found is the below article(only for IE because it...
2 Mar 2014 by spsullivan
Never mind, the solution was too easy to see, only about 15 lines of code.
11 Mar 2014 by Maciej Los
Have a look here:How to use Word Mail Merge and Macros to Import Data[^]Word 2013 and text files as mail merge data sources[^]Mail merge in Word document[^]
14 Mar 2014 by hamedelahi
I have problem to develop an specific control in WPF. I want to develop a control for a content management system for flipping the contents. It should be paging and searchable. I am using Flow Document Page Viewer with some modification in "Template" that make it like flip book. But I do not...
27 Mar 2014 by Rage
https://www.youtube.com/watch?v=8w7SMDi699g[^]
7 Apr 2014 by Member 4452791
My project requires to convert user uploaded edtiable documents to non-editable format in .net. We are supporting many file formats including DOC/DOCX (only editable type). Already my client is being used Ecrion -XF Rendering Server 2008 engine for some other project. They are not ready to buy...
9 Apr 2014 by Paulo Augusto Kunzel
HelloA question similar to this one has been asked already please have a look at this post:How to convert a .doc, .docx file in .html[^]It will work between doc and docx.Also, at msdn someone has asked more directly the idea between word...
18 Oct 2020 by Ayshine
Hello , I'd like to upload a file dto document library but if there is a file already exists with the same name I'd like to update the existing one with the one i am trying to upload to a Sharepoint 2013 document library .Is there anyone can tell me how to do it :(
21 May 2014 by Ayshine
Anyway I solved my own problem, In case of someone else looks for same thing Here is my solution .private static void uploadDocument(string DocumentLibraryString, Uri SiteUrl, string DocumenttoUploadUrl) { using (SPSite Site = new SPSite(SiteUrl.ToString())) ...
29 May 2014 by Mehdi Gholam
Try asking them : http://answers.nuxeo.com/[^]
15 Jun 2014 by Chandrakant Kumawat
Hello Friends, I am facing an issue in my current development in MVC Application, where i give an ajax call to load a partial view. That partial view returns a html in response. and further that html is been assigned to a childdiv. $.ajax({ type: "POST", url:...
1 Aug 2014 by chandansingh365
Hi,i want to display word file, which is saved in sqlserver varbinary(Max) Data Type. i need to display saved doc file into Asp.net web Page.Please help me.thanks in advance.
15 Aug 2014 by AmolPatil19787
Hi,I am trying to export some formulas which are written in richtext box.I want to add this formula in selected doc file.eg. (x+a)^n=∑_(k=0)^n▒〖(n¦k) x^k a^(n-k) 〗this a sample formula. I want to append it in selected document file.For this export code I am using Novacode.DocX...
4 Sep 2014 by pulak_mj
HI,I need to save files of different types (images, docs, xls etc.) uploaded from a hosted web application. But the issue is that I can't save those files on the same server on which the web app is hosted, rather I need to save them on the database server. I have come up with two approaches...
4 Sep 2014 by OriginalGriff
Depends.I do both: some files go in the DB, other go in folders, with links to them going into the DB. Generally, what decides which way I go is size: if the files are large ==> folder. If they are small ==> database.What you want to avoid is clogging up the DB with huge data transfers:...
4 Sep 2014 by PhilLenoir
I don't entirely disagree with Griff (who could?), but another option for large files in SQL Server is to store the files in a database using the Filestream data type. The files are then stored in the file system by SQL Server and retrieved using SQL queries.I always feel uneasy about...
7 Oct 2014 by daghune
helloI Have A Database That Stored Office Files In Binary Format There ..Now I Want To Open Files For Users And Let Users Modify Them And Save as Binary and Update Database ...Which Way Or Components Can Help Me To Open Binary Stored Office Files In Windows Form Application...
13 Oct 2014 by Sergey Alexandrovich Kryukov
It sounds totally off-topic. I see no sing of any code you are developing, and nothing related to computer science.If you have problems with Photoshop, please address Adobe customer service.—SA
4 Nov 2014 by Black_Rose
Hi allI am preparing a document for queue management system of a bank.Here i have to mention security feature.Please can anyone give some idea what can ii mention in this.Thank you
4 Nov 2014 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.Try it yourself, you may find it...
8 Dec 2014 by Josip Jurić
Hi!I'm working on small project and one of the things that application needs to do, is to generate one document which would need to contain lot's of text, also some graphs, couple of images and some tables.Main concern is that application can save that document in PDF and in some other...
9 Dec 2014 by vishalharne
Hello,I want to add a combo box or a drop down in a word document pro grammatically. Also after that I want to set the selected value through code. I want to do this through c#. can some body please give me proper link. I wan not able to find one .Thanks in Advance.
9 Dec 2014 by vishalharne
@Praveen KumarI have never done this .. so basically I am opening a word doc programmatically(c# code using Interop refernces) writing some text into it. which I am able to achieve. But now I want to add a combo box to hold a list of values and show one value selected.@Ryan...
9 Dec 2014 by Josip Jurić
Thank you both on answers. You gave me materials to study and make an final conclusion.
22 Feb 2015 by Yazad Balsara
Review of a smart document viewing library with annotation features.
17 Apr 2015 by PIEBALDconsult
I don't know Java, but in C# I'd read the whole file with System.IO.File.ReadAllText(String) then use a RegularExpression.I definitely would not use IndexOf -- that will lead to false-positives.For example:System.Text.RegularExpressions.Regex reg = new...
28 May 2015 by dinesh_redhawk
Hello Friends,I have to show the XML data in a panel on my c# winform application.Something like this:https://i-msdn.sec.s-msft.com/dynimg/IC463730.jpg[^]Not sure any concept like 'Document panel' is available in C# or not.Please provide some ideas, if this is achievable.Thanks.
28 May 2015 by Sergey Alexandrovich Kryukov
The question makes no sense at all:You hardly can show a Word document in your application. Why asking about using something you cannot use?Microsoft Word cannot show XML document reasonably well. Why trying to use something which does not solve the problem a all, even if you don't use it in...
28 May 2015 by Maciej Los
As per my understanding, you want to display data on form... So, what you have to do?1) create new windows form project2) add 4 labels and 4 texboxes; change their names to undertandable names, such as: txtCompanyName, txtContactName, txtContactTitle, txtPhone3) create custom class, for...
29 Jun 2015 by praveenlob7
Why don't you use Content controls which are available in Word. Have a look at the below link.http://blogs.msdn.com/b/mvpawardprogram/archive/2014/06/09/referring-to-content-control-using-c.aspx[^]
18 Jul 2015 by cy163@hotmail.com
I am storing time series data (machine monitoring data) with MongoDB. The data model looks like the following,which is inspired by the internet article "MongoDB as a Time Series Database"{ timestamp_hour: ISODate("2013-10-10T23:00:00.000Z"), type: “Voltage”, values: { 0: { 0:...
18 Nov 2015 by amagitech
I want to usemeta before web page rendered on WebBrowserControl.I tried void _browser_Navigated(object sender, WebBrowserNavigatedEventArgs e) { if (_browser.Document != null) { if...
18 Nov 2015 by George Jonsson
Here is a CP article that describes what you need to do to change the mode of the WebBrowserControl.Configuring the emulation mode of an Internet Explorer WebBrowser control[^]then this tag should work
27 Feb 2016 by razrx
Hi all, i have some problems regarding this code from : Extracting Text From Image (C#.net) ~ BitsByta[^]the provided code was converted into vb.net but i just keep getting this problem "Exception thrown: 'System.Runtime.InteropServices.COMException' in OCRtest.exeAdditional...
27 Feb 2016 by Patrice T
You should learn to use the debugger as soon as possible. Rather than guessing what your code is doing, It is time to see your code executing and ensuring that it does what you expect.The debugger allow you to follow the execution line by line, inspect variables and you will see that there...
10 Mar 2016 by pykos
Hello, I am searching for a solution in .net to add some text to the end of every document that comes to the print queue (based on printer name). I can intercept print jobs easily but could not find any property in the "PrintJob" object containing document contents. Is this even possible using...
10 Mar 2016 by OriginalGriff
The "content" of a print job isn't necessarily text: it's quite likely to be in a proprietary format specific to the printer make (and maybe even model) - so even if you could get at it, there is no guarantee that your changes won't just make the printout useless and unreadable. Remember what...
10 Mar 2016 by Michael_Davies
The data for the printed output is available to the print processor, you would have to get the SDK and write your own print processor.There are some tools online:Virtual Printer SDK for Windows 7, Windows 8, C++, C#, Delphi, VB.NET, VB[^]Also worth reading:Windows Spool Files...
12 May 2016 by Member 12520725
I want to get headings h1, h2 from a word docx file with the page number from where it is fetched. e.g. there are headings "heading h1" and "heading h2" in page 1 and other h1,h2 headings on other pages. I want to get these with the page number they are fetched from. Can be something...
16 May 2016 by santosh.yadav198613
You can try html5 video player. Your browser does not support the video tag.refer HTML5 VideoLet me know if you found the solution
30 Aug 2016 by Kumar Aryan
I am using to restrict my document mode to IE 9 at server end,this code works fine at my local server and set IE 9 as default mode but same is not working at server end.What I have tried:
30 Aug 2016 by Dave Kreskowiak
HTML tags have nothing to do with the server code and what it generates.Those tags are only suggestions to the browser rendering the page. They can also be overriden by browser policy and there's nothing you can do about that.
8 Feb 2017 by Hassan Jide Hassan
Java Problem here please. I have two text files. One contains a long list of stop-words, and the other file contains lots of paragraphs(corpus). I am reading the earlier stated stop-words and removing these stop-words from the other file that has lots of paragraphs in it, mentioning the number...
8 Feb 2017 by Peter Leow
Try the following approach:1. Read in the list of stop words and store them in a Map (Java Platform SE 7 )[^] with stop word as the key and its count as the value starting at 0. Increase the value by one whenever that stop word is found in the corpus.2. Read in the corpus text file line by...
14 Feb 2017 by Cynnie Jia
you can use GhostDoc to do something,when you start writing code.It can help you generate program documentation.
8 Mar 2017 by Richard MacCutchan
You will likely get a quicker answer at DocX - Discussions[^].
19 Aug 2017 by RickZeeland
See these CP articles: PDF File Writer C# Class Library (Version 1.19.1 Enhancement: Document links)[^] Creating PDF documents with iTextSharp[^] Some links to PDF generators: iTextSharp, a .NET PDF library | SourceForge.net[^] PDFsharp download | SourceForge.net[^] sharpPDF download |...
6 Jun 2021 by Member 13541763
i am working on printing a document for my class group task. but i couldn't find anything to print from c++ console app. is it possible to do so? if yes, how? What I have tried: cannot implement PAGESETUPDLG, PrintDocument,
27 Nov 2017 by KarstenK
Printing means to send data to a special output, in this case the printer. The basic approach is explained in this stack overflow answer. Maybe in this discussion on MSDN is a useful link. The basic tasks are explained in this How To: Print from a Windows Program. If you need to print from...
11 Dec 2017 by Jochen Arndt
It is explained in the remarks section of the MeasureString funcion description: Graphics.MeasureString Method (String, Font) (System.Drawing)[^]: The MeasureString method is designed for use with individual strings and includes a small amount of extra space before and after the string to allow...
11 Dec 2017 by OriginalGriff
It's complicated, but if you want to print characters with the right spacing, you need to measure the whole string, because the width of a character is not the only matter that affects the string width, there are "human eye" rules which apply as well. And proportional fonts (such as Arial) are...
20 Sep 2019 by Shun Huang
How to use Sphinx for Python documentation
18 Oct 2020 by Member 14968761
Thanks for sharing! What program/language did you use?
6 Jun 2021 by pierre_j
While that shows up on google on page 1. A possible solution would be to use: PdfCreateRenderer function (windows.data.pdf.interop.h) - Win32 apps | Microsoft Docs[^] then clone the GDI, convert to the right bitmap format to send to the...
5 Apr 2022 by RichardN73
Hi All, A friend of mine, has a huge set (around 5000) of documents he wants to search through. There is already a chrome extension he uses, that allows basic browsing through documents by directory and date/time. This extension also allows the...
7 May 2023 by ToughDev
How to restore text from PDF files Encoded using custom CID fonts
2 Jul 2014 by Mohit1110
In this article we will exploring more about DocType and will understand how does this effect the page rendering.
21 Jun 2020 by Leif Simon Goodwin
WPF docking window manager library
22 Jun 2013 by Adam Tibi
A typical implementation of a CQRS pattern ASP.NET MVC 4, Ninject and MongoDB. I will be demonstrating a sample applications that acts as a base building block for a CQRS-based architecture.
15 Jun 2014 by Kornfeld Eliyahu Peter
You have some problems with your approach...1. No ready state when partial page load done...2. The response content is inserted inside a div tag and never evaluated by the browser engine so browser knows nothing about any JavaScript method in that content, that will prevent you to call that...
11 Apr 2019 by Jose A Pascoa
Although most Windows programmers have already used the RichEdit Control, many of them are not aware of all its capabilities. One such capability is image embedding.
26 Jul 2023 by Richard MacCutchan
The document.write statement is part of the HTML DOM, and nothing to do with XML. XML is merely a useful way of formatting data for transmission between computing systems or applications. So it seems that you are mixing two different systems...
11 Oct 2013 by ASP.NET Community
In this article I will show you how to read meta tags programatically using C# and Asp.Net. How this article is different from other articles
23 Mar 2014 by filip_prasinovic
We need to automate the generation of documents from pre-designed word templates in ASP.NET application. The solution should enable us to populate (Word) template documents with the database data. The documents should be in the form of Word documents so the end users will be able to add/modify...
3 Apr 2023 by V. Subhash
Learn to create documents in popular formats using only free and open-source software
26 Apr 2014 by Manas Bhardwaj
Why don't you just use PowerPoint Storyboards?http://msdn.microsoft.com/en-us/library/hh409276.aspx[^]
2 Jan 2018 by Mahesh Alappuzha
how to display a PDF file in Wpf app with document viewer.
25 Mar 2014 by Dhanush Shetty
Where can I find adetailed documentation for UltrVNC?The documentation provided in the UltraVNC website is very vague and non descriptive.
1 Jul 2014 by Member 10843516
Hi,I am reading the excel file data using c#.net, now i want to replace the graph values in word document with this read excel value how it is possible using c#.net?
15 Apr 2015 by BacchusBeale
For example, the pseudocode might be:> define a class Result with variables int count and string filename> make an ArrayList or other collection to add Results to> get List of file names from directory> get list of keywords from user> for each file in file names do:>> for each...
19 Mar 2014 by SamiGotzer
In general, .NET developers have several options to choose from when implementing document generation automation or mail merge (in your case):Office Word Automation (Office COM): Although this approach can still be used in .NET, it is not recommended any more, especially on server side (it...
9 Mar 2017 by Sathya5995
Example: Using Open-XML SDK 2.5, We can apply Content Controls by following the link.Kindly please help me to achieve the same using Novacode.Docx DLL & share some helpful links.Thanks in advance.What I have tried:I've gone through various documentations, but I couldn't find...
30 Oct 2013 by Jitendra Singh
Hi,I am looking for C# code that will read document file (.doc/.docx) with all formatted words including images, bullets, font with bold/italic/underline, table, header & footer and so on.I am using WordprocessingDocument.Open() and Microsoft.Office.Interop.Word.Application But unable to...
23 Dec 2013 by Pradeep Kumar Patel
How to create application in asp.net based on Role,Pradeep Patel8483094947
29 May 2014 by shanthan7
Nuxeo does not have the folder path in a hiracy format. instaed it has views. I have my own set of folders or view or work space in a shared drive ,and when a different team trying to change the set up of the view, I should not be affected. is this possible? or not? please give me well detailed...
8 Aug 2015 by Vijay_Gurunanee
If you are not getting proper results from OpenXml then there isn't any...However,what you can do is try parsing the XML (returned by WordprocessingDocument.Open()) and get the expected results from there.Its bit laborious work but will work as you want.For example you can...
16 May 2016 by Chiranjeevi Avala
HI my requirement is to display the mp4 and pptx files in webpage ...i am using the below code but its displaying only pdf,img,mp3 files ...any helps pleaseWhat I have tried:in .aspx: ...
22 Feb 2014 by spsullivan
Gentlemen/Ladies, I am at wits end. I need to know how to loop through a document library, creating a tree view in order to show a 'table of contents' if it were in a SharePoint 2010 Web Part. Using Visual Studio 2010 and an asp.net tree view control. I am new to asp.net as well as working...
17 Apr 2014 by FarhanShariff
// Declaration of the variables Word.Application wordApp = new Word.Application();//Create an instance for word app wordApp.Visible = false;//Set animation status for word application Word.Document doc = wordApp.Documents.Add(); string...