|
hi,
how to read the actual content available in .SPL file which was generated by printer driver during the printing of any file using any open source dll in C#.net?
could you please provide me any suggestions to implement the above task?
thank you.
|
|
|
|
|
What does SPL mean in this context?
Samsung Printer Language?
|
|
|
|
|
windows spool file format, which was generated by printer driver at the time printing any file
|
|
|
|
|
The first thing you need to research is the format of the SPL files, or find a library that will decode it for you.
|
|
|
|
|
Well, to 'read' the file you could use some available viewer for SPL files: [^].
But, if you want to 'parse' the format yourself in code, use this reference as a starting point for the file format: [^].
I think parsing it yourself would be a huge task, because: you may have to deal with either EMF-SPL and Raw-SPL, and with Raw-SPL (from the link above):
In the case of RAW data, the content of the file is exactly the same as the data send to the printer ... So this data could be PCL, PostScript, ESC-P, CaPSL, Prescribe or similar.
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
|
|
|
|
|
|
Hi,
I am trying to open a file from a network path like this:
file_path = registry_key.GetValue("Path").ToString();
string file_name = file_path + "H" + date.ToString("yyyy-MM-dd") + ".TXT";
but nothing is happening and no error. It works fine when I use a local PC path like C:\TEMP
How can I solve this please?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Jassim Rahma wrote: How can I solve this please? First, by extending your code sample...
What value file_path has? How do you try to open the file?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Jassim Rahma wrote: How can I solve this please? Probably by fixing your code. But since you did not show the code that is failing, or the actual path that you are trying to open, it is difficult to suggest anything.
|
|
|
|
|
Do some reading around the the Path [^]class and understand what a UNC path is and why you use it.
Remember everyone on the network may not map their drives identically.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yes!
Probably something to do with backslashes. Path is the way to go when building up, err, paths...
Regards,
Rob Philpott.
|
|
|
|
|
What value does file_path contain? Does it use a UNC path?
You need to determine what value file_path contains and then see if you can open the same path in Windows Explorer. If this works fine then check if the file exists. You should check for its existence in your code.
If (File.Exists(file_name)
{
}
|
|
|
|
|
someone to help me out in using Math to solve part of quadratic formulat which goes thus: √b^2 - 4*a*c using Math class. tnx t
|
|
|
|
|
Where are you stuck? Math.Sqrt(...) ?
|
|
|
|
|
Perhaps they did not mean class as in C# class but class as in they want you to come to class to help them?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
Hello,
I have a .NET 4.0 app with MS SQL Compact 3.5 Database.
And I have a password dialog.
There are 3 questions:
- How do I protect the DB with password? (existing DB)
- How do I remove the password from DB? (with keeping data)
- How do I check if the DB is protected with password? (for displaying password dialog)
Not always the user of the app wants to password protect the DB, and I don't want to display the dialog if DB isn't protected...
Thank you for the answers,
VitekST
|
|
|
|
|
|
Dear Experts,
I have a problem during change image for child level in each node, I have assigned an image to treeview, and I have assigned other image to selected Node, I need to assign an image for the some childs in each node.
For example:
Root
|_Node1
|_Child1 (Need to assign image)
|_Child2 (Need to assign image)
|_Child3 (Need to assign image)
I have populate the treeview from Database recursively.
Thanks,
Ahmad
|
|
|
|
|
Is it the case that you don't know what nodes are in the TreeView until it is populated ... so you have to navigate the populated TreeView and assign images to nodes based on their depth (TreeNode.Level) ?
Your question implies something about selecting nodes, but I am not clear what that is.
If you can be more specific, I think I have some code that will be helpful (I've spent years working with the TreeView).
In any case, I am pretty sure you will need to use an ImageList to hold all possible images for the nodes: do you have that already implemented ?
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
|
|
|
|
|
Dear ,
Thank for your response,
Actually, what I'm going to do is:
I have a tree with folder, and these Nodes, some of these nodes is played as a child use to open Forms,
for Example,
General Ledger
|_GL Transactions
|_Enter GL Transaction
Enter GL Transaction: is a child that I need to change the image for it, it is not a Folder, it is a child that will be used to open a Form.
For previous node, I select a Folder image for them.
I hope of you receive my point.
Regards,
Ahmad
|
|
|
|
|
Sorry, Ahmed, I don't yet understand your question.
The Microsoft supplied TreeView Control has two ImageList Properties: ImageList, and StateImageList. ImageList is used to specify the image shown when the TreeNode is selected, or not selected. StateImageList is used to control the image shown for the Node when shown with a CheckBox, and the CheckBox checked or unchecked.
Each TreeNode in the TreeView can have its current image changed at any time by setting either the Index or Key of the ImageList assigned to the TreeView.
treeView1.Nodes[3].ImageIndex = 2; // set the Image for the Node when it's not selected
treeView1.Nodes[3].SelectedImageIndex = 3;; // set the Image for the Node when it's selected
See the Microsoft documentation for ImageList: [^]
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
|
|
|
|
|
Thank you sir,
Your suggestions about TreeNode.Level and treeView1.Nodes[3].ImageIndex = 2 , will help me.
|
|
|
|
|
You can, of course, post other questions here, or in the QA forums.
Keep in mind that for any TreeNode you have several possible 'dynamic visual state' factors that may determine your choice of images to be used in displaying the node:
1. has child nodes, or has no child nodes
2. if has child nodes: is expanded, or collapsed
3. is selected, or is not selected: unfortunately unless you owner-draw the TreeView you have no control over the selection highlight color, and every scheme I have seen to work-around this (using the TreeView as is: i.e., not owner-drawn) has been not useful (impaired performance, etc.).
4. the current level: this could be a dynamic factor if you are implementing drag-drop in the TreeView
To assist you in determining the node's current state at run-time there are four boolean properties which are read-only:
IsEditing
IsExpanded
IsSelected
IsVisible
cheers, Bill
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
|
|
|
|
|
..'tis was downvoted, but I cannot think of any valid reason why. So, I upvoted it.
If anyone thinks this is NOT a good way to answer, please do explain it to me, using small short* sentences and simple words.
*edit
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|