【问题标题】:How print PDF with hyperLink如何使用超链接打印 PDF
【发布时间】:2013-07-13 21:40:11
【问题描述】:

我尝试使用 HyperLink 打印 PDF,但没有成功

我有一个带有数据的锁定字段“etat”

数据格式如下:

代码 TAB Nom TAB 地址 TAB Ville 56 Eric rue caboteur ST NAZAIRE 87 Franc rue Midin ST brevin 等等

第 3 项“地址”的 textStyle 设置为“链接和链接文本设置为“”http://maps.google.fr/maps?f=q&hl=fr&q=theadresse“”

当我点击“etat”字段中的超链接项目时,工作正常

现在我希望在 PDF 中打印此字段后得到相同的结果

我使用此代码进行打印

on mouseUp
  local theResult,thepDF
  ask file "" with type "PDF file|pdf|PDF "
  if it = "" then
    exit mouseUp
  end if

  put it into thePDF

  put the htmltext of fld "etat" into theResult

  --set the fileType to "revoPDF "
  open printing to pdf thePDF
    revPrintField the name of field "etat"
    --revPrintText theResult,"<%pageNumber%> of <%numPages%>","<%pageNumber%> of   <%numPages%>",the long id of field "etat" of stack "CDH"
  close printing

end mouseUp

我有一个不错的 PDF,带有点击的文字,但点击不会启动谷歌地图

字典说命令“打印链接”

"打印字段时,任何将其 linkText 属性与链接 textStyle 一起设置的文本都被视为已执行打印链接命令,该属性的内容为链接,文本的 formattedRect 为矩形。 "

但是没有工作....我很头疼

感谢您帮助实现这一目标

埃里克

【问题讨论】:

    标签: livecode


    【解决方案1】:

    我正在尝试了解您的问题并阅读您的代码,我想可能是链接文本......

    "http://maps.google.fr/maps?f=q&hl=fr&q=theadresse"
    

    应该是……

    "http://maps.google.fr/maps?f=q&hl=fr&q=" & theadresse
    

    这是假设 theadresse 是一个包含在 Google 中搜索的有效地址的变量。

    【讨论】:

    • 第一个链接有效。但是,最好测试一下问题是出在 PDF 中的 URL 生成还是特定的 URL。我会先尝试一个简单的 URL。
    猜你喜欢
    • 2019-10-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-19
    • 2023-03-22
    相关资源
    最近更新 更多