Get properties from PDF in customization?

I know that this is probably a stretch, but maybe someone knows a cool trick.

Anyways, we have the print size (A, B or D) stored in the part master for various processes. We have sort of smart part numbers so I can make a pretty educated guess on the print size, and that’s populated via BPM on part number creation. But there are times when the part number logic sets the file size as a A and it’s actually a B size because it needs more space. The same for B to D. So at some point in the process, someone needs to see that they don’t match and change it manually. I already have BAQ’s that go out and look for files to make sure that they are there. That’s super helpful. The next level of detail that I want is to try and check the page size properties, and compare it to the the Part master value and bring up a some sort of notification if they don’t match (or set it automatically).

Can I get to this property in a file? My googling is showing mostly stuff about setting printing properties, but I just want to read a file property. Unfortunately, I think this one is actually buried in the file so I don’t know if I can get it without opening the file.

But, speaking of opening the file, where I am looking to make the notification, I have the print being read in a URL viewer, so the file is opened there. (That’s where I want the user to “notice” that they are different, but sometimes it’s hard to catch that they are different) So is there an event with properties that I can get when the page loads in the URL viewer that I can compare to the part master value?

Anyways, I’m sure this is probably pipe dreams, but I figured I would throw the question out there, because I would guess I’m not the only one that would think this sort of thing could be useful.

iTextSharp Library will let you read PDF’s in C#

I was finding a little info on that. If I were do use that, does that mean I have to install that dll on every computer that would use this?

Yes but you can push the DLL out via a sysconfig change fairly easily. On the server side.
I supose you could also use a BPM instead but you’d have to get the file to the Server… (some how)

Well, the files it would be looking at are all located on a server, not technically the same one, but it has access to them. I could put the BPM on the BAQ so it runs whenever it refreshes. I’ll have to see if I can figure it out.

1 Like

Here’s a newb quesion. If I get that dll, is this where it goes on the server to be available in a BPM?

C:\Epicor\ERP10.2Client\Client

no on the server it goes

EpicorDrive:/WebFolderWhereEpicorIsDeployed\Server\Customizations\Externals\

This is getting over my head fast. I think I’ll shelf this idea for later.

1 Like

I can’t believe this is a post. This is almost exactly what I’m trying to do. I was trying to get at the keywords property within the PDF. Bummer that you didn’t ever get it figured out. I would say custom DLLs are probably a no-go. We have enough trouble just getting through the day doing our normal day to day stuff without breaking something.