How to change default output launch application in Altium? - altium-designer

I am designing a PCB board using Altium software. I am trying to generate output in pdf format. Output file is generating properly. And we can see the resulted pdf in file explorer.
But after generating output file, Altium is launching Microsoft edge to show the resulted pdf and We would like to launch chrome/Adobe Reader to display result instead of Microsoft edge.
Appreciates for the response.

I think it is not Altium related settings and Altium uses Windows's default program list to launch programs. Maybe change Windows default programs and give that a try? Default programs list by file type can be found under System Settings>Default Programs>Choose Default Apps By File Type.

Related

Visio .vsdx format unzip and zip corrupts

I'm attempting to modify a Visio file (Open XML format) without having to use the Windows Visio application. My first experiment is just to use 7zip to unzip a known good .vsdx file that was created using Visio. That is all good; I can view the content of the package. Without making any modifications, I use 7zip to re-zip the content and renamed to .vsdx, but when I tried to open the resulting new file using Visio, it complains that the file is corrupt. Is there a way to manually re-zip the content into something that Visio accepts as a valid Visio file? I suspect that there may be some sort of checks for the validity of the file, but can't find what that may be. Thanks for any input.
I would use some form of OpenXML library to get at the file's guts using some sort of "approved magic".
Understanding that you might not want to do whatever you're doing via programming, I looked for some sort of free editor.
I found this free plug-in for Visual Studio:
https://marketplace.visualstudio.com/items?itemName=bsivanov.OpenXMLPackageEditorforVisualStudio
It works in the free "Microsoft Visual Studio Community 2019" as well. I just opened the dev environment (aka: the application) and dragged a Visio .vsdx file into the app. It opened with a tree-like editor. I was able to dig down until I found the visio > pages > page1.xml "leaf". Inside there, I was able to change some text on a shape, then save the "package".
Whatever this tool does, it saves the file properly, and I was able to open the altered .vsdx file in Visio. And the text that I changed in the editor was indeed changed inside of Visio!
I think I've used this in the past:
"Welcome to the Open XML SDK 2.5 for Office"
https://learn.microsoft.com/en-us/office/open-xml/open-xml-sdk
https://github.com/OfficeDev/Open-XML-SDK
To edit Visio files without the Visio application, you'll still need to understand how Visio works, to some extent.
A simple example:
I changed the text on a shape fairly easily within one of the page.xml files. That was easy. Then I wanted to add a copy of that shape. It was simple enough to copy and paste the whole xml block for the existing shape, then change the PinX and PinY attributes to move the shape to a different location on the page.
But you won't see that shape unless you give it a unique ID within the page. I tested deleting the ID attribute (to see if Visio would figure it out on open and assign one automatically), but it didn't work. If the ID is the same as another shape, the shape is ignored when you open the file. Once I changed ID to something unused, I did see the new copy of the shape.
If you create grouped shapes, or shapes that have advanced behavior (SmartShapes, ShapeSheet formulas, etc.), then this could get complicated. As formulas need to reference other shapes by ID, so you need to manage the IDs! For simple boxes and lines, etc., it might work well (and fast) to generate these things via OpenXML. Good luck!

Is it possible to write a binary file import extension for vs code?

I want to display some informations of a binary file in vs code.
Is it possible to write an extension for vs code, such that when selecting that file in the Explorer (or opening it directly) you see some text extracted from the binary file by that extension?
So the core functionality of that extension would be (simplified) a binary to text converter.
Any suggestions?
The VS Code team member has confirmed they do not have support for registering content providers for binary files in my issue.
I've inspected the workspace.onDidOpenTextDocument and window.onDidChangeActiveTextEditor APIs, but neither seems to be called when opening binary files.
Is there a way to display fallback content using registerTextDocumentContentProvider (or otherwise) for binary files?
That's why these types all carry Text in their names, TextEditor, TextDocument, etc. They can only handle textual, not binary data ;-)
No explanation as to why this works for PDFs, probably special-cased.

How to create a printerSettings file

When I change printer settings in Xlsx file, then saving and unzip it, I can see printerSettings folder that contains a printerSettings1.bin file.
But, when I do the same with Docx and Pptx - there is no printerSettings folder nor printerSettings1.bin file.
What do I have do to save the Docx/Pptx files while saving the printer settings in a separate file?
Excel, PowerPoint and Word are all different apps. They share quite a few features but each has its own feature set. PPT doesn't save printer properties the way the other Office programs might. In fact, I'm pretty sure it doesn't save anything unless the user specifically goes to File | Options | Advanced and instructs it to use the specified (limited set of) properties when printing the current presentation.
In that case, it stores the properties to be used in \ppt\presProps.XML

Programmatically convert Doc(x) files to PDF using Microsoft Word

We are developing a Java application that needs to programmatically convert .rtf, .doc and .docx files to PDF files.
Formatting is important to us, so we need the page numbers to be the same between a source file and a target PDF file, and the contents of each page being the same as the original file.
We have tried out open source solutions, such as JODConverter to invoke a LibreOffice of OpenOffice installation, Docx4j and XDocReport. The best formatting was achieved with LibreOffice. However, even in that case, the pages were different (for example, a 87-page .rtf file results in an 80-page PDF file).
So, we think that the ideal way to make the conversion would be to somehow invoke Microsoft Word though our Java application, and make the conversion with it. That would produce PDF files that have the same formatting as the original files.
Is this possible in any of the following ways:
An API that is directly invokeable through Java?
An API that is invokeable through a .Net language and we would use that with something like JACOB?
A 3rd party library that uses a Microsoft Word installation under the hood (something like JODConverter for Word)?
A CLI interface supported by Word (relevant question)?
Something else?

How do I script converting a .psd or .ai file into multiple sized PNGs?

For iPhone programming, I need my application icon in many sizes.
Rather than have my designer export one by one, is there a way I can script photoshop, illustrator, or just use Python or something to convert a .PSD or .AI file into several different sizes of .PNG?
My best guess would be to create an action in Photosop (sort of making a Macro) and doing a batch in the File -> Automate -> Batch option.
Check this link out for more info (Mac based tutorial but i've done it in the PC version).