0

如何在柔性纸注释文档查看器中保存注释标记?

谢谢。

4

3 回答 3

0

只要您将“displayFormat”设置为“html”作为对象创建的一部分,位置的规范化/非规范化应该可以正常工作。归一化过程基本上是调整 X/Y/Width/Height 以使文档被认为是 1000 的高度。如果文档在 Flash 或 html 中的高度不同,则查看器会在显示注释时调整位置。它当然也将文档的宽度/高度的比例视为此过程的一部分。

FlexPaper 团队中所有最好的 Erik

于 2013-05-04T22:57:31.537 回答
0

好的,所以我想我在 Flexpaper 中发现了一个错误,它阻止了它的使用(错误在 Flash 版本中,尚未测试 HTML 版本)。如果有人真的让这个在 Flash 上工作,请告诉我!

基本上,addMark()正在执行不必要的坐标转换,这使得无法将您在同一位置提取的标记放回原处(这似乎只是笔记的情况,图纸似乎没有这个问题)。

以下是如何重现:

转到http://devaldi.com/annotations/UK_Investment_Fund.php?ro=flash,html并打开 Chrome JS 控制台。输入这些命令:

>> note = $FlexPaper('documentViewer').getMarkList()[2]
Object {width: 200, pageIndex: 1, height: 180, note: "The annotations plug-in allows both highlighting a…created↵↵Notes can be resized, moved and deleted.", id: "3AFE17A3-4977-3ECA-C468-70F2C40B81E8"…}

>> // Now try to add back in the same annotation
>> $FlexPaper('documentViewer').addMark(note)

>> // Notice that on the screen the note is in the wrong spot
>> // (not the same spot as the original one). Lets check the positioning

>> added_note = $FlexPaper('documentViewer').getMarkList()[6]

>> added_note.positionX
356.718192627824

>> note.positionX
-5.945303210463702
于 2013-05-04T19:24:52.013 回答
0

FlexPaper 提供了一个名为 getMarkList 的 JavaScript 函数:

marksArray = JSON.stringify($FlexPaper('documentViewer').getMarkList());

您可以使用 addMarks 再次应用注释:

var initialMarks = JSON.parse(marksArray);
$FlexPaper('documentViewer').addMarks(initialMarks);

这适用于 HTML5 版本,但我怀疑它也适用于 Flash 和 HTML 版本。

于 2013-04-24T14:57:49.067 回答