The python script allows Ghostscript to create PDF from Revit with the following features
a. Customized PDF naming - achieved via a parameter
b. Customized File Location
c. AutoDetect titleblock sizes A0, A1, A2, A3 and A4 - achieved via a parameter and predefined print settings
d. once a parameter is added on the sheet you can filter this so you can only create PDF based on this filter
There are couple of instructions on how to do this and once set-up (one time) you can use Ghostscript as a normal PDF creator - Solely for Revit only.
As I said its work in progress so bear with me…thanks…
Continuation…
Setting up Ghostscript and Redmon
Download (from the link above) and Install Ghostscript 64 bit and Redmon 64 bit, just standard install
Create folder on your C:\ drive named “GhostscriptPDF” and a sub-folder “PDF_RevitExport”
Note: Please make sure you have a “SheetSize” parameter and your printsettings name should be like “Ghostscript_A0” etc.
enjoy…and lastly I have no association nor connection to Ghostscript and Redmon I just use it coz its currently free and it works…pls. save your revit model before trying any graphs…
@Konrad_K_Sobon no question just simply sharing my code for an alternative way on creating pdf from revit. It will be great if there is another category for work examples as you suggest. I have other graphs (simplified) version that would be useful.
I’m all for adding a “WIP” category or some such if it looks like something that is starting to emerge . . . are there other posts you can think of that his this kind of subject? The DynaShapes post is the only other one I know of
Yeah these are not questions so i would at least like to see them be categorized differently. It’s nice to have a place to drop work examples, and working scripts/definitions.
If you add WIP, then challenges could be a category too?
For the crazy ideas that could leed to… who knows what, a pool of creativity, like the one that created Dynamo in the first place
Coming back to the original post …
This looks really interesting, though I see margin for optimizing.
Firstly the necessity of managing print settings for each page size is annoying…
The Installation of various programs is another thing which minimizing would do good. What does redmon do ghostscript cannot do?
I would like to propose the following changes: Just print all pages to the maximum page size and crop the pdf afterwards page by page using al crop matrix prepared by dynamo. I am not a programmer, but I can contribute the necessary ghostscript code for cropping… anybody interested?
Apologies as my original post are not complete and less explanation, below are some additional information
Yes you are correct, couple of program installations are a bit annoying and not to include the settings and making it to work to what you want
But, I must stressed that whatever time and annoyance was involved if you get the results you desire I think it’s all worth it.
The reason for this post was to introduced an “alternative” solution to the current issue on Plotting to PDF from Revit
These are the common issue,
Quality of the output PDF
Filename of the output PDF, generally a user wants to have his/her own filenaming convention
Is the PDF creator/printer free?
Is there an Auto-save function? Generally any free PDF creator/printer out there that has an Auto-save function are not free (Adobe Acrobat for example)
PDF Creator (the actual name of the program) has an Auto-save function but needs a lot of setting up to achieve per machine if used
If you need to plot to different sizes you need to set this up on Revit and match every single sheet to the PrintSettings (in Dynamo)
And lastly the time you spent making the dynamo graph to work depending on the complexity either you need to plot to a specific paper size or Printsettings etc.
So currently in the Revit world (without the use of Dynamo or paid PDF creator programs) there’s still a lot of settings you need to do (i.e Print Settings, Renaming of the PDF)
As an alternative to the current “Norm” on Revit using Dynamo to create PDF, why not use Ghostscript, Python and Redmon to achieve all of the above in one sweep
Ghostscript is a free PDF printer (used by so many PDF programs like CutePDF, PDF creator to name a few), Redmon is a “Printer Port” or Redirected Port Monitor (it’s not a printer)
The magic happens when you PDF via Ghostscript, it sends it to the Redirected Port Monitor “RedMon” and plots it to PDF.
Where is the “Magic” Redmon has the ability to redirect/sets the PDF to
Pre-defined Quality
Location of the output PDF
The FILENAMING convention
It can also set to plot to JPG, TIFF and EPS (this is an extra bonus)
Now, how will all this works on Revit? Luckily we have Dynamo, Dynamo Player or Dyno Browser
I have made a Python script attached above to be able to achieve this “Tall Order”
The python script includes and can be downgraded to the user’s taste (needs a bit of know-how on coding)
It can distinguish what Sheet size and apply the appropriate print settings (you need to have a Sheetsize parameter and pre-defined Print settings)
You can have any file naming you want
Plots, Wait until next one is finished and AUTOSAVE to the folder location of your choice
It create/writes the settings for Redmon to used (very important)
And yes you are right there’s a bit of coding and only few probably would understand what I have written above and be able to manipulate it to suit their needs and even to what you suggested
I will create a new code based on your suggestion and post the graph
Hey 4bimfercesp,
I am glad you are interested. Maybe we can make this work like a charm…
I have developed a ghostscript post processing of multipage pdf files a couple of months ago. It works the way described above. KenS from Artifax (owner of ghostscript) was so kind to help me with the appropriate Postscript commands.
My workflow basically needed a pdf-printer (I use pdfcreator, too) and ghostscript to do the post-processing.
There is one potential problem with my workflow: the cut area may still contain drawing elements which contribute to the file size and may contain (invisible) information not ment to be published…
@j.pf
The multiple pdf is already available in the archi-lab package and it can be found in the forum how to set it up
Whats not available was autosave (depending on your pdf writer) and custom filenaming (achievable but a lot of nodes need to be used) and eveything needs to match depending on your list of sheets to print and also papersize recognition is an issue. As i explained above this can be done using the above Ghostscript.
I am not sure why you would use pdf creator with your ghostscript. As far as i know PDF Creator is built using Ghostscript and also CutePDF uses Ghostscript. Are you aware that Ghostscript is also a PDF printer? Whats its lacking is a port to use and this is why i used redmon.
I would suggest you try the above and see the difference to what you have done. I am sure you will have question but if you follow the above video for setting up (takes only 10mins) install and setup.
I tested @4bimfercesp customized PDF creation node and so far it works great. But i would like to optimize it a bit further - there is python package for ghostscript https://pypi.org/project/ghostscript/. As I understand, with this package installed, there would be no need to use port redirection and write a rsp file each time printing a PDF page. Is there any way to install this package to the Iron Python that dynamo uses?