Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

How to convert word Doc, Excel into PDF using Adobe API in VB6.0

Community Beginner ,
Oct 24, 2007 Oct 24, 2007
Dear All,
I'm having the Adobe Acrobat SDk 8.0 and I need to convert our Word Documentent and Excel Sheets into PDF format thru our VB6.0 program. I'm able to manage to open the PDF documents and printing. I don't know hoe to convert the documents thru VB program.
TOPICS
Acrobat SDK and JavaScript
73.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 26, 2007 Oct 26, 2007
Acrobat's APIs for document conversion are only for plugins (C/c++) at this time.

Leonard
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 26, 2007 Oct 26, 2007
Dear Leonard,
Thanks for you reply. I have managed to create the PDF by using 'Adobe PDF' printer. But whenever I used the conversion it opens the PDF Application even though I specified the Application Hide.
Could you please help me to stop the application pop-up, I want to use this as background and user shouldn't know the conversion is taken place.

Code Snip pet
/***************************************************************/
Dim AcroApp As Object
Dim AcroAVDoc As Object
Dim AcroPDoc As Object
Dim oJS As Object
Dim nPages As Long

Set AcroApp = CreateObject("AcroExch.App")
Set AcroAVDoc = CreateObject("AcroExch.AVDoc")
Set AcroPDoc = CreateObject("AcroExch.PDDoc")

AcroApp.Hide

If AcroAVDoc.Open("c:\input.doc", "") = False Then
Exit Function

End If

Set AcroPDoc = AcroAVDoc.GetPDDoc

If AcroPDoc.GetFileName = "" Then
Exit Function
End If

AcroPDoc.Save 1, "c:\input.pdf"
AcroPDoc.Close
AcroAVDoc.Close True
AcroApp.CloseAllDocs
AcroApp.Exit

Set AcroPDoc = Nothing
Set AcroAVDoc = Nothing
Set AcroApp = Nothing

/***************************************************************/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 26, 2007 Oct 26, 2007
AVDoc.Open is documented and supported only as a method for opening
PDF files. It is neither documented nor supported as a conversion
tool, it works by accident and could fail or be withdrawn.

Aandi Inston
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 28, 2007 Oct 28, 2007
Hi Aandi,
Thanks for your reply. I got this idea from google search. I tried that one in my machine and able to create pdf. If there is a proper way to create pdf using Adobe Api, please help me.
I came to know that API is available for C/C++. Could you please help me to give the snippet of the C++ or VC++. So that i will try to create an dll and use it in VB.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 29, 2007 Oct 29, 2007
The supported way would be to automate Word, Excel etc. to make them
print to the Adobe PDF printer. Using the information in the Distiller
API you can stop the prompt for PDF destination.

Note that there is no supported way to give all of the features of the
Create PDF button in Word (links, bookmarks etc.)

Aandi Inston
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 29, 2007 Oct 29, 2007
Anyone Please help me to provide the snippet of the C++ or VC++ to convert word doc into PDF. No need for links & bookmarks etc. My objective is to convert the document thats it.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 29, 2007 Oct 29, 2007
You need to use two different APIs. The Word (or Excel) API to open a
file, choose a printer, and print. The Distiller API (very simple
registry setting) to choose a destination filename.

If you need any help understanding the Acrobat SDK documentation just
let us know which part is difficult. I do NOT post sample code, I
want people to learn, not copy. Sorry if this sounds harsh.

Aandi Inston
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 29, 2007 Oct 29, 2007
Hi Aandi Inston,
Thanks for your quick reply. Do you have link for the API refernce documents. I tried to get those but can't.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 29, 2007 Oct 29, 2007
They are just part of the SDK. I assumed you already had it. Try:

http://www.adobe.com/devnet/acrobat/

Aandi Inston
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 29, 2007 Oct 29, 2007
Actually, Aandi - the AVConversion APIs that are available to plugins FULLY support the creation of "rich" PDFs with bookmarks, links, etc. in fact, the caller can choose which features they want and which they do not using the ASCab "settings".

Examples of the AVConversion APIs for plugins can be found in the Binder sample in the Acrobat SDK.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 28, 2007 Dec 28, 2007
Hi Vijayakumari !

Thank for your code. I am able to convert word documents into pdf documents.I am not getting any pop-pu options during conversion.

U have to set the following properties in Adobe PDF Setting Printer:

1.Right click the Adobe PDF Printer.Select Properties menu
2.Select Advanced tap in that window.
3.Select printing Defaults command in Advanced Tap.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 15, 2008 Jan 15, 2008
Dear All,
Still i'm working on that. Now i'm trying to use the distiller for that. Could anyone helpme how to use distiller thru APIs. Any doc would be helpful.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 15, 2008 Jan 15, 2008
> Any doc would be helpful.

The Distilller API document is part of the Acrobat SDK. Is there any
information missing that you need?


Aandi Inston
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 23, 2008 Jan 23, 2008
> The supported way would be to automate Word, Excel etc. to make
> them print to the Adobe PDF printer. Using the information in
> the Distiller API you can stop the prompt for PDF destination.

> Note that there is no supported way to give all of the features of
> the Create PDF button in Word (links, bookmarks etc.)

My problem is similar to the thread starter but I use WScript as my language. Is it for real there is no programatic way to simulate the "Create PDF" button? My current understanding is that is does a 3 step process:

1. Find the position of the hyperlinks and TOC in the document

2. Print the document through the Adobe PDF/Distiller printer driver.

3. Insert the TOC and hyperlinks extracted in step #1.

I have no problem achieving #2 but how do I do the other steps.

My task is to automated the compilation and PDF-generation of a few user manuals which seems like a very standard task at a SW company.

Are there other Adobe products for this (I am using Adobe 8.1 Standrd)?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 23, 2008 Jan 23, 2008
>My problem is similar to the thread starter but I use WScript as my language. Is it for real there is no programatic way to simulate the "Create PDF" button? My current understanding is that is does a 3 step process

It does much more than that in steps 1 and 3, but you have the
essence. One way to achieve the additional PDF features is to add
PDFMark instructions between creating the PostScript and distilling
it. Word Basic/VBA can be used to analyse the contents of the Word
document.


Aandi Inston
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 23, 2008 Jan 23, 2008
Hello Aandi,

Am I correct in assuming that you represent Adobe? If so could you explain why the PDFMaker command in Word is not available through an API or as an example script which provide the same functionality in the API documentation. It appear to me that this would be a very simple way of getting started with Adobe PDF-generation.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 23, 2008 Jan 23, 2008
Aandi doesn't represent Adobe, but I do.

the answer is simple - because Acrobat isn't designed to be a tool for this type of batch/automation of conversion of file formats. We have another product that is designed for that purpose - LiveCycle PDF Generator.

Leonard
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 04, 2008 Feb 04, 2008
Leonard,

I'm not certain which Acrobat product I should use to approach my problem, which is similar to Fredri.

I have a server app which generates a highly automated Word doc on the user's laptop (through a browser). Because the Word doc is generated on the laptop, not the server, I need to employ a VBA-supported approach in Word to call an Acrobat object or service and only show the user the converted Acrobat document.

What is the appropriate acrobat technology?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 04, 2008 Feb 04, 2008
I would use look at the "silent printing" APIs for Acrobat Distiller to enable the printing from Word...

Leonard
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 15, 2008 Feb 15, 2008
I have been reading this thread, and still not sure what I need to have to convert word to pdf file. I am using C#.Net web project to convert newly uploaded word document to pdf and save to the server. What API do I need to get that done? I managed to set a default printer and use Process to print a word document, but the thing is it always pops up the "save as" dialog. Is it possible to suppress that window and pass in the output file name?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 16, 2008 Feb 16, 2008
> the thing is it always pops up the "save as" dialog.

See the Distiller API document, which includes information on how to
bypass the prompt for filename in the Adobe PDF driver.

Note that this is NOT for use on a server; however, that doesn't seem
to be the case here. If I understand correctly, each client will have
purchased a copy of Acrobat Professional or Acrobat Standard, and the
conversion will take place on each client, before being uploaded to
the server - correct?

Aandi Inston
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2008 Feb 16, 2008
> I am using C#.Net web project to convert newly uploaded word document to pdf and save to the server.

You can use the product LiveCycle PDF Generator.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2008 Feb 19, 2008
-You can use the product LiveCycle PDF Generator

Do you happen to know how much that's going to cost? The web site doesn't show the price.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2008 Feb 19, 2008
Aandi Inston, "How to convert word Doc, Excel into PDF using Adobe API in VB6.0" #22, 16 Feb 2008 3:...

The conversion will take place on windows 2003 server. Each client usually don't have the acrobat professional, but they will have the free standard pdf version. Each client uploads the word document to the server using my web site, and my web site needs to has the code to convert the word file to pdf, after that, the pdf will be saved at the server. Someone mention LiveCycle PDF Generator, is this the right approach?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines