Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2004-03-24
7
Medium Priority
?
316 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 1600 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

810 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