Page 1 of 1

Conversion of Office Formats to PDF

Posted: Tue Oct 30, 2018 12:30 pm
by Kutusow
Hey Everybody,

I am having issues, using IPXV_ImportConverter loading Office documents.
I am pretty sure that I have the appropriate converter, but there seems to be an issue concerning the interaction with Office.
Whenever i try to load a MS Word document, a message box pops up after a short delay, indicating that there is a queue of documents, that has not been processed for a while.
I can then abort in various ways or wait.

I am using MS Word 2016
I attached a picture of the message i get (it is in German though)

Re: Conversion of Office Formats to PDF

Posted: Wed Oct 31, 2018 1:29 pm
by Sasha - Tracker Dev Team
Hello Kutusow,

From the first look it seems like a bug - we will investigate further.

Cheers,
Alex

Re: Conversion of Office Formats to PDF

Posted: Wed Oct 31, 2018 3:57 pm
by Sasha - Tracker Dev Team
Hello Kutusow,

We've tested this in our environment and everything worked.
1. What DLL version are you using (also Win32 or x64)?
2. What Windows version are you using (also Win32 or x64)?
3. What processor do you have?
4. Does this occur each time that you do that or once in a while? Same goes for files.
5. What coding language are you using?

Also, a small sample project would be perfect.


Cheers,
Alex

Re: Conversion of Office Formats to PDF

Posted: Mon Nov 05, 2018 7:52 am
by Kutusow
Hey,

thank you for the reply.

1. DLL version should be 7.0.0327.0000 and x86
2. Windows 10 Enterprise 64-Bit
3. AMD FX 6300
4. yes it occurs each time, with all types of office related files
5. C#

Here is the code i use. I get the same issue, when i try to use this code in the TiffExtractor Example project.
I added a modified Version of it as an Attachment.

Code: Select all

var importCV = FindNeededImportConverter(Path.GetExtension(fileName)); // gets the appropriate importconverter
PDFXEdit.IAFS_Name name = m_fsInst.DefaultFileSys.StringToName(fileName);
int openFileFlags = (int)(PDFXEdit.AFS_OpenFileFlags.AFS_OpenFile_Read | PDFXEdit.AFS_OpenFileFlags.AFS_OpenFile_ShareRead);
PDFXEdit.IAFS_File destFile = m_fsInst.DefaultFileSys.OpenFile(name, openFileFlags);
PDFXEdit.IPXC_Document doc = importCV.Convert(m_Inst, destFile);

Re: Conversion of Office Formats to PDF

Posted: Mon Nov 05, 2018 8:25 am
by Sasha - Tracker Dev Team
Hello Kutusow,

Thank's for the info - I will address this to the appropriate developer for further investigation.

Cheers,
Alex

Re: Conversion of Office Formats to PDF

Posted: Mon Nov 05, 2018 2:59 pm
by Sasha - Tracker Dev Team
Hello Kutusow,

There is a small bug with this one - if you pass the NULL ICab parameter - it won't execute further. This is fixed now and should work as intended in the next release. Meanwhile, you can use this method:

Code: Select all

PDFXEdit.ICab cab = m_Inst.GetFormatConverterParams(true, importCV.ID);
PDFXEdit.IPXC_Document Doc = importCV.Convert(m_Inst, destFile, 0, cab);
This will create the default parameters (same as NULL should of done) and pass them to the converter. With this it should work with no problems.

Cheers,
Alex

Re: Conversion of Office Formats to PDF

Posted: Mon Nov 05, 2018 3:40 pm
by Kutusow
Hey,

thanks again.
I added your code, but sadly the issue is still not resolved.
It feels like the time until i get the Messagebox is just a bit longer now.
(Also, "m_Inst.GetFormatConverterParams(true, importCV.ID)" throws an Exception when I try to load a PDF-file with it.)

Re: Conversion of Office Formats to PDF

Posted: Wed Nov 07, 2018 8:47 am
by Sasha - Tracker Dev Team
Hello Kutusow,

You can try your previous code (without the ICab fragment) with this fixed dll:
31692.zip
(13.91 MiB) Downloaded 229 times
Note that this is a dev build an it's not guaranteed to be stable and should not be used in the production. It's purpose is only to test whether your problem was fixed.

Cheers,
Alex

Re: Conversion of Office Formats to PDF

Posted: Mon Nov 12, 2018 12:37 pm
by Kutusow
Thank you for the dll

I tried to add a reference to this dll in my project, but I get an error:
"A reference to .dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."
The access options are identical to those of my current dll though.
Also, I am not sure which dll i should use for a "Any CPU" project. Could you also provide the 64 version for me to test?

thanks

Re: Conversion of Office Formats to PDF

Posted: Mon Nov 12, 2018 12:44 pm
by Sasha - Tracker Dev Team
Hello Kutusow,

Please add the x86/Win32 version to the project build and try that dll with it - Any CPU can use either x86 or x64 dll depending on the settings.

Cheers,
Alex

Re: Conversion of Office Formats to PDF

Posted: Tue Nov 13, 2018 11:32 am
by Kutusow
Hey,

I would like to do that, but I get the error I was writing about.

"A reference to .dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."

For all I can see, access to the file should be alright, since the settings are identical to the ones of the dll I am currently using.

Re: Conversion of Office Formats to PDF

Posted: Tue Nov 13, 2018 12:05 pm
by Sasha - Tracker Dev Team
Hello Kutusow,

Did you launch the regsvr32 command via the console administrator mode for the new dll?

Cheers,
Alex

Re: Conversion of Office Formats to PDF

Posted: Tue Nov 13, 2018 2:04 pm
by Kutusow
Oh... thanks for the help. I've never done that before.
With your help, I have finally added the dll to my project. But I still can't test it because the dll you gave me is a Core dll, yet the ImportConverter is IPXV.
I think I need the Edit dll for that, no? Am I missing something?

thanks again for your swift replies :)

Re: Conversion of Office Formats to PDF

Posted: Wed Nov 14, 2018 12:58 pm
by Sasha - Tracker Dev Team
Hello Kutusow,

Well, you are in the CoreAPI thread - thus the dll. I'm including the newer EditorSDK dlls + Resources:
31692_E.zip
(20.56 MiB) Downloaded 215 times
Cheers,
Alex

Re: Conversion of Office Formats to PDF

Posted: Mon Nov 19, 2018 7:28 am
by Kutusow
Hey,

I tested it now with the new dll and both (1) with and (2) without the Addition of "cab".
The result is still pretty much the same. The program freezes, waiting for a response from MS Word. But to no avail. After an extended period of time, it finally delivers a Messagebox.
In case (1) using "cab", the text is slightly different. It states that Word won't answer and therefore my file (gives full path) can't be processed, giving me the aforementioned options again.
case (2) delivers the very message from my opening post.

I hope you still have some ideas as to what the problem might be,
thanks

Re: Conversion of Office Formats to PDF

Posted: Tue Nov 20, 2018 6:41 am
by Sasha - Tracker Dev Team
Hello Kutusow,
In case (1) using "cab", the text is slightly different. It states that Word won't answer and therefore my file (gives full path) can't be processed, giving me the aforementioned options again.
Can you tell us what message are you getting in this case?
The "Word won't answer" can mean that the office is busy or the office has hanged (those are different scenarios). If you can, please also attach the message box screenshot.

Cheers,
Alex

Re: Conversion of Office Formats to PDF

Posted: Tue Nov 20, 2018 7:32 am
by Kutusow
Sure,
I would translate it as: "Microsoft Word does not answer" in the title, and then "Microsoft Word does not react/respond and the file xxx ist not processed at the moment. What do you want to do?"
I attached a Picture of the Messagebox, again in German.
If it helps, I can use Word in the meantime without any issues.

Re: Conversion of Office Formats to PDF

Posted: Wed Nov 21, 2018 8:56 am
by Sasha - Tracker Dev Team
Hello Kutusow,

I've contacted the appropriate developer - he will take a look into this.

Cheers,
Alex

Re: Conversion of Office Formats to PDF

Posted: Thu Nov 22, 2018 3:22 pm
by Sasha - Tracker Dev Team
Hello Kutusow,

Here's an answer from the developer who investigated this.
On his machine he had this results:
1) Old dll - does not work without the cab parameters specified (the message queue does not move); works OK with cab parameters
2) New dll - works OK with and without the cab parameters
You had these results:
1) Old dll - does not work without the cab parameters specified (the message queue does not move); and also does not work with cab parameters - message "Word won't answer"
2) New dll - same as old - does not work

Possible solutions:
1) You are using the old dll (you did not execute the regsvr32 for the new dll). If these dll are from the different directory - for easy check use Solution Explorer - References - Add Reference - COM tab - (in the appeared list hover mouse over PDF-XChange Editor Type Library) - a pop-up appears with a path to currently used DLL's location.
2) If you don't have an activated MS Office, the old dll with cab parameters passing can also hang.
3) What code exactly are you using (Tiff Extractor or your code that you gave us)?
4) Also, if your documents contain macros - these can also be a problem - they can launch different message boxes and stuff like that that will block the further execution.

Cheers,
Alex

Re: Conversion of Office Formats to PDF

Posted: Tue Jan 08, 2019 10:53 am
by Kutusow
Hey Alex,

thanks a lot for your help.
I changed how the dll is loaded. Now I use the C-export Method as described here. It works fine now without cab (I did not bother to also test it with cab)

again,
thank you for your endeavors!

Re: Conversion of Office Formats to PDF

Posted: Tue Jan 08, 2019 11:38 am
by Sasha - Tracker Dev Team
:)