VB.Net plot to PDF file using anything other than 'DWG to PDF.pc3'

VB.Net plot to PDF file using anything other than 'DWG to PDF.pc3'

albarney99
Advocate Advocate
749 Views
5 Replies
Message 1 of 6

VB.Net plot to PDF file using anything other than 'DWG to PDF.pc3'

albarney99
Advocate
Advocate

Has anyone had any luck doing this. I posted here awhile ago and didn't really get any help

Plotting in VB.net using Bluebeam PDF.pc3 - Autodesk Community - AutoCAD

 

I ended up giving up and using 'DWG to PDF.pc3' but there are a few reasons I want to use Bluebeam (SHX Fonts removed and Page Orientation issues) but I am having no luck at all.

I have tried all variations of CanonicalMediaName ("User135", "135 595 842" which is name returned if you print it) and nothing works. I can get a PDF using "135 595 842" but it is corrupted and won't open in Bluebeam or Adobe.

I also tried using the default installed 'PDF Report Writer' and 'A1' in the 
my_plotsetvalidate.SetPlotConfigurationName(my_plotset, "PDF Report Writer", "A1")

 

Tried different PC3 files, PMP files, Page sizes etc and nothing is working.

 

Any help appreciated.

 

0 Likes
750 Views
5 Replies
Replies (5)
Message 2 of 6

Ed__Jobe
Mentor
Mentor

Try using just "User 135".

If you look at the signature for the CanonicalMediaName property, it is only a single string. And in this case, it is just the name of the page. If you want a quick test to see what the name is, this VBA can be quickly run to find out. Just paste it into a module, turn on the display of the Immediate window and run the sub.

 

Sub CMNprint()
    Debug.Print ThisDrawing.ActiveLayout.ConfigName
    Debug.Print ThisDrawing.ActiveLayout.CanonicalMediaName
End Sub

 

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 6

albarney99
Advocate
Advocate

I tried all that. That is where I got the User135 and the "135 595 842" from.

The User135 used to be the old Printer names in registry for Bluebeam and it seems they are now the '135 595 842' as per attached imageBB_Reg_Plotters.png

 

I saw this post with a similar issue so am wondering if Bluebeam needs to do something to the PDF that is output for it to work.
https://forums.autodesk.com/t5/net/plot-to-pdf-using-pdfcreator-driver/m-p/5851087

 

0 Likes
Message 4 of 6

Ed__Jobe
Mentor
Mentor

Interesting...I just ran the code I gave you and for ARCH D size, I get "User350". Below is my reg for that hive. Mine are all listed as "User###". Maybe there's an issue with your Bluebeam? I just got an  upgrade last week. Try installing 20.2. BTW, you never said what type of an error you're getting. Have you tried:

CanonicalMediaName ("135 595 842" )

2022-05-13_07-22-43.png

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 5 of 6

albarney99
Advocate
Advocate

Hi

The PDF Creates ok but it is corrupt and it can't be opened. I get the error below when trying to open in Adobe and it won't open at all in Bluebeam. File size of this corrupt PDF is also much larger. If I plot it using Bluebeam in the Plot window it is about 400kb but the output from here is closer to 8Mb.

 

I have reached out to Bluebeam Support and they say they only support plotting using the Add In inside the program although they are going to have a further look at it.

 

Have tried the '135 595 842' and 'User136' etc and all that actually plot the PDF still have the corrupt PDF output.

 

I still suspect the Bluebeam plot process does some post processing after plotting from AutoCAD that is not done when using the PC3 programmatically similar to the PDF Creator link I mentioned last time.

 

albarney99_0-1652653727581.png

 

0 Likes
Message 6 of 6

albarney99
Advocate
Advocate

Quick update - Bluebeam confirmed they post process the output but what they do is unsupported and they can't tell what I need to do to replicate it.

0 Likes