Solved

Delphi Program to Print .PDF and .TIFF Files

Posted on 2002-06-17
6
648 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
Comment Utility
Report Builder allows direct creation of .PDF files using the waler TExtraDevices add on.
0
 
LVL 22

Assisted Solution

by:mnasman
mnasman earned 150 total points
Comment Utility
Hello

  you could find components to convert files to pdf

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

0
 

Author Comment

by:sevendays
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 4

Accepted Solution

by:
SurferJoe earned 150 total points
Comment Utility
// 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now