Hi Mattias (ea),
sorry for jumping in with another, but hopefully related question!
I am looking for a way to handle internal names (targets, text anchors?)
with swf files. Like links to a page or URL, but to named tags in this case.
This thread might indicate a way to extract the needed information (xref
info: names <-> page number) out of any status reports.
So here my questions for the experts (before I follow dead end links):
- is using -vvv and parsing the resulting messages a feasible approach
for what I need? WIll that information be output? Or is swfdump a better
way?
- I saw in lib\devices\swf.c a function called
swfoutput_namedlink(gfxdevice_t*dev, char*name, gfxline_t*points)
Right after the functions linktopage and linktourl. My hope is, this
function already does support something helpful for my needs.
But I do not know how to make use of it and if it provides what I need.
Any hint would be highly appreciated!
Regards
Hans
Am 24.11.2010 22:37, schrieb DannyT:
Thanks Matthias,
I was going along a similar line with pdf2swf using the verbose flag
(-vvv), is the following part of that output equivilent or less
reliable for any reason?
TRACE drawing link 146.00/97.00 146.00/72.00 167.00/72.00
167.00/97.00 to http://mylink.com/ (" link ")
This obviously gives us the link address as well which we also need
(forgot to mention that). I was planning to parse the output to look
for those lines per page and use that. Would the dimensions of the
page be accurate using this approach?
Many thanks for your help.
Dan
On 24 November 2010 20:54, Matthias Kramm <[email protected]
<mailto:[email protected]>> wrote:
On Wed, Nov 24, 2010 at 07:30:16PM +0000, DannyT
<[email protected] <mailto:[email protected]>> wrote:
> Apologies if this is OT but can anyone suggest a means of extracting
> hyperlink coordinates per page of a converted pdf? Alongside the
swf output
> we're now also exporting a png but want to generate imagemaps to
add back in
> the hyperlinks. Does any of the swftools tools help acheive this?
More or less- here's what you can do:
Use "swfdump -u file.swf" to look for lines like
[007] 61 DEFINEBUTTON defines id 0016
uses IDs: <id1>,<id2>,<id3>,<id4>
Then run "swfdump -b file.swf" to look up the respective ids <id1>:
[020] 35 DEFINESHAPE3 defines id <id1>
bbox [0.00, 100.00, 100.00, 200.00]
This will give you the hyperlink coordinates (boxes) for each
for the links.
Lines like
[001] 0 SHOWFRAME 2 (00:00:03,994)
will be seperating the pages.
Matthias
--
http://danny-t.co.uk