Unable to load PDFOptimize plugin

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
chavas
User
Posts: 141
Joined: Tue Mar 15, 2016 12:21 pm

Unable to load PDFOptimize plugin

Post by chavas »

Hi,

I am using PDFXchange sdk with manifest files to OCR and Optimize pdf files in my service. I am loading two plugins for this- OCR and PDFOptimize. OCR plugin loads with out any problems but PDFOptimize plugin fails everytime. I have placed all the necessary files as far as I know. Here is the screenshot of my folder structure. I understand that I might be missing some files....but I don't know which ones. Can you have a look and tell me what is wrong?
PDFOptimize_plugin.png
Here is my code for loading the plugins- we are using VB.NET
Private Sub InitPDFControl(ByRef m_Inst As PDFXEdit.PXV_Inst, ByRef m_pxcInst As PDFXEdit.IPXC_Inst)
Try
Dim prefsPathStr As PDFXEdit.IString = Nothing
Dim licKey As String = mykey

Dim prefsPath As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\DV\settings.dat"


m_Inst = New PDFXEdit.PXV_Inst()

If prefsPath.Length <> 0 Then
prefsPathStr = m_Inst.CreateString(prefsPath)
End If

m_Inst.Init(Nothing, licKey, prefsPathStr, Nothing, Nothing, 0, Nothing)

m_pxcInst = CType(m_Inst.GetExtension("PXC"), PDFXEdit.IPXC_Inst)

m_Inst.StartLoadingPlugins()
m_Inst.AddPluginFromFile(Application.StartupPath & "\Common\Plugins.x86\OCRPlugin.pvp")

m_Inst.AddPluginFromFile(Application.StartupPath & "\Common\Plugins.x86\PDFOptimizer.pvp")
m_Inst.FinishLoadingPlugins()

Catch ex As Exception
writelog(ex.ToString)
End Try
End Sub

Rgds
Charu
You do not have the required permissions to view the files attached to this post.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: Unable to load PDFOptimize plugin

Post by Sasha - Tracker Dev Team »

Hello chavas,

Does it load correctly when you place the Plugins.x86 and PluginsData folder near the dll?
Also, does it load correctly in the simple program sample like FullDemo application?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
chavas
User
Posts: 141
Joined: Tue Mar 15, 2016 12:21 pm

Re: Unable to load PDFOptimize plugin

Post by chavas »

Hi Alex,

If I place the Plugins.x86 and Plugin Data folder near the PDFXEditCore.x86.dll it still does not load PDFOptimize plugin. However OCR plugin loads correctly.

In my sample project where I am using the PDF editor control by registering the COM component, the PDF optimize plugin loads correctly. I have installed the SDK and your end-user PDF editor on my machine. So my guess is that I am missing some dependency files/folder in my service. I have copied all the files from my sample project to my final project (OCR and Optimize service). OCR works fine but Optimize plugin does not load.

Rgds
Charu
chavas
User
Posts: 141
Joined: Tue Mar 15, 2016 12:21 pm

Re: Unable to load PDFOptimize plugin

Post by chavas »

Hi Alex,

My service is x86 build..does that make any difference? what is "PDFOptimizerx86.pvp" for?

Charu
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am

Re: Unable to load PDFOptimize plugin

Post by Sasha - Tracker Dev Team »

Hello chavas,

Are you using the respective plugin folders from the End-User Editor, or only a part of the files inside?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
chavas
User
Posts: 141
Joined: Tue Mar 15, 2016 12:21 pm

Re: Unable to load PDFOptimize plugin

Post by chavas »

Hi Alex,

I have shared the screenshot of my files in this thread. Pls see that and let me know if I am missing anything.

Rgds
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Unable to load PDFOptimize plugin

Post by Vasyl-Tracker Dev Team »

Hi Charu.

We cannot reproduce your trouble with loading the PDFOptimizer.pvp. If problem is still actual for you - please try the latest 358 build and let us know about result. Also please note that version of main dll (PDFXEditCore.x86.dll) and PDFOptimizer.pvp should be identical to avoid any potential incompatibility. To see build version of PDFOptimizer.pvp - just rename extension to dll and look to its Properties/Details in WindowsExplorer.

Cheers.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
chavas
User
Posts: 141
Joined: Tue Mar 15, 2016 12:21 pm

Re: Unable to load PDFOptimize plugin

Post by chavas »

Hi,

We have been able to resolve this issue. You can close this thread now. It was related to STA-MTA threads.

Rgds
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17960
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Unable to load PDFOptimize plugin

Post by Tracker Supp-Stefan »

:)