You are not logged in.
Pages: 1
Hello, again
Is there a way to embed hyperlinks into TGDIPages in the SQLLite reporter
Basically http://www.yoururl.com works and but basically I have some files linked and i wanted to link to files with a relative path and not a fixed one.
So I was thinking about hyperlinks instead of file://c:\myfile.txt
Offline
Links inside the documents are handled in the current implementation (i.e. bookmarks).
URLs are recognized by Acrobat Readers.
You could create a new CreateExternalLink method just like TPdfDocument.CreateLink, by following the PDF reference about such external links.
Offline
You could create a new CreateExternalLink method just like TPdfDocument.CreateLink, by following the PDF reference about such external links.
Hello Arnaud,
I've written the following procedure to create external hyperlinks.
Even though I'm not a PDF expert, it looks like it is working even for complex links. Any feedback is welcome.
Hopefully this can be included as-is in SynPDF source code:
function TPDFDocument.CreateExternalLink(const ARect: TPdfRect; const anUrl: RawUTF8;
BorderStyle: TPdfAnnotationBorder; BorderWidth: integer): TPdfDictionary;
var
anAction: TPdfDictionary;
begin
result := CreateAnnotation(asLink, ARect, BorderStyle, BorderWidth);
anAction := TPdfDictionary.Create(FXRef);
anAction.AddItem('Type', 'Action');
anAction.AddItem('S', 'URI');
anAction.AddItemTextUTF8('URI', anUrl);
Result.AddItem('A', anAction);
end;
Offline
Pages: 1