- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsHello everyone,
This question may seem somewhat weird.
We need to be able to setup a printer with a generic text driver that points to a server running a Windows Service (listening on a user-specified port).
The Windows Service simply takes the incoming stream (PDF) and relocates it to a specified folder on the server with a randomized name.
When I send the PDF through the printer, the Windows Service captures the data, but some of the PDF's internal representation is distorted.
For instance,
Original PDF:
==========================
%PDF-1.4
%âãÏÓ
6 0 obj<</H[936 179]/Linearized 1/E 9848/L 13617/N 1/O 9/T 13451>>
endobj
==========================
PDF (after being sent thru the socket to the Windows Service)
==========================
%PDF-1.4
%bcOS
6 0 obj<</H[936 179]/Linearized 1/E 9848/L 13617/N 1/O 9/T 13451>>
endobj
==========================
The second line marks the differences. There are more differences among the file. These differences are typically in areas that have special characters such as âã--it doesn't seem to be translating
these correctly, and it seems that the PDF has some characters not capable of being expressed in the text file (I guess)--notepad for example, displays certain characters as a block-structure.
Just wondering if anyone had any ideas about this, I really appreciate it.
Thank you :)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: cookrePosted on 2005-06-01 at 18:40:27ID: 14127307
Don't use streams, use binary I/O instead.
If you're using basic C, that's open(), read(), and write().
In .NET use BinaryReader and BinaryWriter.