Print Page | Close Window

get papersize from plt file

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=4236
Printed Date: 22.Apr.2026 at 08:03


Topic: get papersize from plt file
Posted By: elibenari
Subject: get papersize from plt file
Date Posted: 25.Aug.2010 at 18:11
In Cadforum someone asked How to get paper size from a .PLT file.
The answer that he got was:

In most HPGL/2 PLT files you can retreive the paper size from the PS instruction or from the SET PAPERLENGTH and SET PAPERWIDTH PJL instructions.
The HPGL units are in 1/40 of mm.

In many .plt files the resulting Plt drawings had different paper size.

Can anyone instruct me how to calculate?



Replies:
Posted By: Vladimir Michl
Date Posted: 25.Aug.2010 at 18:22
There are more ways to specify the size - it depends on the settings of the driver which has generated the PLT file.
 
One of quite reliable ways is the HP Instant Printing Utility (IPU) - see Download. If you need to find this parametr in your own script/macro, you would need to parse the HPGL/2 binary file.


-------------
Vladimir Michl (moderator)
ARKANCE - https://arkance.world" rel="nofollow - https://arkance.world - Autodesk Platinum Partner


Posted By: elibenari
Date Posted: 29.Aug.2010 at 19:46

We need to be able to calculate the papersize of a plot made from a plt file.

Till now we did it with the knowledge that in most HPGL/2 PLT files we can retreive the paper size from the values of PAPERLENGTH and PAPERWIDTH inside the binary file where the HPGL units are in 1/40 of mm.

 

We got some cases now where our calculation is erroneous.

 

Does anybody know how to improve our calculation based on the binary plt file?

Is there anything else in the plt file that has to be considered?

thanks

Eli 




Print Page | Close Window