PrimoPDF Forums Need to do more with PDF?

Go Back   PrimoPDF Forums > PrimoPDF > How do I?
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Rate Thread Display Modes
Old 10-19-2004, 10:59 AM   #1
RARTIGAS
Registered User
 
Join Date: Oct 2004
Posts: 2
Question Changing Word Documents to PDF using VB 6



****o I am currently trying to convert Word Documents to PDF using Visual Basic 6.0 and the code Im using seems to be converting the document, but when I try to open the pdf I get this message:

Adobe Reader could not open 'BSXC70.pdf' because it is either not a supported file type or because the file has been corrupted.

BSX70 is the name of the pdf. However, if I do it manually from Word, it works fine. The code Im using is as follows:

objWordDoc.PrintOut Background:=0, Range:=wdPrintAllDocument, outputFilename:="C:\My Documents\PDF Files Test\BSX70.pdf",
Item:=wdPrintDocumentContent, Copies:=1, pagetype:=wdPrintAllPages, PrintToFile:=True, collate:=False

objWordDoc is the word document to change to pdf.
I tried it with just the Background and Range, eliminating the Output File Name and when I ran the program I got the Primo PDF screen that asks for a "save as" destination. I entered the folder path and it worked fine using the vb script. But the idea is to have the program select the destination path in code.
I dont know if this is too technical, but any help would be apreciated.
Thanx.
RARTIGAS is offline   Reply With Quote
Old 10-20-2004, 04:26 PM   #2
Douglas Saltsman
Director of Engineering
 
Join Date: Feb 2004
Posts: 304
Quote:
Originally Posted by RARTIGAS


****o I am currently trying to convert Word Documents to PDF using Visual Basic 6.0 and the code Im using seems to be converting the document, but when I try to open the pdf I get this message:

Adobe Reader could not open 'BSXC70.pdf' because it is either not a supported file type or because the file has been corrupted.

BSX70 is the name of the pdf. However, if I do it manually from Word, it works fine. The code Im using is as follows:

objWordDoc.PrintOut Background:=0, Range:=wdPrintAllDocument, outputFilename:="C:\My Documents\PDF Files Test\BSX70.pdf",
Item:=wdPrintDocumentContent, Copies:=1, pagetype:=wdPrintAllPages, PrintToFile:=True, collate:=False

objWordDoc is the word document to change to pdf.
I tried it with just the Background and Range, eliminating the Output File Name and when I ran the program I got the Primo PDF screen that asks for a "save as" destination. I entered the folder path and it worked fine using the vb script. But the idea is to have the program select the destination path in code.
I dont know if this is too technical, but any help would be apreciated.
Thanx.

What you are doing is creating a postscript file from the word doc object. There is no conversion to PDF taking place in your code. There is also no API to Primo so you will not be able to do this programmatically.

There is an application called "Server" available at www.activepdf.com that will do exactly what you're looking for and provides an example of this exact scenario in the documentation.
__________________
-------------------------------------
Douglas Saltsman
ActivePDF

Leading the iPaper revolution
---------------------------------------
Douglas Saltsman is offline   Reply With Quote
Old 10-25-2004, 06:04 AM   #3
RARTIGAS
Registered User
 
Join Date: Oct 2004
Posts: 2
Mesage Recieved

****o Douglas

Thank's for the info and the quick reply.

RARTIGAS
RARTIGAS is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:00 PM.


Copyright © 2007, activePDF, Inc., All Rights Reserved