How do I locate a string in a PDF? [duplicate] - c#

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Searching for a string in a pdf files
I'm working on an application that must find a location string in a PDF file. The string will look like "Location: XXXXXXXX" where XXXXXXXX is the value I need to use in my application.
How do I read this string from the PDF? Is there a library that I can use to read this? Once I get the string from the PDF I know how I'll process it. I just need to get the value out of the PDF.
Thanks!

You need something which can parse the PDF (you can't just search the file). What language do want to use?

Related

How to turn have a .json file as a string in C# [duplicate]

This question already has answers here:
How to read an entire file to a string using C#?
(17 answers)
Closed 5 years ago.
So I have this .json file: temp_file.json
Now all I need to do is get whatever is in this .json file, and put it in a string using C# in Visual Studio 2017.
That's it.
I don't want it to be turned into a object of a certain class or whatever. Just get whatsever in the file, right into a string.
A lot of other questions/answers I have stumbled upon are about desirializing and serializing etc. I don't need that. Just turn the .json file in to a string. No need to write it to a console or whatsoever.
Somewhy I just cant lay my finger on it. It sounds simple to do...
You dont get any simpler than
var contents = File.ReadAllText(#"drive:\path\to\yourfile.json");

How to search for a string in a text file? [duplicate]

This question already has answers here:
Text file parsing - how can I search for a specific string and return whole line?
(3 answers)
Closed 8 years ago.
How do I search for a string in a text file line. And if found save it as a string variable...
I need an example if possible. I have tried to do it but couldn't do it. I can't post what I have tried because I'm stupid and deleted it. Any help is appreciated. Thanks in advance! :)
I know this page thats explain how search for a specific string and return whole line.
Its can help you...
See the link:
Text file parsing - how can I search for a specific string and return whole line?
Thaks.

MS Word Integration in C#? [duplicate]

This question already has answers here:
How can a Word document be created in C#? [closed]
(17 answers)
Generate Word document from c# [duplicate]
(3 answers)
Closed 9 years ago.
I have tried to look around for documentation on this subject, but I haven't really found a concrete answer. Just answers to problems that I am not really facing.
I want to pull some patterns and phrases from a database and generate a docx (or doc?) file in MS Word using C#. It's part of a school project. But the integration part doesn't seem to be very well documented, or I am looking in the wrong places.
Any help with this?
The magic word for google purposes is "Interop". Try this as a starting point:
http://www.dotnetperls.com/word
There are basically two ways to create word documents programmatically:
Create the documents by calling (and starting) word programmatically
Create the word document in the open XML format readable by Word.
For more info see similar questions here on stackoverflow:
How to create word docs programmatically from a template
Try use Open XML SDK 2.0 for Microsoft Office link
It provides easy way to work with docx file.
After words docx format is simple zipped xml file.

asp.net + c# tips to edit docx inside my app [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Open/handle Word documents like SharePoint
I´ve developed one website where it is possible to upload docx files to it. Now I want a way to edit it directly in browser, I meant, a way to do like google docs does.
OR
Copy from MSWord to my app window e maintain all the formats, including tables.
for the manipulation of word documents you can use DocX. With this you can read/write from/to word documents (docx not doc). This however is a long way from editing your document in a google docs like manner...
It does match your second request though!

How to create a true type font from the PDF document [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How can I extract embedded fonts from a PDF as valid font files?
I would like to create a font file (TTF file) from the PDF document. The stream of fontfile2 does not contain CMAP table. How to create a cmap table to make a valid TTF file?
http://i.stack.imgur.com/sm799.png
Please find the font stream in the above screen shot.
Thanks in Advance.
If it is subsetted it may contain only those glyfs displayed on the PDF page.

Categories