Solved

Delphi Program to Print .PDF and .TIFF Files

Posted on 2002-06-17
6
656 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 4

Accepted Solution

by:
SurferJoe 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

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…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

772 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