Solved

Delphi Program to Print .PDF and .TIFF Files

Posted on 2002-06-17
6
659 Views
Last Modified: 2010-04-04
As part of a large system we need to write a program to print .PDF and .TIFF files.  Our initial thought is to just shell out and print them but would like to know if anyone has done something like this and has a better way.

Thanks
7  
0
Comment
Question by:sevendays
6 Comments
 
LVL 4

Expert Comment

by:YodaMage
ID: 7084161
Report Builder allows direct creation of .PDF files using the waler TExtraDevices add on.
0
 
LVL 22

Assisted Solution

by:Mohammed Nasman
Mohammed Nasman earned 150 total points
ID: 7084247
Hello

  you could find components to convert files to pdf

http://homepages.borland.com/torry/unitsconversion.htm

0
 

Author Comment

by:sevendays
ID: 7088393
Thanks for the comments but I already have the files so I don't need to create or convert them - just looking for ways to print them out.  Now we are thinking about using shell execute to print them.  PDF files don't appear to be much of a problem but haven't investigated the TIFF files.  Just looking to see if there is a better way to get the files printed.

Thanks again
7
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Accepted Solution

by:
Greg Rowland earned 150 total points
ID: 7089814
// We use this for material test reports "MTR"
procedure TStockMaterialf.AcroBatButtonClick(Sender: TObject);
var
vMtrName: string;
vLinkSuccessfull: boolean;

begin
     vLinkSuccessfull :=  True;
     vMtrName := qStock.FieldByName('MTR_NUM').text+'.pdf';
     vFileName := vMtrPath + vMtrName;
     try
        Screen.Cursor := crSQLWait;
        OleContainer1.CreateLinkToFile( vFileName, True);
     except
        vLinkSuccessfull:= False;
        MessageDlg('MTR file ' + vMtrName + ' not found!', mtError,[mbOk], 0);


     end;

     if vLinkSuccessfull then OleContainer1.DoVerb(ovShow);
     Screen.Cursor :=crDefault;
{
  TOleContainer1, Properties
  OleContainer1.CreateLinkToFile;
  OleContainer1.CreateObject;
  OleContainer1.DoVerb;
  OleContainer1.OleObject;
  OleContainer1.OleObjectInterface;
  OleContainer1.SourceDoc;
  OleContainer1.StorageInterface;
  OleContainer1.AllowActiveDoc;
  OleContainer1.AutoVerbMenu;
  OleContainer1.Caption;
  OleContainer1.FieldAddress;
  OleContainer1.GetInterface;
  OleContainer1.GetIconMetaPict;

  Methods
  ObjectPropertiesDialog:
}



end;

There are a lot of things you can do with verbs, like print.
I haven’t had the need to work that out.
This solution keeps our foreman from having to go to the filing cabinet “way across the shop” every time the need an MTR and the print option is available after the MTR/PDF file is loaded. Works pretty slick.

Greg
0
 

Expert Comment

by:CleanupPing
ID: 9343187
sevendays:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 9453434
sevendays,
No comment has been added lately (17 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: split points between mnasman http:#7084247 and SurferJoe http:#7089814

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

anAKiN
EE Cleanup Volunteer
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question