Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

in search for ideas

Status
Not open for further replies.

ATHUEL

Technical User
Sep 23, 2002
29
US
Hi everyone,
I need to send images edited in Photoshop , or any other image editor software, to my own application that creates some aditional files from the image file. What I want, is to do this using something like if I was sending the image to the printer. In fact my app. sends the image and the aditional files to a photographic printer( minilab)
Right now I'm working with a sort of hot folder structure( every time an image is sent to a temporary folder, my app. takes it and starts the process...), but I'd like to use some other method... something more transparent to the user... any suggestion, ideas???
 
perhaps

a Screen displaying Thumbnail Images

Click on Thumbnail and Send Photo to A Selected printer

Peter Wallace
 
I recently posted a similer question and my solution was with using Printer.PaintPicure

What I wanted to do was print a JPG file without opening another application or how to print it through another application. Object.PaintPicture does it without using another program. If that is what you're wanting to do, do a search in this forum on PaintPicture and you should get several returns.
 
ATHUEL,
if I understand your post, you may want to create something like printer driver entry.
User selects your printer in whatever program he uses - selects "print" - then your program takes over and does whatever it needs.
Sorry I have no idea how to do it (but it definitely could be done)
 
Here is a sample of the paintpicture code I mentioned earlier. It's set to print the first three files in the file listbox for testing. The pictures can be printed direct or loaded into a picture box. I also have it where I can pick the printer I want from a list of printers on the computer. As you can see, you can also change paper size, orientation etc.

Code:
Private Sub cmdPrintJPG_Click()
On Error GoTo ErrHandler
Dim i As Integer
'Dim sFileName As String
    
    'sFileName = flbFileListbox.Path & "\" & flbFileListbox.FileName
    Printer.ScaleMode = vbInches
    Printer.Orientation = vbPRORLandscape
    'Printer.Orientation = vbPRORPortrait
    Printer.PaperSize = vbPRPSLetter
    For i = 0 To 2
        flbFileListbox.Selected(i) = True
        Printer.ScaleMode = vbInches
        Printer.Orientation = vbPRORLandscape
        'Printer.Orientation = vbPRORPortrait
        Printer.PaperSize = vbPRPSLetter
        Printer.PaintPicture Picture1.Picture, 0, 0, 10.5, 8
        'Printer.PaintPicture Picture1.Picture, 0, 0, 16.5, 10.5
    'Printer.PaintPicture LoadPicture(sFileName, 0, 0, 17, 11)
        Printer.EndDoc

    Next i

Exit Sub
ErrHandler:
    MsgBox "Error printing JPG files. Error # " & Err.Number & ", " & Err.Description, vbOKOnly, "Error"
End Sub
 
guys,
First of all, thanks for your replys. ( I'm on vacation,so sorry for the delayed answer...)

Actually, I think that my post was misundertood, except for tsh73, whom really did understand what my goal is...

Thanks CaptainD for your effor, but this is not what I need.
What I need, is to create some "printer driver", or simulate one. Just want the user could select my "printer"and send to print to it...
I think that maybe this is not a trivial issue because I assume this involve some driver creation, but perhaps someone could point me in the right direction.

Thanks once again to all of you.
 
Well, about writing printer driver oof your own - that might be not straightforward or even not suitable for VB task.
Probably you could find some existing things?
Google Search turned me this page:
"Miraplacid Printer Driver 2000/XP is a driver that doesn't actually print documents on paper but transform them in graphics files on your hard disk"
- so it creates file, your program polls that directory picks file up and processes it?

Probably it could be found free thing for doing same (printing to file in graphical format that is)
 
You don't need to create a printer driver to select printers already on your computer. If the printers are working, then they have a printer driver. What you need to do is pull the "printer list" and select the one you want.

This will populate a listbox called lstPrinters with the printers on your computer.
Code:
Dim sPrinterName as Printer

For Each sPrinterName In Printers
    lstPrinters.AddItem (sPrinterName.DeviceName)
Next sPrinterName

This text sets the forms printer to the selected printer and saves the name of the default printer for your computer so it can be set back when done.
Code:
Private Sub cmdOpenCalendar_Click()

    frmCalendar.sDefualtPrinter = Printer.DeviceName
    frmCalendar.sNewPrinter = lstPrinters.Text
    frmCalendar.Show
    Unload Me
End Sub

'Set it back at the unload event

Private Sub Form_Unload(Cancel As Integer)
Dim objPrinter As Printer
    For Each objPrinter In Printers
        If objPrinter.DeviceName = sDefualtPrinter Then
            Set Printer = objPrinter
        End If
    Next objPrinter
End Sub
 
CaptainD,
I'm sorry but that's not what I'm looking for...
I'm trying to "create" a sort of "printer to file". I know that there are some of this on the internet, but they are quite expensive... So, I'm trying to figure how to do this... Right now I'm investigating on how ".gpd" files works, I think this is the path I have to follow...
Thanks for your effor!
 
There are free print to pdf programs available. I use CadZones. It sets up the program as a printer. When you print to it, it prompts you for a name and location then creates the file.

There are also ways to print to PDF in VB6 if you have the adobe reader. They use one of it's dll files.


Good luck
 
CaptainD, I still don't think you've quite understood what the original poster is looking for; they need to submit the image to their own program for some post-processing before it goes to a 'real' printer

ATHUEL, exactly how 'untransparent' is the current process (presumably Save As to the special folder compared to making the users select a special printer?
 
strongm,
yes, I send the image to a specific folder, then my app. takes it and creates the aditional files needed by the machine that prints the image...
 
My point is, is it really less transparent to get the user to select a specific printer than it is to get them to use a specific folder?
 
well, strongm
- it looks kind of natural to press "print" button then you want to print, rather then to select obscure folder to save.
The special printer could be selected only once in lifetime of task - applications generally remember printer selected.
(and sometimes they remember folder too, but I guess while working on picture it should be saved several times in working folder which is different from "to print" one...)
I state my point of view, that's all - I have no idea how it looks to OP or his users.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top