Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am having a user manual for my asp.net application which I will be using as a help option for the user. I am providing help using some keywords. When users clicks or selects the keyword that he wants help with I want to open that page number of the user manuals PDF file where the keyword is there. E.G. if i search User master , then user manual should get open, directly taking me to the page where user master information is there.
Can this be done in asp.net.? C#.? Any suggestions?
If you know which page the keyword is on simply;
Add "#page=4" to the end of the link.
If you don't know the page number and you want to find the page number at run time you'll need to index the pdf document and search the document.
You can map keywords to page numbers if you know the keywords ahead of time.
Google for C# PDF searching APIs.
dtSearch is good but it's not free.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
So, I'm a newbie using MVC and Razor - I do have some C# experience, however.
That being said, I need to make a simple web-app and the project specifications require server-side data to be stored in CSV. Everything I've researched online involves uploading a CSV file to the server, or letting the user download one. This is not what I want.
This is what I need help with:
1) Appending a new line to an existing server-side CSV file between user page directs/requests.
User submits page --> server appends data to server-side CSV --> User gets redirected to new page
2) Iterating through a static CSV file and presenting the data in a table.
User requests page --> Server iterates through CSV and dumps line data into a table --> User gets page with table full of data
Any ideas where to start with this?
Decide where you want to store the file, here is one of the paths:
string csvPath = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, "App_data") + "\info.csv";
In the controller action use regular File IO APIs (http://msdn.microsoft.com/en-us/library/system.io.file(v=vs.110).aspx) to manipulate the file
While this may answer your specific question, this wouldn't scale when you have many front ends, multiple users trying out your site,... Suggest going with a backend DB to store such info. You would need to use locks solve the latter if you are not going to use DB.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I would like to read in a .cs file from my project which contains a code sample for use by clients of my company's API.
What's the best way to read in this file and pretty-print it to the page with indentations etc. The goal is to just have the code on the page automatically change when I update the contents of this file so that the code sample will always be up to date as published on the live site.
An example of what I'm attempting to accomplish is something similar to this: http://msdn.microsoft.com/en-us/library/vstudio/ezwyzy7b.aspx
I'd use this...
http://www.manoli.net/csharpformat/
http://www.manoli.net/csharpformat/CSharpFormat.zip
It transforms C# code into html. You can read the file run it through the CSharpFormat then output the HTML to a panel in the page.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Given an website URL.
Is there a way to traverse through all the links on the website and keep track of all the Pages in a text file or something. I want to use Selenium for this.
However, some of them are pop up dialogs that will be on every header and footer of every page. So obviously keep track of visited links and not go back to them again.
Thanks.
Try Scrapy: http://scrapy.org/
Scrapy is a fast high-level screen scraping and web crawling framework, used to crawl websites and extract structured data from their pages. It can be used for a wide range of purposes, from data mining to monitoring and automated testing.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to write an employee maintenance program (in C#) that can add, change and delete from a text file. I have the HTML all put into an .aspx file but I have NO clue on how to set it up to read from a text file and populate the input fields with the employee to maintain.
If I could get some insight on how to read a text file and populate the input fields(form fields) that would be great. Even a link that explains it since I haven't been able to find one. The text file will have to have a record ID as the first field so I know which one to grab for editing(to display) or deleting.
There's a toolkit of functions to manipulate files in the system.io.file class. That's a reasonable start for the project.
You might also consider using a database instead of a text file. They're designed to handle storage and retrieval of data that changes a lot. A text file is doing it the hard way.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Is there a way of removing the text from a pdf file using c#?
Yes, using the open source project iTextSharp
Creating a basic PDF file:
http://www.devshed.com/c/a/Java/Creating-Simple-PDF-Files-With-iTextSharp/
http://www.developerfusion.com/code/5682/create-pdf-files-on-fly-in-c/
You will need to create a new PDF, open the original.
Iterate through all the objects you find, remove the text and add the old objects to the new file.
The icky part is that after you remove the text, you will have to reposition objects in the pages following the deleted text.
If you do happen to do it, you got yourself a very interesting blog post...
There are several libraries, free and commercial that can assist.
I'm most familiar with pdfNet by pdfTron. However, I've only used it in a read-only context
I assume it will work for you as "...Add/remove/edit images, text, and vector graphics..." is one of the uses they claim its capable of.
Below is a link to their documentation online. It's a rather detailed API so be prepared to read.
http://www.pdftron.com/pdfnet/html/main.html
As for other vendors, I know Adobe has a reseller that licenses their API in a C# form. I don't recall the product name off the top of my head. If memory serves me correctly it's pricey by comparison to pdfNet and it resembles an old style c (not even C++) method of programming. It won't be a comfortable fit if you're only used to C#.