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

Custom Page Size?

Status
Not open for further replies.

jschumac

Programmer
Jul 18, 2014
2
US
Our company's application creates reports using PCL. They are written to a file, then converted to PDF for on-screen viewing.

The PCL to PDF converter is from Oakdoc.

So, I recently had requirements for a huge report. 16.67 DPI wasn't enough and it was suggested I do it Landscape.

However, when I issue the landscape commands, the resulting PDF is rotated in Adobe Reader. It shows the narrow side going across and the wide side going down and the text reads from bottom to top. To make it look normal, the user must go into view and rotate it clockwise. And that would be annoying to have to always do that.

Barring any way to tell the converter to do something special and any way to tell Adobe reader to launch with a rotated view (can't find any options for either), I thought maybe a custom page.

Instead of telling the printer I'm doing landscape, can I tell it I'm using an 11 x 8.5 instead of the standard 8.5 x 11? In theory, if PCL can do this and if the PCL to PDF converter handles it correctly, I will have a "portrait" page that's 11 inches long and 8.5 inches tall. Since the PCL to PDF doesn't see it as landscape mode, it shouldn't come up rotated in Adobe Reader. At least in theory.

Does anybody know of a way to specify a custom page size? There's the 101 page size that's custom. But then how do I specify width and height?


P.S. I know there is software to do the rotation, but I was trying to avoid having to install yet more software at client sites. Not to mention avoiding additional costs.
 
<Esc>&f#I Custom paper width (# decipoints)
<Esc>&f#J Custom paper length (# decipoints)

to be used in conjunction with:

<Esc>&l101A Page size: custom

I've never used them, so can't guarantee that they'll work.
Also may not be supported on all printers.
 
The first thing I would suspect is the PCL2PDF converter. They are all broken, one way or another.

How is the PCL file being generated. Is this the result of a Windows printer driver, or a self contained application. If you can send me a sample copy of your PCL file, I will run it through a couple of converters I have. jlasman at telus dot net

Jim Asman
 
Follow the link to get landscape.zip that contains the files landscape.pcl and landscape.pdf. The file contains two pages with a populated top and bottom line in landscape format on both pages. The PDF displays perfectly on my system.

View the PDF, and if it does not display in landscape, I would suspect your PDF viewer. If it does display in landscape, the use your PCL2PDF to create a PDF from landscape.pcl. If the resulting PDF displays in landscape, then your original PCL file is suspect; otherwise, I would try another conversion program.

Jim Asman
 
Thank you very much for the response. Sorry for the delay. I'm new to this forum and thought I was supposed to get e-mail notifications when somebody replied so I haven't been checking.

Anyway, the reports contain confidential info so I can't send as-is. I will have to mock something else up, make sure it shows the same behavior, and send that. The only PCL it's really doing is a reset, setting the font to 16.67/inch, then issuing the landscape command.

We are not using any drivers. We are writing PCL to a file then running Oakdoc's PCLtoPDF converter to convert it to PDF. Then calling Adobe Reader to display it.

So it doesn't really matter what the printer understands or doesn't. It's more what Oakdoc's PCLtoPDF understands. If Oakdoc's converter does the job right, they've got a PDF. And from there, they should be able to use Acroread and their printer's drivers to print to whatever they have.

I will also try those commands tomorrow. In theory (mine anyway) if I can avoid telling it that it's landscape and just tell it it's 11 inches wide and 8.5 inches tall, I might be good.
 
>> ... an incomplete PCL page formatting command ...

Or a missing page size escape sequence (<Esc>&l2A - Page Size: Letter) - or is that what you meant, Jim?
 
Yes, the complete page format including size, orientation, line spacing, margins and printable page length(in lines). Off list I have received a sample pcl file from this user and it displays properly when run through my pcl2pdf converter. I returned to him a modified pcl file that contains the modified format, so we will see if that helps him or not, but the converter is suspect for the time being.

BTW my init was <esc>&l2a1o6d3e45F

Jim Asman
 
... Jim's 'init' interpretation:

Code:
<Esc>&l2a         Page Size: Letter
       1o         Orientation: Landscape
       6d         Line Spacing (6 lines-per-inch)
       3e         Top Margin (3 lines)
       45F        Text Length (45 lines)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top