Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to get text contents from pcl spool file

Posted on 2007-11-15
3
Medium Priority
?
513 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
itsmeandnobodyelse earned 2000 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses

609 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