Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
Farookey

Creating PDFs on print

Recommended Posts

Hi there,

This may have been dealt with already, but I cannot seem to find it.

Is it at all possible to have a document saved as PDF automatically on printing? or prompt to save as PDF when the print button is pressed? Maybe this may require some type of script.

Please help with this if you can. I have almost no knowledge in creating scripts. Working on Snow Leopard, VW 2011.

Thanks

Share this post


Link to post

I remember looking into this some years ago with VW 12.5/2008, and having to use CUPS-PDF to create a virtual printer: http://hints.macworld.com/article.php?story=2007082812233971

Much as I'd have loved to use the built-in batch PDF export routines, our regular service bureau uses an older PDF rasterizer. The rasterizer would choke on PDFs produced directly through the Vectorworks embedded PDF framework, but would be OK on ones produced using OS X's built-in PDF generator. Go figure.

Share this post


Link to post

Hi Ryan,

Thanks for replying to my very first post on this resourceful community board.

The issue I/we have is not printing PDFs.

What I am trying to achieve is that when one prints a hard copy of a file, either a PDF (soft copy) is automatically created on clicking 'print' or there is a prompt to save as PDF (once the 'print' hard copy is executed).

So in essence, when one prints a hard copy, they automatically also have a PDF version of it.

This automation would ensure that PDFs are created (as is wanted by the boss), each time a hard copy print is made for an issue. The PDFs work as a snapshot of that particular drawing at that particular time.

Is this possible?

Thanks

Share this post


Link to post

If the boss truly wants a PDF "Copy" of what is being printed, then you should really make the PDF first and then print that.

If you are on Mac, you should be able to save the PDF to a "Watched" folder and have anything that goes into that folder be printed. It might take a small amount of Automator or Applescript to make this happen.

If you don't make the PDF first, you have no way of knowing for sure that the hard prints and the PDF are identical.

Share this post


Link to post

Hi Pat,

I'm usually always 'listening in' to your replies and vast knowledge, so let me first say that it is a privilege to reply to you.

The idea of the PDF creation is to have a digital snapshot of the drawing at that particular time in the project. We do not normally have any issues with the hard copy not being identical to the PDF versions of the same (using the 'Save as PDF' function).

The PDF creation has been the boss' desire for a while and as I have only recently joined the firm, I would like to increase productivity in any way possible. Actually I am currently in charge of setting up an office standard and ensuring that all users receive the same default settings etc. That's another issue all together and I am sure I will have questions in the near future about this.

For now though, the reason I would have preferred using the 'Print' button to perform dual commands (i.e. print hard copy AND save a PDF/prompt to save a PDF), is because it has become a habit for persons to print through Vectorworks and (due to human nature) forget to save the PDF.

I am also aware that this is not necessarily something that can be solved through VW, but I figured that maybe someone would have a workable answer to my needs. I am not yet that knowledgeable in Applescript or Automator, and would appreciate if someone can assist. I do not wish to complicate things either, in which case it may just be more efficient to drive the staff to NOT FORGET to save a PDF (of an issue) when printing it.

What I wish to do, seems simple. But I guess it's not.

...sigh...

Share this post


Link to post

Just create a custom workspace with the Print command missing.

Share this post


Link to post

In a way summarizing some of the above suggestions.

Disable Print so export PDF or batch export PDF are the only options available.

Have the PDF exports land in a watched folder which is set to print automatically when a new PDF arrives.

Share this post


Link to post

I figured you were gonna say that...

The office is accustomed to using the print function and the Save as PDF function, as opposed to the export PDF option.

I apologize if it seems that I am being difficult, but I wish for a solution which is the LEAST complicated for each user (if possible of course).

Share this post


Link to post

Export PDF (Batch) is quick and has the advantage that it produces a single document containing all of the drawings being printed (or issued). Printing from that PDF then becomes a one step process. The advantage of this method is that there is a clear record of what was printed (or issued) and no possibility of someone saying that they didn't receive a drawing. The problem is that whilst this works it is still a manual system.

What Vectorworks needs is a proper publishing system where:

  • The user can choose to print to paper or print to PDF or issue 2D DWGs or any combination of these three.
  • A record of what has been issued and how is kept and a document transmittal note is printed showing this.

In other words an automated system that handles this routine task that is performed many times during a project.

Share this post


Link to post
I figured you were gonna say that...

Not really into answering rhetorical questions.

Share this post


Link to post

Here is a simple crude vs (sequence of commands) that comes close

to what you described:

DoMenuTextByName('print', 0);

Message('Next, Save as PDF');

DoMenuTextByName('print', 0);

clrmessage;

This set of commands will call the the print command twice.

The first time the user can print the file, next there will be

a message displayed on screen "Next, Save as PDF" which

you can change per your needs. At the second print dialog

the user can save the file as PDF.

You can copy the vs commands above and create a

vs command Tools/Scripts/VectorScript Plug-in Editor...

which you could label "Print", or "Print & PDF", next edit

the workspace (or a copy of ) Tools/Workspaces/Workspace Editor

remove the Print command (or not), and add the new

"Print & PDF" command in the File menu.

BTW, I am not a vectorscript programmer beyond a few command lines.

Share this post


Link to post

WOW...

Honestly George... THIS IS BEAUTIFUL!

...and so simple. A great base for starting something here.

Now the next step would be to spice up the message portion a little. Is there any way to create a pop up (prompt) where the user can click 'YES' or 'NO' and ONLY with the affirmative will it open the next print window to 'Save as PDF'?

The coolest thing would be; the prompt itself includes (only) the 'Save as PDF' button, but that's maybe pushing it a little (as I believe this feature would require to combine applescript since that function is outside of VW (vs), but correct me if I'm wrong)

Again though George.... BEAUTIFUL... JUST BEAUTIFUL...

(it's a pity you can't 'LIKE' posts in this community...lol...)

Share this post


Link to post

Hi Farookey,

Here's a version with an AlertQuestion dialog. To get at the "Save as PDF" you would (as you mention) need Applescript.

----------------------------------------------------

DoMenuTextByName('print', 0);

CASE AlertQuestion (

'Would you like to print to PDF?',

'You will be required to save the PDF through the PDF menu in the Print dislog.',

1,

'Print to PDF?',

'No Thanks',

'',

''

) OF

1: DoMenuTextByName('print', 0);

END; {CASE}

----------------------------------------------------

Share this post


Link to post

Hello Matt...

Loving it!

Except for one minor flaw... diAlog instead of dislog :)

I can possibly propose this to the boss now. In fact, I might just do that right now!

Thank you both; George and Matt.

This works for me, but (not meaning to be a pain or anything), can applescript be easily incorporated to 'Save as PDF' directly, and therefore eliminating one step?

I have to learn this VS btw... any tips on where I can find easy to understand documentation?

...BEAUTIFUL!...[sigh of contentment]

Share this post


Link to post

Hi again...

Proposed it to him... and he LOVES it...

Can't REPLACE the 'Print' command for obvious reasons... so deleted the shortcut key for it and placed it on the new 'Print & PDF' command - Print & PDF = [command] + P.

The rest of the staff should hopefully be reminded to make PDFs each time they go to print a document. It's a pity that the Export PDF (Batch) is not available in VS as yet. With the custom sheet border title blocks I just created, the automation (sheet number + sheet title .pdf) would work a charm.

Matt, and even George, if you read this and can shed some light on my other requirement/wish list (to do with revisions in sheet border), I would appreciate it.

http://techboard.nemetschek.net/ubbthreads.php?ubb=showflat&Number=152454

Thanks

Share this post


Link to post

You're welcome Farookey,

And there's plenty more typos where that came from. :-)

Good to hear the boss love it!

As for your other request, that would take some time to look into to see if it can be done. Then it would take some more time to write. I'm afraid this could get into more time than I can spare. Sorry...

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×