| | |
Using VB Code - Silent download pdf from server and print to local printer
Thread Solved |
•
•
Join Date: Jan 2005
Posts: 5
Reputation:
Solved Threads: 0
Hi All
I have a requirement to develop a VB application to download a pdf file from a server using an example URL
http://xxxxxxxxxxxxx/pdffiles/yyyyy.pdf.
I need to perform a silent download and print the same to the local printer. As this is going to be a scheduled task, I need to perform a silent download and print.
Please help me if any pointers to the above.
Thanks in advance
Praveen
I have a requirement to develop a VB application to download a pdf file from a server using an example URL
http://xxxxxxxxxxxxx/pdffiles/yyyyy.pdf.
I need to perform a silent download and print the same to the local printer. As this is going to be a scheduled task, I need to perform a silent download and print.
Please help me if any pointers to the above.
Thanks in advance
Praveen
Use the Microsoft Internet Transfer control.... You Pass it the URL, and tell it what you want to do with it, and it will do it. You can then save the information to a file, of the same name, or with a temporary name, and then do your printing. HOW exactly to print the PDF file from a VB App is going to be the hard part. The only method I know of, is really (Really) Tacky.
•
•
Join Date: Jan 2005
Posts: 5
Reputation:
Solved Threads: 0
Hi Comatose
Thanks for the reply.
I was able to obtain some VB code for printing a PDF file to default printer using a local VB application.
My hard part is for downloading the PDF file from Server. If you can give me more details on getting this done with Internet Transfer Protocol, it would be really great.
Can you give me some pointers on how to do the same? If possible, some hyperlinks etc?
Thanks a lot for the response.
Praveen
Thanks for the reply.
I was able to obtain some VB code for printing a PDF file to default printer using a local VB application.
My hard part is for downloading the PDF file from Server. If you can give me more details on getting this done with Internet Transfer Protocol, it would be really great.
Can you give me some pointers on how to do the same? If possible, some hyperlinks etc?
Thanks a lot for the response.
Praveen
Well,
It would go a little something like this:
It would go a little something like this:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Dim strURL As String Dim bData() As Byte ' Data variable Dim intFile As Integer ' FreeFile variable strURL = "http://yourserver.com/yourpdf.pdf" intFile = FreeFile() ' Set intFile to an unused ' file. ' The result of the OpenURL method goes into the Byte ' array, and the Byte array is then saved to disk. bData() = Inet1.OpenURL(strURL, icByteArray) Open "C:\Temp\yourpdf.pdf" For Binary Access Write As #intFile Put #intFile, , bData() Close #intFile
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Win98 v. Access 2002
- Next Thread: Printing Problem
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






