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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing some pages from a pcl file

Status
Not open for further replies.

cruicu

Technical User
Nov 25, 2002
24
RO
Hello all!
Can somebody tell me how can I print a portion (range of pages) of a pcl file?
Can I use lpr command?
Thanks!
 
The problem is that there isn't a reliable way to easily determine where the page breaks are located, particularly from a DOS or UNIX command prompt. There may simply be a FormFeed embedded, or the printer pages, based on margin settings. But this could be different from page to page.

You best bet would probably to have a look at a PCL viewer and print from it. Presumably the viewer would go through the same steps as the printer to page the document.

Perhaps someone from PageTech can comment.




Jim Asman
jlasman@telus.net
 
if you create the pcl pages and are not using raster graphics, you could do it by looking for formfeeds
(assuming all pages end with chr$(12))
thereby parsing the file and print the pages wanted.

I do this all the time (or the user has the choice) in my
accounting program and although I don't use pcl (because
of the specific print engine i use) the idea is the same.

If raster graphics exist in the pcl, then you would have
to check for that and ignore any chr$(12) within the data
postion of course.
 

In order to print a page range from a complex PCL file, you need a commercial quality HP PCL emulation product. There are only 3-4 that fit that description. You not only have to determine the beginning of each page, you need to index them, store the environment variables for the printer state just prior to the next page and be able to extract the pages and NORMALIZE them. That includes whatever state the download bitmap fonts may be in at that given point within the print stream.

Try PCLTool SDK Demo and use PCLTool.exe to View PCL, then print a range of pages from the print dialog.

BP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top