Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Custom Page Size?

Custom Page Size?

Custom Page Size?

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.

RE: Custom Page Size?

<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.

RE: Custom Page Size?

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

RE: Custom Page Size?

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

RE: Custom Page Size?

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.

RE: Custom Page Size?

>> ... 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?

RE: Custom Page Size?

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

RE: Custom Page Size?

... 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) 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close