Solved

How to get text contents from pcl spool file

Posted on 2007-11-15
3
500 Views
Last Modified: 2013-12-14
Thank you for replying about the pcl text related problem.

Alex, as per your answer the fonts are not native thats why I am not able to read it correctly and also text are passed in vector form.

But now I need to extract this vector text correctly from pcl spool file. so what I need to do?

Thanks ,
0
Comment
Question by:semaphoreindia
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
itsmeandnobodyelse earned 500 total points
ID: 20290657
>>>> But now I need to extract this vector text correctly
>>>> from pcl spool file. so what I need to do?

Load the spool file to Visual Studio editor. It will - most likely - open it in binary mode and show a hex table at th eleft side and and text representation of the hex at the right side. Check the right side, whether you can find some text you were looking for. If no, you are lost (most probably) as the texts were coded in some device dependent format which hardly can be interpreted without a very specific knowhow. If yes, you might look at a second spool file whether the texts were at the same file position. If yes you could open the file in binary mode in your prog and set file position with seekg. Then, you can read the text. If the positions were changing, it is more difficult. Check the hex values before the text begins. If there is a specific sequence of - say - 4 chars, e. g. 2E F3 0A 0D, you may search for that sequence in the IDE. If valid text always was preceeded by that sequence, you could open the file in binary mode and read all data to a sufficiently sized binary buffer. Then, search for the hex sequence and you have spotted the text.

I will give you code if you can verify any of these speculations.

Regards, Alex
0
 

Author Comment

by:semaphoreindia
ID: 20296557
Thanks for replying Alex,

As I told I am getting !@#$% this kind of characters instead of the actual ABC.... So all things are wind up. So can u suggest me any way to convert or map these characters to original one. There is no strait logic as I am getting each time same sequence for different characters.

Also I found some font data is attached in my spool file. Is there any way to map these character using those font data?


0
 
LVL 39

Assisted Solution

by:itsmeandnobodyelse
itsmeandnobodyelse earned 500 total points
ID: 20297298
>>>> !@#$% this kind of characters instead of the actual ABC.
That's why you should look at them with a hex editor. There you have something like

   00 01 0A 0D 41 42 43 31  00 00 00 32 33 34 44 44  ....ABC1...234DD

where the non-printable char codes were shown with a period . at the right side and printable char codes like 0x41 with their ASCII char, e. g. 0x41 = 'A' . If doing so, you can use the right side to search for printable text and the left side to find any characteristic binary sequences which allow us to spot the text parts programmatically.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now