cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Save Mathcad Prime Worksheet as pdf

jwehrstedt
Newbie

Save Mathcad Prime Worksheet as pdf

Hello,

I am generating a MathcadPrime 3.1 document with c# using the interop "Ptc.MathcadPrime.Automation.dll".

Everything works fine, but I like to save the worksheet as a pdf as well, I do not find the corresponding save as options, Mathcad 15  offered MCFileFormat.mcPDF format. Does something equivalen exist for MathCadPrime 3.1 .

´Thank you in advance

Jan

19 REPLIES 19

Re: Save Mathcad Prime Worksheet as pdf

Hi.

Not prety sure, but guess not: the avaible format is XPS (XML Paper Specificication) from Microsoft.

Best regards.

Alvaro.

Re: Save Mathcad Prime Worksheet as pdf

Yes. I would also recommend using an online free converter for your purpose. Maybe Converter365 will help you with converting xps to pdf. Good luck.

Re: Save Mathcad Prime Worksheet as pdf

Jan Christoph Wehrstedt wrote:

Hello,

I am generating a MathcadPrime 3.1 document with c# using the interop "Ptc.MathcadPrime.Automation.dll".

Everything works fine, but I like to save the worksheet as a pdf as well, I do not find the corresponding save as options, Mathcad 15  offered MCFileFormat.mcPDF format. Does something equivalen exist for MathCadPrime 3.1 .

Does the Prime automation contain a print method?  If so, could you try printing to pdf?

Stuart

Re: Save Mathcad Prime Worksheet as pdf

You need to "Print" to a pdf. If you do not have the option, there are free apps that will give you this ability.

Re: Save Mathcad Prime Worksheet as pdf

Thank you all very much, but it does not help really help me.

The API does not offer a print option and the windows explorer does not offer print for the document, therefore I cannot trigger it from outside.

It seems that you cannot use any other file format for saving.

Any more ideas?

Thank you

Jan

Re: Save Mathcad Prime Worksheet as pdf

I am using the Prime Express version of 3.1 (as well as a full version 3.0 and 15) and when I select PRINT it asks me to select a printer. I have two print to PDF apps (one of which comes with Microsoft Word) the other may have come with Mathcad 15. I just select "Microsoft Print to PDF" or "Adobe PDF" as my printer, press PRINT and I get a pop menu which lets me select the location I want the file to be saved to. As I said you can find print to PDF apps on the web that are free if you do not have one.

Re: Save Mathcad Prime Worksheet as pdf

Sure this works, but I want to generate the pdf using the API automatically.

I have no print function offered there and a pop up menu for the location does not help either, sorry

Thank you

Jan

Re: Save Mathcad Prime Worksheet as pdf

Re: Save Mathcad Prime Worksheet as pdf

Jan,

PTC does not even provide the option to "save as pdf" from within Mathcad, so I'm sure there's no option for it within the API.

I thought there was a "print all" option within the API.  However, I don't have access to Prime 3.1 on this computer, so I cannot check.  I know this option exists in the legacy Mathcad API (v15 & prior), so maybe that's what I'm remembering.  If you say printing is not available from Prime's API, then I doubt you can achieve what you want.

Re: Save Mathcad Prime Worksheet as pdf

Hi Jan,

I want to confirm what is the general consensus in this thread: Unfortunately, the Mathcad Prime API currently does not support a method to save as or print to PDF.

Luke

Re: Save Mathcad Prime Worksheet as pdf

Contrary to PTC's documentation, the API doesn't allow to print to any format, correct? PTC should probably go ahead and remove that lie.

 

2018-03-28_10-33-04.png

Re: Save Mathcad Prime Worksheet as pdf

Yep, all the sdk documentation for prime API from 4.0 to 5.0 claims you can print from the API.

Ridiculous, the people writing the api don’t even know what the limitations of the api is they are coding and documenting.

It is still being advertised as automating printing of documents . There is not print method exposed in the api.

A 4.0 to a 5.0 is a major release and there is zero improvement in the API

Re: Save Mathcad Prime Worksheet as pdf

There was no improvement on the API promised by PTC for the major update from 4.0 to 5.0...

The only thing about the API that may have changed, going from 4.0 to 5.0 is a major upgrade in price.

 

Luc

Re: Save Mathcad Prime Worksheet as pdf


@LucMeekes wrote:

There was no improvement on the API promised by PTC for the major update from 4.0 to 5.0...



Yes, that may be true. But it would have been an opportunity to either implement what the documentation/official description of the API erroneously claims concerning the ability to print worksheets  OR to correct the description of the API. Obviously neither was done.

The Prime 5 help still is flawed and misleading in this regard:

http://support.ptc.com/help/mathcad/en/index.html#page/PTC_Mathcad_Help/about_mathcad_and_automation...

 

Not that anyone who has watched the "development" of Prime for a while would have expected any substantial improvements done by PTC.

 

BTW, anybody remembers up to which version of Prime PTC claimed it would have an integrated spell-checker?

Re: Save Mathcad Prime Worksheet as pdf

Thru a fluke, I've discovered how to export PDF files from Mathcad Prime using automation. By explicitly adding the .pdf extension to the file name, a PDF file can be exported.

 

Here's a snippet of VB.net code:

 

Imports mc = Ptc.MathcadPrime.Automation

Dim ap As New mc.ApplicationCreator
Dim m_ws As mc.IMathcadPrimeWorksheet3 = ap.Open("C:\Users\xxx\Desktop\test1.mcdx")
ap.Visible = True
m_ws.SaveAs("C:\Users\xxx\Desktop\test1.pdf")

 

 

This snafu from PTC is just another reason why I'm always looking for alternative tools to Mathcad. They've ruined the suite.

 

@jwehrstedt @ClauPetrescu  @Werner_E  @LucMeekes  @jwehrstedt 

 

 

Re: Save Mathcad Prime Worksheet as pdf

It’s not a fluke. That option was not available for prior prime versions of the API. I’ve developed a lot using it. It was also widely advertised as a new feature for the api explicitly in prime 6. Unless you are saying you could do this in the Api for prime 5?

Re: Save Mathcad Prime Worksheet as pdf

The fluke was discovering this undocumented feature works with Prime 5.

 

Has PTC updated the documentation to show this feature in P6?

Re: Save Mathcad Prime Worksheet as pdf

Lol, yes they did. **bleep** I could have been using it for a year before....

Re: Save Mathcad Prime Worksheet as pdf

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."