AI in Action: Developing a Win2PDF Plug-In as a Practical Case Study

In our previous blog post, we explored how effective prompts can be used to create Win2PDF Plug-Ins with AI chatbots. Today, let’s examine a specific customer solution we developed.

Customer Requirement: Every time a Technical Bulletin is saved as a PDF, the customer needs the first page—containing a summary description—saved as a JPG image. This allows them to display the summary image on their website, linking it to the full PDF bulletin for download.

Solution: There are multiple ways to automate this process. One efficient method involved creating a Win2PDF Plug-In with minimal effort using Microsoft Copilot. Here’s how we achieved it.

1. Use AI to generate a Powershell program for the Plug-In

In our example, we’re using Microsoft Copilot but you can try using any AI chatbot.

For the first prompt, copy ALL of the documentation text for the Win2PDF PDF to JPG Command Line and paste it into the chatbot.

Copilot acknowledges the input of reference documentation and asks if we have a specific task using this information. Since we do, we’ll enter our prompt for the customer requirement, including the programming language, the Win2PDF command required for the Plug-In, and the desired JPG resolution.

Write a Win2PDF plug-in in Powershell that takes a single parameter with an input PDF and uses the Win2PDF command line option “PDF2JPG”. The plug-in should save the first page of the PDF as a JPG image with 200 DPI resolution.

Here are the results returned by Copilot:

We’ll then save this Powershell code as a text file located somewhere on the hard drive where it is accessible, such as:

c:\users\test_ai\SaveFirstPageAsJPG.ps1

There was one small edit required, which was for the path for the Win2PDF Desktop program ($Win2PDFPath). Since we’re using a 64-bit bit version of Windows, the Win2PDF Desktop program on my PC is located here:

C:\windows\system32\spool\drivers\x64\3\

In this example, we used PowerShell because it’s easy to use and doesn’t require compilation. Alternatively, you can adapt your prompt to use C#, VB.NET, or any other programming language if you prefer a different approach.

2. Change the default execution policy on your PC.

Since our Plug-In is a Powershell script, we’ll need to change the default execution policy on our PC to allow scripts to run.

  • Start Windows PowerShell with the “Run as Administrator” option. Only members of the Administrators group on the computer can change the execution policy.
  • Enable running unsigned scripts by entering the following and choosing [A] Yes to All:

set-executionpolicy remotesigned

This will allow running unsigned scripts on your local computer and signed scripts from the Internet. This will change the policy permanently.

We can test our script by opening a command prompt and typing

powershell -F c:\users\tmp\SaveFirstPageAsJPG.ps1 c:\testTechBulletin.pdf

3. Use the Win2PDF Administrator Utility to use this program when creating a PDF file.

Finally, download and install the free Win2PDF Administrator Utility.

To use this as a Plug-In, open the Win2PDF Administrator Utility and enter the following command under “Run this program after PDF creation (optional)” on the File Name tab:

powershell -F c:\users\tmp\SaveFirstPageAsJPG.ps1

Then click the “Apply” button to save this command a Plug-In. [Note: The Win2PDF Administrator Utility will automatically add a “%s” argument to the end of the command when saved, so Win2PDF will automatically pass the PDF file name to the Plug-In.]

If you’re not familiar with Powershell programming, check out Microsoft’s online documentation for assistance or better yet, ask your AI chatbot for help.

4. Test the Results

Create a new technical bulletin and print it using the Win2PDF TechBulletin printer. Once complete, confirm that both the PDF file and a JPG copy of the first page are saved in the same location.

This simple example demonstrates how quickly and easily you can automate a workflow when an out-of-the-box solution isn’t available. You could expand this process further—for instance, by resizing the JPG or moving it to another folder—but this provides a clear idea of the steps to create your own Plug-In.

If you get stuck, don’t worry. Just ask and we’ll help.

The Mobile Arms Race: Microsoft’s Copilot+ PCs Challenge Macbook for Edge Computing

Windows for ARM

Last year we announced limited support of Win2PDF for the next generation of Windows for Arm devices, which is Microsoft’s response to the growing popularity of lightweight, mobile friendly computers like the Apple MacBooks.

Now we’re back with an update featuring recent developments in this area.

First, let’s look at what’s new with Microsoft and Windows for Arm?

Microsoft Copilot

A little over a year ago, Microsoft introduced Microsoft Copilot, an AI assistant built into Microsoft 365 apps and Windows that uses large language models to help with writing, editing, and analyzing content across Word, Excel, PowerPoint, Outlook, and OneNote. It summarizes documents and emails, generates formulas and analyzes data, drafts replies and suggests follow-up actions, and even creates images.

Currently, most of these AI tasks are handled in the cloud because of the intensive processing required. While this is efficient in terms of performance, it comes at the expense of security risk and user control.

Copilot+ PCs

Now, Microsoft has announced a new class of computers called Copilot+ PCs that continue to expand the use of AI on the local hardware. The first batch of these new PCs, from PC manufacturers like HP, Acer, Lenovo, Samsung, and Dell, as well as Microsoft’s own Surface Laptops, feature a new Arm-based neural processing unit (NPU) powered by Snapdragon® X Series chips. Microsoft’s Satya Nadella talks about these Copilot+ PCs and how they align with Microsoft’s vision in this Wall Street Journal interview:

Interview with Microsoft CEO Satya Nadella

Essentially, Copilot+ PCs will bring AI processing closer to the “edge”– the local PC. With its ability to do more complex tasks at a greater speed and with less power, this finally positions Windows PCs on an even footing with Macbooks in the mobile computing market.

Win2PDF & Support for Windows for ARM

Will Win2PDF work on ARM based Copilot+ PCs just like existing PCs?

YES.

Many software applications can support ARM by simply emulating the Intel instruction set on Windows for ARM processors. While the compatibility (and performance) of existing applications under emulation is great, there is no emulation layer for print drivers like Win2PDF. These drivers still must be developed separately for ARM-based PCs, and many other printer-based products do not currently support them.

The new Win2PDF release will include a new printer driver for ARM based PCs. The setup program will automatically detect ARM based PCs and will install the correct version of the printer driver. As far as the end-user is concerned this will be completely transparent; there is no difference in how Win2PDF will install or work on the new PCs.

The History of Win2PDF OS and Hardware Support

How does Win2PDF fit into this new mobile landscape? Let’s look at our history.

Win2PDF was initially developed in 2000 for PCs running on x86 (Intel & AMD) chips on Windows NT. Since the introduction, we’ve continued to support new versions of Windows (Windows 2000, Vista, 7, 8, 10, 11) and new processor architectures.

With our upcoming releases, we’ll not only support Windows XP through Windows 11, but we’ll also support x86, x64, and ARM64 architectures. There are very few PDF software developers that still support this continuum of operating systems and architectures. Companies standardizing on Win2PDF will be able to use the same version of Win2PDF across the organization.

Stay tuned

Over the next several months you’ll see new release updates to Win2PDF that will continue to support this next generation of Copilot+ PCs.