Solved

How to get text contents from pcl spool file

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

747 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

12 Experts available now in Live!

Get 1:1 Help Now