Convert a pdf to bmp without external libraries C# [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I was wondering if anyone knew how I should approach converting a pdf to bmp in C#. I wanted to do this without external libraries as sort of a longer learning experience.
I'm just stuck as to how to approach this without using other libraries I don't want.
If anyone has any open source examples I could look at to get an idea of how I should start it that would be much appreciated!
Thanks

Well, obviously you would start with the PDF Reference:
http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf
Then you could try to find an open source PDF renderer and try to understand how they go about rendering stuff.
However I think you underestimate greatly how huge a task you set yourself. Even just extracting some stuff from a PDF and manipulating existing PDFs is very complex. Large companies put huge effort in it and still their libraries do not match with PDF rendering via Acrobat.

Related

Which is better option OpenXml or Microsft.Office.Interop.Excel to read excel file in c#? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I am using .NET 4.6 framework and I have to read multi sheets predefined templated excel workbook in asp.net/c# code and I know two way to solve the problem using either DocumentFormat.OpenXml.dll or Microsoft.Office.Interop.Excel.dll assembly.
But I am in confusion which one to use as I don't have expert knowledge to decide.
My questions are;
What are the pros and cons using them in a solution?
Is there one better than another?
Could you please explain so that I could pick one?
The answer is relatively simple: If you combine "excel file" and "asp.net" in the same sentence, NEVER use Interop.
Interop opens a real excel instance and manipulates it to set / retrieve data.
It's slow, can hang unpredictably, there might be popups which block your program (are you sure you want to overwrite this file?) and it's a resource hog.
DocumentFormat.OpenXml.dll works, but it's complex to work with, especially if you have user supplied data sheets, which you want to manipulate.
Third party libraries like EPPLUS are more high level and user-friendly, so I would recommend such library.

How to extract image features through C# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
My adviser told me to use Accord Framework for C# to extract features and patterns from images. Our project is about image analysis and comparison of tobacco leaves. Does anyone here have an idea on how to do it? Thank you.
This is pretty high level stuff, but from what I've learned in my time faffing with it, I'd use the Accord.Imaging library to scan your pictures. Followed by using the Accord.Neuro namespace to "learn" from some manual data you feed into it.
Seems your goal is to create a program that scans images quickly, gleaning only the useful data from the full image, and then checking for some particular features of the image. I've never used the library, but it looks like it'd be possible to use it.

Generating COBOL code with C# [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have to generate COBOL code with C# but I haven't got suitable ideas how I could tackle this problem.
The only idea which I have was to generate the COBOL code as plain text but I think this isn't really efficient.
Are there any other/better ways? Could anyone provide an approach for me?
I would be also glad to hear about the smallest tips.
For your information: The data, which I need for the COBOL code I get from a PDF file. Unfortunately I am not able to use Cobol.NET.
The main goal is that a user is able to open a PDF file in the C# program. This PDF file is an empty form where the user have to place several kind of data on it. After editing this form the user must press a button 'run'. The 'run'-button trigger an event which translate the data into COBOL code. Now the COBOL code should contain the data types, values and coordinates of the used fields (data). The coordinates identify the place where the fields should printed on the formular.
If you're using Visual Studio I'd suggest looking into T4 Templates. They allow you to specify the format of your output as it will appear and write C# to manipulate that output.

can i write an Autosave plugin for microsoft windows notepad? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I use notepad for writing daily notes.some times when system gets restarted by accidentally, I loose my content.
So my question is"can I write an auto-save plugin for notepad" ?
Please let me know if I can write an auto-save plugin for Notepad using C#.NET.
I know about Notepad++ but I want to use notepad only.
Thanks in Advance.
There is no direct way of doing this because NotePad is a separate application and you don't have its code. Even if you did have the code, I'm highly sure it wouldn't be in a .NET-based language.
There is an alternate though. You could recreate entire NotePad from scratch in .NET. Believe me it won't take more than a couple hours for a guy who knows his tools (someone out there might already have done that). Then you can add any new features at your choice.
Yet another way would be hooking into NotePad's low-level messages through Platform calls and trying to somehow inject your features into it, but that's something I'm not an expert at and that would probably take more effort/expertise than writing your own NotePad from scratch.

How to convert AVI to 3gp in C#? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Is it possible to convert an AVI file to 3gp in C# ? If so how could I do this? Any ideas will be appreciated, thanks in advance.
It depends what you mean by "convert". Both 3GP and AVI are wrapper formats, so are you merely trying to change the container format, or do you want to re-encode the streams as well?
Either way, you should probably take a look at ffmpeg (Windows info). For simple cases (i.e. you have the file, want a single output file), you should probably consider it invoking it on the command-line (i.e. System.Diagnostics.Process), which is much easier (and doesn't involve any licensing issues). If you want to access libavcodec/libavormat programatically, I highly recommend skipping any .NET wrapper libs (they all are in different states of sucking; Tao being the best but that's not saying much) and instead writing a C++/CLI wrapper. I started doing this, and once I got my head around data marshalling, etc., and figured out how to build it (Part 1, Part 2), it wasn't too hard.
There is no really easy way to do it; my advice is to use ffmpeg, either through the use of a C# wrapper of by calling it externally. There seem to be several C# wrappers for ffmpeg (like this one) but they all seem to be in various stages of development and not really usable. Your only option is likely going to be by calling it externally.

Categories