The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
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
Hi.
Not prety sure, but guess not: the avaible format is XPS (XML Paper Specificication) from Microsoft.
Best regards.
Alvaro.
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.
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
You need to "Print" to a pdf. If you do not have the option, there are free apps that will give you this ability.
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
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.
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
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.
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
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.
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
@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:
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?
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
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?
The fluke was discovering this undocumented feature works with Prime 5.
Has PTC updated the documentation to show this feature in P6?
Lol, yes they did. **bleep** I could have been using it for a year before....