Solved

How to get text contents from pcl spool file

Posted on 2007-11-15
3
501 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

831 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