Solved

Delphi Program to Print .PDF and .TIFF Files

Posted on 2002-06-17
6
660 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

713 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