Open IPXV_Document without UI?

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.
Post Reply
DolphinMann
User
Posts: 158
Joined: Mon Aug 04, 2014 7:34 pm

Open IPXV_Document without UI?

Post by DolphinMann »

Not sure if this is the right forum, but basically I have some confusion at times between the Editor SDK and Core SDK. I know core is contained within the Editor, but it seems the Editor has the bulk of the functionality that I need. However the Editor SDK seems to be strongly based on a UI which is problematic for my application running as a Windows Service. Anyway, I do seem to be solving most of my functionality issues, but I am confused I think about some of the more generic stuff. I also did not find good answers on the forum or API reference/samples, but maybe I am missing something.

I am trying to do what you have in the following sample: https://sdkhelp.pdf-xchange.com/vie ... ges#Sample
Essentially export a document to TIF or do something with that document. The code all makes sense, but here is where I am lost!

The input to that sample, and many others I have found links to, all take a IPXV_Document. But all I have is a filename or string as I do not have any instance of the PDFCNTRL activeX viewer.

I was able to open a document from just a string with "OpenDocFromPath" function, but this required a "MainFrame" object to be created. Once I do that I get an additional window that I cannot seem to suppress called PDF X-Change. In my previous question from thread(https://forum.pdf-xchange.com/ ... 64#p112964) you helped me solve this issue by NOT using OpenDocFromPath when doing conversion but instead calling the IPXV_ImportConverter.Convert function with an IAFS_File parameter. This worked great for that purpose.

However I am still having the general issue of how to open a PDF/file using only a path, Editor SDK(which has more functionality it seems), and no UI. For instance, how to create a IPXV_Document. I'm sure this is possible but I seem to just be missing the big hint or example so I apologize for my stupidity here.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Open IPXV_Document without UI?

Post by Sasha - Tracker Dev Team »

Hello DolphinMann,

The thing is that the majority of the operations take an IPXC_Document as an input. Though if you pass an IPXV_Document as an input into such operations then they will automatically extract the IPXC_Document from the IPXV_Document.
In your case you can't have an IPXV_Document because, as you said for yourself, you will need a Frame for it to exist in. So you will have to use the IPXC_Document and pass it to the operation if the operation does not support IAFS_Name\IAFS_File that is, because then you won't have to open the document.
Basically what you need to do in this case is the IPXC_Inst::OpenDocumentFromFile method. This is how you should use it:
https://forum.pdf-xchange.com/ ... 04#p105804

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
DolphinMann
User
Posts: 158
Joined: Mon Aug 04, 2014 7:34 pm

Re: Open IPXV_Document without UI?

Post by DolphinMann »

I did what you said and I am getting the following: -2147418113

"Error [System]: Catastrophic failure."

I am using the exact function from: https://sdkhelp.pdf-xchange.com/vie ... ges#Sample

The only difference is I am passing the IPXC_Document from OpenDocumentFromFile to input.Add().v = Doc;
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Open IPXV_Document without UI?

Post by Sasha - Tracker Dev Team »

Hello DolphinMann,

I do not experience this error - try using this project (make sure that you have a D:\TestFolder\ directory):
WindowsFormsApplication2.rar
(15.49 KiB) Downloaded 75 times
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
DolphinMann
User
Posts: 158
Joined: Mon Aug 04, 2014 7:34 pm

Re: Open IPXV_Document without UI?

Post by DolphinMann »

Thank you and you are(obviously) correct. It turns out my problem was that I was passing the word "All" to the pages text. It does indeed take a IPXC_Document. It's also good to know that I can use this document type throughout the Editor SDK to avoid dealing with the UI and IPXV_Document.

I was able to find the list of acceptable values as well. As a reference in case others search the forum: https://sdkhelp.pdf-xchange.com/vie ... PagesRange

Though, could we please get the FormatParams added to the table of this page? https://sdkhelp.pdf-xchange.com/vie ... rmatParams
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Open IPXV_Document without UI?

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
DolphinMann
User
Posts: 158
Joined: Mon Aug 04, 2014 7:34 pm

Re: Open IPXV_Document without UI?

Post by DolphinMann »

Just a reminder, could we please get the following API reference filled in? :)

Though, could we please get the FormatParams added to the table of this page? https://sdkhelp.pdf-xchange.com/vie ... rmatParams
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Open IPXV_Document without UI?

Post by Sasha - Tracker Dev Team »

Hello DolphinMann,

The reason that that table is empty is that the format parameters themselves differ from the type of the image used. Check this post:
https://forum.pdf-xchange.com/ ... ms#p103744

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply