How to convert tiff,word and excel file into pdf?

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
vivekpatel
User
Posts: 141
Joined: Sat Aug 27, 2016 11:00 am

How to convert tiff,word and excel file into pdf?

Post by vivekpatel »

Hello,

Can I use Eidtor sdk to convert some common file format (e.g. tiff,.doc,.docx,.txt,.xls etc.) to pdf document in a programmatic way.
If it can not,is there any way to do this?


Here i'm trying to open doc file with below code, gives exception:

Dim Doc As PDFXEdit.IPXC_Document = m_pxcInst.OpenDocumentFromFile("herer my doc file (version2013)", Nothing)

"Exception from HRESULT: 0x82140002" is the exception.

Any help will be greatly appreciated.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: How to convert tiff,word and excel file into pdf?

Post by Tracker Supp-Stefan »

Hello vivekpatel,

This error means "Invalid file format".
Our end user editor relies on e.g. Word APIs to do the conversion. Do you have MS Office installed on the test machine?

Regards,
Stefan
vivekpatel
User
Posts: 141
Joined: Sat Aug 27, 2016 11:00 am

Re: How to convert tiff,word and excel file into pdf?

Post by vivekpatel »

Hello,

Yes. I have allready installed MS Office 2013 on that machine.

Code is as below:

Dim m_Inst As PDFXEdit.PXV_Inst = Nothing
Dim m_Inst1 As PDFXEdit.IPXV_Document = Nothing
Dim m_pxcInst As PDFXEdit.IPXC_Inst = Nothing

Dim IAUX_Inst As PDFXEdit.IAUX_Inst = Nothing
Dim ixcInst As PDFXEdit.IIXC_Inst = Nothing


Dim licKey As String = "xzy key"

m_Inst = New PDFXEdit.PXV_Inst()
m_Inst.Init(Nothing, licKey, Nothing, Nothing, Nothing, 0, Nothing)
m_pxcInst = CType(m_Inst.GetExtension("PXC"), PDFXEdit.IPXC_Inst)
IAUX_Inst = m_Inst.GetExtension("AUX")

ixcInst = CType(m_Inst.GetExtension("IXC"), PDFXEdit.IIXC_Inst)


Dim Doc As PDFXEdit.IPXC_Document = m_pxcInst.OpenDocumentFrom(path of files like (tiff,doc,xls), Nothing)
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: How to convert tiff,word and excel file into pdf?

Post by Tracker Supp-Stefan »

Hello Vivek Patel,

I've asked a colleague to take a look at this enquiry, but he is busy with some other tasks, so we will post again here in a few hours.

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

Re: How to convert tiff,word and excel file into pdf?

Post by Tracker Supp-Stefan »

Hello vivekpatel,

Just spoke with a colleague, and we suspect that you've not copied the ConvertPDF.pvp plug in file and that is why it can not convert your word documents to PDF on the fly.
Once you have the plug-in sorted you can open the IPXV_Document (the Editor Level document) with the Control's OpenDocFrom method. Though to open the Core level document, you will need to use the IPXV_ImportConverter of the needed type to convert the format that you desire. Samples for these operations can be found on the forums.

Regards,
Stefan
vivekpatel
User
Posts: 141
Joined: Sat Aug 27, 2016 11:00 am

Re: How to convert tiff,word and excel file into pdf?

Post by vivekpatel »

Hello and Thanks,

I got it. And hoe to convert images into pdf?
vivekpatel
User
Posts: 141
Joined: Sat Aug 27, 2016 11:00 am

Re: How to convert tiff,word and excel file into pdf?

Post by vivekpatel »

Hello,

Allright i got the solution for images to pdf conversion.
Here i got another exception for doc,excel and ppt file when open to convert. It shows exception
alfter windows blink.
Here i'm attaching error and demo code zip to catch actual thing.
This error occures with doc,excel and ppt file.

I'm looking forwadr to it.
Thanks.
Attachments
WindowsApplication1.rar
(377.44 KiB) Downloaded 132 times
ex.rar
(23.79 KiB) Downloaded 138 times
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to convert tiff,word and excel file into pdf?

Post by Sasha - Tracker Dev Team »

Hello vivekpatel,

We can't launch your project - we do not have DevExpress that is needed for compiling. Please make a working project and only then we can advice further.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
vivekpatel
User
Posts: 141
Joined: Sat Aug 27, 2016 11:00 am

Re: How to convert tiff,word and excel file into pdf?

Post by vivekpatel »

Hello,

Sorry for the inconvenience.
Here i'm attaching zip file without DevExpress Control.
Attachments
MSOFFICE_PDF.rar
(88.42 KiB) Downloaded 142 times
vivekpatel
User
Posts: 141
Joined: Sat Aug 27, 2016 11:00 am

Re: How to convert tiff,word and excel file into pdf?

Post by vivekpatel »

Hello,

Any Update?
I'm looking forward to it.
:(
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to convert tiff,word and excel file into pdf?

Post by Sasha - Tracker Dev Team »

Hello vivekpatel,

The problem is that you've posted this thread in the Viewer SDK forum - thus it wasn't looked at, because it's an Editor SDK topic.
Also,
Just spoke with a colleague, and we suspect that you've not copied the ConvertPDF.pvp plug in file and that is why it can not convert your word documents to PDF on the fly.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
vivekpatel
User
Posts: 141
Joined: Sat Aug 27, 2016 11:00 am

Re: How to convert tiff,word and excel file into pdf?

Post by vivekpatel »

Hello,

I didn't get it.
Where i have to do with ConvertPDF.pvp plug in file?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to convert tiff,word and excel file into pdf?

Post by Sasha - Tracker Dev Team »

Hello vivekpatel,

Check out this topic:
https://forum.pdf-xchange.com/ ... ConvertPDF

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
vivekpatel
User
Posts: 141
Joined: Sat Aug 27, 2016 11:00 am

Re: How to convert tiff,word and excel file into pdf?

Post by vivekpatel »

Hello,

Still getting this exception after the plugins load.
:(
Attachments
MSOFFICE_PDF.rar
(838.07 KiB) Downloaded 144 times
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to convert tiff,word and excel file into pdf?

Post by Sasha - Tracker Dev Team »

Hello vivekpatel,

I do not have these directories:
"C:\Users\Vivek\Desktop\DEMO FOR PDF.docx"
"C:\Users\Vivek\Documents\Docsvault Checkout Folder\NewPDF.pdf"
"C:\Users\Vivek\Documents\Docsvault Checkout Folder\"

Please make a fully working sample project only then we can advice further.

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