I can also use priPrinter to plot to and there is a "save as PDF" but that is a slow way and the resulting PDF is not searchable.
Have been using priPrinter and before that Fineprint for more than 20 year.
All I need is to check a checkbox "Write To UNICODE" in settings in priPrinter.
So case closed!
Tools for export multiple layers as pages in a single PDF
Anyone knows a tool/or method for doing that?
I got a application for it but sometimes that app. is.. "fuzzy" so I want a backup method.
I can also use priPrinter to plot to and there is a "save as PDF" but that is a slow way and the resulting PDF is not searchable.
Edit: I also can, by script, create single PDF,s for each layer but then I need to put them together to one single file, easy but a moment extra.
Comments
-
I'm not completely clear on what you are after but there are a couple of routines on this page that might be a start for what I think you are looking for.
Once the layout is duplicated the required amount of times, then LAYFRZ which layers you want off in each layout and then PUBLISH them.
0 -
Thanks. I think that is all about multiple layouts. I have multiple layers.
I don't use Layout at all, only Model.
Let say I got 10 layers. All except two - actual looking layer and layer 0 - is frozen.
The result, regardless of script or third party software, is one PDF with first layer on PDF,s page 1, second layer on PDF,s page 2 and so on.
0 -
So is the PDF like the one I have attached to this?
The first page is showing all the layers just for clarity and all the subsequent pages are separate layers of the same drawing.
If you aren't using layouts then I can't see a way within Bricscad that this can work.
I know @ALANH has a routine that uses Ghostscript in the lisp to combine the PDF pages after they are created.
Hopefully, he will chime in with a suggestion.
Is there a technical reason that you don't want to use layouts?
0 -
Yes attached PDF looks good.
Using more than the one un-removal layout is not an option. Why use that when I have been not using it for the last 35 years? I'm drawing circuit diagrams.
0 -
Making a pdf by say picking window setting sheet size etc then just loop through the layers. Its easy to get a layer list There are various methods available.
(setq Layers (vla-get-layers (vla-get-activedocument (vlax-get-Acad-Object))))
(vlax-for lay layers (princ (strcat "\n" (vlax-get lay 'name))))
Then do a if checking is it one of the layers to not plot. If stuck post again for help.
0 -
Yes, I'm stuck. I got no skills or time for create code.
Try to explain more.
I can use my existing application in two ways.
- Like standalone GUI for combine selected layer as one PDF. This works just fine but I'm looking for a backup-solution. A another way to do that work.
- By a dialogue inside Bricscad where I can select layers to include and then execute a .SCR script for each layer.
By then selecting script A I can send each layer to a virtual printer where I then can select save as PDF instead of forward to a physical printer. Not good result, takes time.
By instead select script B I can convert each (selected in dialogue) layer to one PDF per layer.
Filedia
OFF
Exportpdf
"%f_%b.pdf"
Filedia
ON
%endSo for 200 layers I got 200 files.
By just drag them in to pdfarranger and then save as I got my resulting file.
After that cleaning up by delete the 200 PDF,s.
0 - Like standalone GUI for combine selected layer as one PDF. This works just fine but I'm looking for a backup-solution. A another way to do that work.
-
Some comments.
200 layers to set as yes/no can be done in a dcl list, www.Lee-mac.com has a nice one that allows you to select say layers and they are added to a second displayed list.
There is no reason to use a script, the lisp can read the layer names set required on/off etc and using plot do just that, the pdf name would be say DWGname-layername.
We plotted pdfs so if you want 150 of them then we used as part of the lisp to make a directory below the current dwg location. That way all pdfs were not buried in the dwg directory, here is code for that.
; check that pdf directory exists
(setq dwgpre (strcat (getvar "dwgprefix") "\pdf"))
(if (= (vl-file-directory-p dwgpre) nil)
(vl-mkdir dwgpre)
)Last comment "or time for create code" well I guess people like me don't necessarily have time to post Free code so think about what you ask for and the way you do it. I have been writing code for 40+ years. Over at Cadtutor 19k posts.
0 -
About my comment.
What I wrote is just true. Since I got no programming skills I first have to learn me that. Then I have to try and try again for finding a solution. That takes a lot of time. So instead I ask for a solution in forum. If nobody want to help by posting a solution (if there is) I fully understand that. (I have little harder to understand why just posting a little bit of code but maybe that takes shorter time to post?) To return to my question: I want a alternative, as kinda "second opinion", to what I already got and working - create a single PDF from a multilayer DWG.
Since there is a settings in Bricscad to export all layer in pdfexeport I now searching for a tool that can split a singlepage-multilayer PDF to a multipage-singlelayer PDF.
0 -
Post what you have done is always a good idea. Again once you have a Layer list its easy to set layers on & off and do the plot. I would make a dummy layer you may want to use "0" etc so set that layer as default then can just do a simple (command "-layer" "off" "*" "Y" "on" layername "") then do the PLOT.
The plot bit. Obviously you need to set the parameters for your title block and supply a pdfname.
(setvar "textfill" 1)
(setvar "fillmode" 1)
(COMMAND "-PLOT" "Y" "" "Plot To PDF"
"Iso full bleed A3 (420.00 x 297.00 MM)" "m" "LANDSCAPE" "N" "W" "-6,-6" "807,560" "1=2" "C"
"y" "Acad.ctb" "Y" "n" "n" "n" pdfName "N" "y"
)0 -
Thanks!
It seems that I need a virtual printer, like "Plot To PDF" for this? Which to use that can handle searchable text, including Swedish ÅÄÖ, and staple several printout for creating just one (1) PDF?
I got "Bluebeam PDF" but I haven't any clue where the resulting file ends.(?)
I anyway try by command line and there is no option for n in this part
"Acad.ctb" "Y" "n"Attached files:
test.dwg is just a dummy file containing three layer + (always) layer 0
projekttest.pdf is the result when using the application that works just fine mostly of time but sometimes strange things happens that is very annoying. (Developer is aware of it)Note there is also clickable links between pages (2-3 in PDF, 12-13 in DWG)
0 -
A couple of possibles look at image, when you add say Bluebeam as a windows printer it should appear in the list. If I am wrong do a support request. Maybe make it the default windows printer you do that via windows not CAD.
0 -
I got "Bluebeam Revu CAD complete" with no support for Bricscad…
Bullzip PDF can handle several printouts to one searchable PDF but when trying (using trial) I only get portrait in resulting file, regardless settings.
0 -
I can also use priPrinter to plot to and there is a "save as PDF" but that is a slow way and the resulting PDF is not searchable.
Have been using priPrinter and before that Fineprint for more than 20 year.
All I need is to check a checkbox "Write To UNICODE" in settings in priPrinter.
0 -
"Print as PDF," which comes with Bricscad, is a very good virtual printer.
0 -
How to save 50 printouts in same file then?
0 -
You can use the "One Multi-sheet file" option with the "Publish to: PDF" option of the Publish command.
0 -
NO! There is still no searchable text when using priPrinter. When I was trying, it was not the actual drawing(s) I tried on…
0 -
Yes but how to get all layer, in one file, as several pages?
Or how to publish by command line?-PUBLISH just open a dialogue.
0 -
@Mikael63, I have no idea if this is all possible with lisp (I suspect it is).
So all this would be part of the lisp routine.
1/ Select all the entities in model space that you want to make a PDF of.
2/ It would then make a paperspace layout for each layer (I don't know the limit on the amount of layouts you can have but you mentioned 200).
3/PUBLISH to one multi sheet PDF file, all the layouts and then have the routine delete all the layouts afterwards.
This would mean it was all done in Bricscad.
I'm sorry but like you, I can't write lisp files but I'm sure someone else here could help.
1 -
The dialog opened by the -Publish command is not the same as the dialog opened by the Publish command. You should be able to respond to it from the command line, by typing the name of the DSD file. And you should be able to use the -Publish command and DSD filename in a script or a lisp function.
0 -
I think publish by a DSD is about to list many dwg,s? I only got one.
0 -
Yes, a DSD file specifies the sheets in a drawing set by their path, filename, layout, and setup. If you're not willing to use layouts, then you'll have to write a lisp function of the type that Alan suggested. It would cycle through a list of layers, each time printing only the currently selected layer, and then combine all the PDF files into one. If no one here is willing to do all the coding for you, you could try asking at The Swamp:
https://www.theswamp.org/index.php?PHPSESSID=2b38369e9dbd41683ba3946b7fb0e949&board=2.00 -
(as I wrote earlier) This is what I already have:
By a dialogue inside Bricscad where I can select layers to include and then execute a .SCR script for each layer.
By then selecting script A I can send each layer to a virtual printer where I then can select save as PDF instead of forward to a physical printer. Not good result, takes time.
By instead select script B I can convert each (selected in dialogue) layer to one PDF per layer.
FilediaOFF
Exportpdf "%f_%b.pdf"
FilediaON
%endSo for 200 layers I got 200 files.
By just drag them in to pdfarranger and then save as I got my resulting file.
After that cleaning up by delete the 200 PDF,s.
So I "only" need the part that do the actual print. Which layer I want to include is already solved by a dialogue.
The SCR script runs..
FilediaOFF
Exportpdf "%f_%b.pdf"
FilediaON
%end..for each selected layer.
But instead of creating 200 files (to take care of as an extra moment) I want just one. I think this can be solved by Bullzip PDF.
I will try to check their support pages or try to contact them.Edit: Seems to be a well known issue, since at least 2008.
0 -
"I have no idea if this is all possible with lisp (I suspect it is)." yes you can do it with lisp doing a call to Ghostscript which allows you to combine single pdf's back into one pdf.
This is a code example that asks for a range of layouts plots to pdf then combines back into one pdf. You have to download Ghostscript as code is set to my last downloaded version needs Multi getvals.lsp saved in a support path as it auto loaded.
0 -
Mikael, is this what you're looking for?
0 -
I'm not sure what supposed to happen?
Using code from post #8 just keeps asking for a file for each layer.
0 -
Removed
Need a remove option !
0 -
Sorry wrong post still working on it
0 -
Mikael, this is really not that tricky. As David said in the beginning make one layout in modelspace with one window first page all layers visible. Now make a copy of the layout by "rightclicking" the first one. Now double click in the window then pick drawing explorer now VP Freeze all layers then "un freeze" the one you need. Repet this operation for all layers. Finally publish to one multisheet file.
If you have 10-20 layers this will only take a few minutes but if you have 200 its another story.
GOOD LUCK
0 -
If you have 10-20 layers this will only take a few minutes but if you have 200 its another story.
Well.. in my project right now I have 359 layer..
Generate them to one single PDF takes 1 minute, 15 second doing it normal way, if nothing "fuzzy" happens so all is halted.
(note! here without working xrefs between the pages for fair comparision)Running a script that create one dwg for each layer, [rename for sorting]. starting up "DWG to PDF Converter 2021 MX", drag all files in to it, convert, erase temporary dwg,s takes 12 minute.
Plotting all layer to virtual printer "priPrinter" and then Save As (one) PDF takes also 12 minutes. In this case, the resulting PDF is not searchable.
Exporting PDF with All layer settings takes about 4 second.
Okay, 359 is NOT normal but about 100 is not unusual.
0