Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to convert PDF File binary to PCL Binary

Status
Not open for further replies.

Murat AKSU

Programmer
Aug 27, 2020
2
TR
I want to send pdf bytes to the printer in my Android project. I watched tcp packages of an application that did this before. Does exactly that:

1-) Sending paper size, page size, margins with PLC commands.

2-) It then sends the PDF bytes. (I marked it for you)

tqFZk_rezqni.png


Sends bytes like this

.*b20W....................
This is an example of how bytes are sent. (20 Bytes after W)

If I try to send a pdf created with Adobe, the bytes look like this:

IniEX_h8cuei.png


This is not working for me. Because it sends a byte array that is different from the above and contains many unnecessary things.

My question is exactly this: How do I get pdf bytes like above? Will iText help me with this?

This is my pdf file (I used the same file for both tcp-packages):

XE6kw_fjrgpj.png



NOTE: My printer is HP Deskjet 2630
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top