PDF-XChange - Tracker PDF Viewer - TIFF-XChange - Image-XChange - XMF-XChange - Raster-XChange - Support

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

 
gerundt
User
Topic Author
Posts: 50
Joined: Fri Nov 15, 2013 10:07 am
Location: Germany
Contact:

Open MS Office files WITHOUT XPS add-in?

Thu Jan 21, 2016 8:20 am

I test currently the new version 5.5.316.1 from the PDF-XChange Editor. One feature which reads really cool was the opening from Microsoft Office files!

I tried it on a Windows 7 pc with Office 2007 and a Windows 10 computer with Office 2013. On both computer I get an "Error [PXVLib]: Microsoft Office threw an exception" error.

The problem seems, that we disable the XPS add-in with GPO:

HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Common\FixedFormat\DisablePublishToFixedFormat = 1

  • 0 = Default
  • 1 = Disable XPS
  • 2 = Disable PDF
  • 3 = Disable XPS and PDF

Since we only disable the XPS part and not the PDF part, I hope you can fix the error! Or do you use the XPS add-in?

Thanks for your help!

Greetings,
Tim Gerundt
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 12898
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Open MS Office files WITHOUT XPS add-in?

Thu Jan 21, 2016 1:07 pm

Hi Tim,

Yes the Editor needs the word document converted to XPS, and then it handles that data internally to generate the PDF document (we do not rely on the Microsoft Office built in PDF generation process).

Regards,
Stefan
 
gerundt
User
Topic Author
Posts: 50
Joined: Fri Nov 15, 2013 10:07 am
Location: Germany
Contact:

Re: Open MS Office files WITHOUT XPS add-in?

Thu Jan 21, 2016 1:39 pm

Ok, but I am not sure if I will enable the XPS add-in for the users. ;)

But can you catch the exception and show a more helpful error message? Something like "XPS add-in is not loaded"?
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 12898
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Open MS Office files WITHOUT XPS add-in?

Thu Jan 21, 2016 3:07 pm

Hi gerundt,

I don't have the technical expertise to answer that last question - but I presume that if we can get that sort of information from Windows/Office - it won't be a problem to implement a more user friendly error message.
Let me check with the devs and we will come back here later with additional info.

Regards,
Stefan
 
DolphinMann
User
Posts: 136
Joined: Mon Aug 04, 2014 7:34 pm

Re: Open MS Office files WITHOUT XPS add-in?

Fri Oct 05, 2018 7:11 pm

I am getting this same message:

ErrorMesssage: Exception from HRESULT: 0x82191044
Stack Trace: at PDFXEdit.IPXV_ImportConverter.Convert(PXV_Inst pInst, Object pSrc, UInt32 nFlags, ICab pParams, IProgressMon pProgress, UInt32 hWndParent, Object pCtx)
at Dolphin.PDFProcess.PDFProcessTools.CreateDolphinPDF(String fileName, String outputFileName, Boolean deleteOriginal)
[10/5/2018 12:06:13 PM][ERROR][ThreadID:1] Error from PDF X-Change: Error [PXVLib]: Microsoft Office threw an exception.

With Microsoft Office 2016 installed and when I attempt to convert XLS and DOC files.

I have also seen it throw this error:
[10/5/2018 12:22:59 PM][ERROR][ThreadID:1] Error from PDF X-Change: Error [PXVLib]: No suitable version of Microsoft Office application has been found.
With the exact same file when executed from a service. But when I launch the program directly from the command line with that same file it works.

What specifically do I need to enable or allow to convert Office files? I know from a previous thread Microsoft Office had to be installed, but is there a specific component, registry setting, or feature I must allow?


Edit: Also, it seems that if I run the program from the command line, it is successfully, but if I launch it from a Windows Service, it is not. I basically have an executable that runs a single PDF command. This works perfectly, but if I launch it from a Windows Service with the code below, it fails:

            Process testProcess = new Process();

            try
            {
                if (PDFTools.pdfUser != "")
                {
                    testProcess.StartInfo.Domain = PDFTools.domain;
                    testProcess.StartInfo.UserName = PDFTools.pdfUser;
                    testProcess.StartInfo.Password = PDFTools.pdfPassword;
                    Logger.Log("Executing PDF Process as: " + testProcess.StartInfo.Domain + @"\" + testProcess.StartInfo.UserName, 5);
                }

                testProcess.StartInfo.UseShellExecute = false;
                testProcess.StartInfo.FileName = PDFTools.pdfProcessPath;
                testProcess.StartInfo.CreateNoWindow = true;
                testProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
                testProcess.StartInfo.Arguments = "convert \"" + inputFile + "\" \"" + outputFile + "\" " + Convert.ToString(deleteOriginal);
                Logger.Log("Attempting to Create PDF w/External Process. Arguements: " + testProcess.StartInfo.Arguments, 5);
                testProcess.StartInfo.RedirectStandardOutput = true;
                testProcess.Start();

                Logger.Log("Create PDF Process Started. waiting maximum of " + 1000 * 60 * PDFTools.pdfToolsTimeoutInMin + " seconds for completion", 5);
                testProcess.WaitForExit(1000 * 60 * PDFTools.pdfToolsTimeoutInMin);
                if (!testProcess.HasExited)
                {
                    returnValue = false;
                    testProcess.Kill();
                }
                else
                {
                    string mainOutput = testProcess.StandardOutput.ReadToEnd();
                    Logger.Log("CreatePDF from: " + inputFile + " main output: " + mainOutput, 5);
                    returnValue = Convert.ToBoolean(mainOutput);
                }
            }
            catch (Exception ex)
            {
                Logger.Log("Exception", ex, 1);
            }


Basically I just want to convert documents to PDF as part of my larger windows service. This seems to work for all documents BUT microsoft office documents. However the conversion code run directly outside of the service will convert office documents.

I'm guessing it has something to do with office conversion launching a UI or requiring permissions or something, though the service is running as an administrator on the machine. Is there any way to convert an office doc from a windows service?
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 12898
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Open MS Office files WITHOUT XPS add-in?

Mon Oct 08, 2018 4:21 pm

Hello DolphinMann,

I've asked a colleague from the dev team to take a look at your problem, and am awaiting his feedback!
As soon as I have further news - I will post them here!

Regards,
Stefan
 
DolphinMann
User
Posts: 136
Joined: Mon Aug 04, 2014 7:34 pm

Re: Open MS Office files WITHOUT XPS add-in?

Mon Oct 08, 2018 5:28 pm

Thank you very much. This is a road-block for us so I appreciate the help.

The forum(you) have always been pretty helpful!
 
User avatar
Dimitar - Tracker Supp
User
Posts: 224
Joined: Mon Jan 15, 2018 9:01 am

Re: Open MS Office files WITHOUT XPS add-in?

Tue Oct 09, 2018 1:00 pm

Hello DolphinMann,

We are glad to hear that. :-)

Regards.
 
DolphinMann
User
Posts: 136
Joined: Mon Aug 04, 2014 7:34 pm

Re: Open MS Office files WITHOUT XPS add-in?

Fri Oct 12, 2018 12:58 am

I do not expect an immediate resolution, but just wanted to check in.

Are you able to replicate the issue? Would you like any of my code? Let me know if there is anything I can provide to make debugging easier.
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 12898
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Open MS Office files WITHOUT XPS add-in?

Fri Oct 12, 2018 3:49 pm

Hello DolphinMann,

Apologies for the delay with following up on this one, but it turned out I need to check with a different colleague. I am working on this and hope to have some further feedback for you by Monday!

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

Re: Open MS Office files WITHOUT XPS add-in?

Tue Oct 16, 2018 2:55 pm

Hello DolphinMann,

Just a quick update. A colleague is still looking at this problem and trying to reproduce the set up and issue right now. He estimates that he should have further news and results by tomorrow. We will keep you posted!

Regards,
Stefan
 
DolphinMann
User
Posts: 136
Joined: Mon Aug 04, 2014 7:34 pm

Re: Open MS Office files WITHOUT XPS add-in?

Tue Oct 16, 2018 4:47 pm

Thanks for the update!

Who is online

Users browsing this forum: cjml87 and 8 guests