Multi-sheet PDF with -publish

Multi-sheet PDF with -publish

jwhite
Advocate Advocate
2,422 Views
4 Replies
Message 1 of 5

Multi-sheet PDF with -publish

jwhite
Advocate
Advocate

I'm trying to standardize our creation of PDF files by having everyone run a lisp file to create them. Everything works until I use -publish with a .dsd file. If I load the .dsd file into the publish dialog it creates a multi-sheet PDF. When I use -publish with the same .dsd file it creates separate PDFs for each sheet. Is there a way to make a multi-sheet PDF using -publish?

0 Likes
Accepted solutions (1)
2,423 Views
4 Replies
Replies (4)
Message 2 of 5

roland.r71
Collaborator
Collaborator

Both create multi-sheet PDF's for me.

However i did note something as i was experimenting...

 

The Publish settings are stored within the DSD file.

Changing them afterwards, makes no difference.

 

I noticed because the directory it tried saving the PDF was no longer valid.

Although i changed it for the publish options.

 

Overwriting the DSD, with correct options, solved the problem.

 

So, I'm guessing you created the .dsd file with options type set to "Single-sheet file"

 

edit:

You can edit the file using notepad or similar as it's a ascii file (aka TXT file), with a .ini structure.

 

[header]

key=value

 

Scroll to the bottom and you see all the settings. (in a more cryptic way as with the dialog)

under the label [Target] there is a key called "Type", if the value is 5, change it to 6.

 

Type=5 : Single-sheet files

Type=6 : Multi-sheet file

0 Likes
Message 3 of 5

jwhite
Advocate
Advocate

I run PUBLISH with the dialog and create a multi-sheet PDF and then save the .dsd file. I then run (vl-cmdf "-publish" "path&file.dsd") and it creates multiple PDFs. I'm using 2019 AutoCAD. Can you think of any other variables that may be affecting this?

0 Likes
Message 4 of 5

roland.r71
Collaborator
Collaborator
Accepted solution

@jwhitewrote:

I run PUBLISH with the dialog and create a multi-sheet PDF and then save the .dsd file. I then run (vl-cmdf "-publish" "path&file.dsd") and it creates multiple PDFs. I'm using 2019 AutoCAD. Can you think of any other variables that may be affecting this?


No.

 

I created 2 .dsd files. 1 with options set for single-sheet & 1 for options set to multi-sheet, made a compare and the only thing different is the value for type.

 

Changed it manually with notepad (textpad to be exact) & it worked.

 

When loading a .dsd file with the dialog, the settings from the file are ignored. (which made me frown, but that's what happens)

 

edit:

Are you sure that's how you run it?

If i use (vl-cmdf "-publish" "path&file.dsd") it says: unknown command .dsd & the .dsd selection dialog pops up. I tried without .dsd but then it says the "path+file" is an unknown command. Also tried C:\path, C:\\path & c:/path, nothing works ... (on ACAD2015)

0 Likes
Message 5 of 5

nikant
Community Visitor
Community Visitor

Try this scrit file (example "publish_all.scr")

I wrote a script file, not lisp file and this work for me

===begin script 

(setvar "filedia" 0)
(vl-cmdf "-publish" "d:\\Project\\p1.dsd")
(vl-cmdf "-publish" "d:\\Project\\p2.dsd")

(vl-cmdf "-publish" "d:\\Project\\p3.dsd")

(vl-cmdf "-publish" "d:\\Project\\p4.dsd")

(vl-cmdf "-publish" "d:\\Project\\p5.dsd")

(setvar "filedia" 1)

===end script script 

 

Work and this

(command "-publish" "d:\\Project\\p1.dsd")

.........................

 

ps: wow this post is from 2018 

0 Likes