Solved

How to get text contents from pcl spool file

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to copy an image file into clipboard C/C++? 1 196
best sources to up-to-date in C++? 8 91
The line on IDE 4 91
C++ help/ Toy problem 19 29
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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…
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.

839 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