• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Anchors don't work in cfdocument

Explorer ,
Jul 13, 2007 Jul 13, 2007

Copy link to clipboard

Copied

I'm running CF7.0.2 and can't get anchors to work in the pdf (or flashpaper) even when they work in the HTML before I add the <cfdocument> wrapper.

Here's a very basic example that I can't get to work.
----------------------------
<cfdocument format="pdf">

<a name="page1"></a>
<h2>This is Page 1</h2>
<br />
Goto <a href="#page2">Page 2</a><br />
Goto <a href="#page3">Page 3</a>
<cfdocumentitem type="pagebreak" />


<a name="page2"></a>
<h2>This is Page 2</h2>
<br />
Goto <a href="#page1">Page 1</a><br />
Goto <a href="#page3">Page 3</a>
<cfdocumentitem type="pagebreak" />


<a name="page3"></a>
<h2>This is Page 3</h2>
<br />
Goto <a href="#page1">Page 1</a><br />
Goto <a href="#page2">Page 2</a>

</cfdocument>
----------------------

I did find some odd code that Dean Harmon used in his MAX2006 presentation regarding cfdocument. He mentions an "anchor" attribute for XHTML on page 3, slide 3 of his notes ( http://www.ammug.org/drupal/system/files/Unlocking+the+ColdFusion+Server+Black+Box.pdf)
I've never heard of an "anchor" attribute for the <a> tag and couldn't find it referenced by the W3C for XHTML. Nonetheless, I tried it in various ways in my PDF but couldn't get it to work either.

Any help is appreciated - William
http://www.williamhaun.com/
TOPICS
Advanced techniques

Views

627

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 15, 2007 Jul 15, 2007

Copy link to clipboard

Copied

I think you should include the whole HTML kalamazoo. Something along the lines of:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 15, 2007 Jul 15, 2007

Copy link to clipboard

Copied

Thanks but that didn't make a difference. I tried your code and it didn't work. My real-world code I'm having the issue with has all the appropriate HTML tags as well.

Any other ideas/suggestions out there?

Does anyone have example code of anchors working?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 15, 2007 Jul 15, 2007

Copy link to clipboard

Copied

I tried your code and it didn't work.
What happens?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 17, 2007 Jul 17, 2007

Copy link to clipboard

Copied

"it doesn't work" as in the PDF is created, the links are blue and underlined, you click them... nothing happens. No tooltip appears on mouse over either like it does if you have an <a href...> to an external URL.

Does your code snippet work for you? I tried it in Adobe Readers 7 & 8 and it didn't work in either for me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 17, 2007 Jul 17, 2007

Copy link to clipboard

Copied

LATEST
Does your code snippet work for you?
Yes. I have MX702 on Windows 2000 Pro SP4, IE6 SP1 and Adobe Reader 8.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation