-
May 13th, 2003, 09:26 AM
#1
how to print acrobat .pdf files from vb.net?
hi,
iam involved in a project which is used to order processing.i have been given a task for opening the pdf files,printing a set(batch if pdf files) automatically without user intervention.
This type of system is been done in visual foxpro.but its been migrtated to vb.net.
so its takes a lot **** of time to me to understand the existing foxpro code and do it in vb.net.
i will tell the process.first a user selects a batch of orders.
each order contains a set of docuemnts
once the user selects the batch of orders and says print,its should take each item in the order,(all are having the path in the database),print the pdf file.
the minimum requirement is we should have the adobe acrobat.
how to access the acrobat from vb.net,so tha i can print passing the filename,start page,end page like that .how to instantiate and how to use its functionality...
can some body help me in this regard....
regards
varma
-
May 13th, 2003, 11:20 AM
#2
There are bunch of components (freeware/shareware) that you can use. Adobe themselve should have some component that you can interact with to create/print PDF file. ComponentONE also has .NET component to do the task.
-Cool Bizs
-
May 13th, 2003, 10:41 PM
#3
which adobe component to use?
hi,
thanks for the reply,
could you tell me which adobe component to use...
bcos there are lot of components is there in references....
regards
varma
-
May 13th, 2003, 11:16 PM
#4
I'm not really sure which is the right Adobe component. At work, we use a component from ComponentOne to create the PDF (and I'm sure that it has a function to print also).
Adobe Distiller is the engine that creates PDF file. You should be able to check with Adobe web site for more information.
Also you can search GOOGLE.COM for a shareware/freeware that does the same thing.
-Cool Bizs
-
May 14th, 2003, 09:28 AM
#5
how to open the file with adobe type library?
hi,
yaa i got the solution for referencing the adobe type library from vb.net.
now i got a big problem,how i should use this component to open a pdf file and print with out viewing it.
i used the following code to open
Dim opDOC As Acrobat.CAcroAVDoc
Dim ok As Integer
Try
ok = opDOC.Open("D:\Varma\Using DataReader.pdf", "TEST")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
but its giving a error,it is
"object reference not set to instance of an object"
so how should i create the instance.
after that how i should print the pdf file in sleep mode..
if adobe is not installed or pdf files are not there how i should catch and prompt the user..
please help me..
regards
varma
-
May 14th, 2003, 10:57 AM
#6
Change:
Dim opDOC As Acrobat.CAcroAVDoc
To:
Dim opDOC AS New Acrobat.CAcroAVDoc
to elimiate your error.
Coolbiz -- Have you had any luck printing to the PDFWriter print driver? I cannot get VS.NET or any application created with it to work. Just end up with garbage in the PDF file. ???
-
May 14th, 2003, 04:40 PM
#7
DSJ - sorry, I only have to deal with creating the PDF file based on a query from the DB at work and we're using ComponentOne Reporting component to do so.
-Cool Bizs
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|