Solved

Delphi Program to Print .PDF and .TIFF Files

Posted on 2002-06-17
6
673 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: 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!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month9 days, 14 hours left to enroll

623 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