Solved

Help required for PDF creating tool: Capable of producing bookmarks (with evaluation version)

Posted on 2004-03-24
7
300 Views
Last Modified: 2010-04-05
I want to create a PDF file with some text and say five images.
Within the text, I want to add bookmarks for the images (i.e. if the reader clicks on the text, he is led to the image).
Since I am experimenting, I cannot buy the software right-away, so can some body suggest some evaluation software that gives me capability do this (And if possible, exlpain how to use the software!)?
Desperately looking forward to your help,
...Shu
0
Comment
Question by:snehanshu
  • 4
  • 3
7 Comments
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10674447
I didn't know PDF files do that.....

Click on some text and jump to an image


Shane
0
 
LVL 5

Author Comment

by:snehanshu
ID: 10674455
:-(
Really? Can it not be done at all?
...Shu
0
 
LVL 11

Accepted Solution

by:
shaneholmes earned 400 total points
ID: 10674483
I dont know, can it do that?

There are many PDF components available, I have never used one, but I have seent hem

Goto and perform a search at the following Delphi VCL repositories


http://delphi.icm.edu.pl/
www.torry.ru
www.delphi32.com
www.delphipages.com

Example:

http://www.torry.net/quicksearchd.php?String=PDF&Title=Yes

SHane

0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

 
LVL 11

Expert Comment

by:shaneholmes
ID: 10674489

This one does bookmarks

http://www.torry.net/quicksearchd.php?String=PDF&Title=Yes

EasyPDF v.1.1  FW 458 Kb 22 Apr 2002
By JanSoft. EasyPDF is a XML to PDF converter supporting: page, text (single line text), section (multi-line text that can auto-flow), font (name, size, leading), stroke (color, width, style), fill (color), shape (rectangle, ellipse), line, function (for repeating blocks and headers and footers), call (for executing a function); included: integrated syntax highlighted editor. Pie-charts, Outlines (bookmarks), Polygons, text-align (left, right, center, centerx), Curve, Axis, Plotgrid, integrated PDF viewer.
Fully functional
Source: None

 
Shane
0
 
LVL 5

Author Comment

by:snehanshu
ID: 10674672
EasyPDF doesn't have code :-(
I am not sure about clicking the text to go to the image, but perhaps what I am looking for is creating/defining outlines in the PDF document.
There is a bookmarks tab in the PDF viewer and I want to put stuff in it.
Can someone please help with delphi code examples?
The images I work with are tiff files, but support for atleast JPEG or bitmap would do for the demo.
Thanks,
...Shu
0
 
LVL 5

Author Comment

by:snehanshu
ID: 10675150
Thanks shaneholmes,
LlPDFLib v.2.2 at torry gave me a very manageable PDF creation utility! Thanks!!
Here's the simple code to generate a new PDF doc using TPDFDocument:

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, PDF, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    OpenDialog1: TOpenDialog;
    PDFDoc: TPDFDocument;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
Var
  RootBM, ChildBM: TPDFOutlineNode;
begin
  If OpenDialog1.Execute Then
  Begin

    PDFDoc.FileName := OpenDialog1.FileName;

    PDFDoc.BeginDoc;
//    PDFDoc.NewPage;
    with PDFDoc.CurrentPage do
    begin
      SetLineWidth(1);
      SetRGBColorFill(0.5, 0.5, 0.5);
      SetRGBColorStroke(1, 0, 0);
      BeginText;
      SetTextRenderingMode(2);
      SetActiveFont('Verdana', [], 48);
      TextOut((Width - GetTextWidth('Snehanshu')) / 2, 100, 0, 'Snehanshu');
      SetActiveFont('Arial', [], 48);
      TextOut((Width - GetTextWidth('PDF Demo')) / 2, 240, 0, 'PDF Demo');
      SetRGBColorStroke(0, 0, 1);
      SetActiveFont('Times', [], 100);
      TextOut((Width - GetTextWidth('Hello')) / 2, 280, 0, 'Hello');
      SetRGBColorStroke(0, 0.5, 0.25);
      SetActiveFont('Courier', [], 40);
      SetHorizontalScaling(50);
      TextOut((Width - GetTextWidth('http://www.acs-inc.com')) / 2, 380, 0, 'http://www.acs-inc.com');
      SetHorizontalScaling(100);
{      SetActiveFont('Verdana', [], 12);
      SetRGBColorStroke(0, 0.5, 0.75);
      SetLineWidth(0.5);
      TextOut((Width - GetTextWidth('Copyright '#169' 2001,2002 llionsoft')) / 2, 440, 0, 'Copyright '#169' 2001,2002 llionsoft');}
      EndText;
    end;
    RootBM := PDFDoc.Outlines.Add(nil, 'Root', TPDFGoToPageAction.Create);
    RootBM.Expanded := True;
    ChildBM := PDFDoc.Outlines.AddChild(RootBM, 'Child', TPDFGoToPageAction.Create);
    TPDFGoToPageAction(ChildBM.Action).PageIndex := 0;
    TPDFGoToPageAction(ChildBM.Action).TopOffset := 30;
    ChildBM.Expanded := True;
    PDFDoc.EndDoc;
    ShowMessage('Done!');

  End;
end;

end.

Thanks a lot!!
...Shu
0
 
LVL 5

Author Comment

by:snehanshu
ID: 10675695
BTW,
  This one is also very good: it allows to edit an existing PDF too!
  http://www.gnostice.com/PDFtoolkit.asp
Cheers!
...Shu
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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