[Help] Lisp to add Custom Paper Size in DWG to PDF.PC3

[Help] Lisp to add Custom Paper Size in DWG to PDF.PC3

doanfinal94
Participant Participant
1,917 Views
4 Replies
Message 1 of 5

[Help] Lisp to add Custom Paper Size in DWG to PDF.PC3

doanfinal94
Participant
Participant
Hi everyone, have a nice day!
I currently have a problem wanting help!
I have drawings whose paper size is not standard (e.g 297x600, 297x 950 ... etc.)
How can I add new paper sizes to the DWG to PDF.PC3 file automatically by lisp,
because not all drawings are the same size,
manual addition takes a lot of time. Hope to get help!
Thanks!!
0 Likes
1,918 Views
4 Replies
Replies (4)
Message 2 of 5

cadffm
Consultant
Consultant

@doanfinal94  schrieb:
manual addition takes a lot of time.

By manual Acad ask if you want to add the new papersize to your plotter (*.pc3/*.pmp).

a) If the paper format is set as the paper format in current pagesetup

b) If you not disabled this dialog

 

Back to topic: With Lisp

 

Since there is no officially supported/documented  way (also the paper format is still in your *. pmp file included and not in the *. Pc3 / or?)

you can not to that with Lisp.

 

V1: What you are searching for:

      Decompile/extract the content of the right *.pmp

     add the new papersize

     compile / archive alle files as *.pmp back.

     i think you don't get a solution here for that 😕

 

V2: Use another PDF-driver where you able to add the papersizes "on the fly"

      (it should possible with pdfcreator and registry edits, what is possible thru lisp)

       Have fun (to find the right driver and to figured out which steps you have to go)

 

 

The simple way

 

V3: Control the pdf export/print and crop the white space later.

      V3a) If you know where the pdf file saved you can start your crop program by lisp (adobe or others tools)

      V3b) plot/publish everytime to the same folder and install an event watcher.

               "Crop white paper in every new file in this folder"

 

 

 

Sebastian

0 Likes
Message 3 of 5

pbejse
Mentor
Mentor

@doanfinal94 wrote:
Hi everyone, have a nice day!
I currently have a problem wanting help!
I have drawings whose paper size is not standard (e.g 297x600, 297x 950 ... etc.)
How can I add new paper sizes to the DWG to PDF.PC3 file automatically by lisp,
because not all drawings are the same size,
manual addition takes a lot of time. Hope to get help!
Thanks!!

 

I believe you only need to do that ONCE per CAD station, just make sure you save the settings.

Also look into PSETUPIN 

 

0 Likes
Message 4 of 5

lkcadway
Advocate
Advocate

*.pc3,*.ctb,*.pmp file are packed by zlib,but AutoLISP can't read and unpack them.

I had to using python coding, then solved this problem.

0 Likes
Message 5 of 5

Sea-Haven
Mentor
Mentor

Not sure why you would not just use the inbuilt modify printer. Config.

SeaHaven_1-1667957863196.png

 

 

SeaHaven_0-1667957825691.png

 

0 Likes