如何让 FileMaker 中的 WebViewer 一致地打印文本?

发布于 2024-11-15 04:22:55 字数 1260 浏览 7 评论 0原文

我正在使用 FileMaker (FMP 11) 来显示 Web 查看器(据我所知,它基本上是 Windows 上的嵌入式 Internet Explorer 和 Mac 上的 Safari)。 Web 查看器包含一个文本表格。网络查看器的内容在我的控制之下。

我希望能够打印此内容(使用文件|打印或打印脚本步骤),并且它应该看起来不错。

在 OS X 上,这工作得很好。打印输出的字体平滑,字母间距等良好。

在不同的 Windows 机器上我得到不同的结果。我一直在开发的主要版本(带有 IE 6 和更高版本的 IE 8 的 Windows XP)莫名其妙地将所有字符挤压在一起。因此,例如,如果我在其中一个单元格中有一个值“2.65”,则它看起来像 265,因为“.”与“2”的尾部重叠。其他字母/数字也与它们的邻居部分重叠。如果我打印为 PDF(使用 PDFCreator),则文本不会出现块状(即您可以直接放大)。问题是字母间距。如果我直接在 IE 中加载相同的 HTML 并从那里打印,一切看起来都很好。所以它似乎特定于 FileMaker 中的网络查看器。

在另一台 Windows 计算机(带有 FMPA 10 和 Internet Explorer 9 的 Win7)上,打印的文本模糊。打印到 PDFCreator 显示文本是块状的而不是基于矢量的。

在另一台装有 IE 7 的 XP 计算机上,输出看起来正常。非块状且不被压扁。

我尝试过各种不同的字体。我尝试将字母间距设置为例如 2px,这对文本被挤压的机器有所帮助。

我还尝试在 FileMaker 中进入预览模式并单击“另存为 PDF”按钮。这会产生比上面更糟糕的输出,因为生成的 PDF 中的 Web 查看器内容具有令人讨厌的 JPEG 伪影。

此外,如果我将 Web 查看器的大小设置为适合 A4 页面,然后保存文件并将其加载到 OS X 上的 FileMaker 上,则 Web 查看器对于页面而言太大。这与页边距有关吗?

为什么会发生这种情况?我该如何修复它?即如何让 FileMaker + Webviewer 在各种机器上保持一致打印?

编辑:如果我将内容保存到文件中并直接将其加载到 Internet Explorer 中,并且从那里可以正常打印,那么它肯定与 FileMaker 中的嵌入式浏览器控件有关。在 WebViewer 中使用 window.print() 也适用于 Windows,但不适用于 OS X。因此,我必须确保 WebViewer 包含需要打印和调用 window 的所有内容.print()(适用于 Windows 和 OS X)我必须从 FileMaker 进行打印。布莱赫。

I am using FileMaker (FMP 11) to display a webviewer (which, as far as I understand it, is basically an embedded Internet Explorer on Windows and Safari on Mac). The webviewer contains a table of text. The contents of the webviewer are under my control.

I want to be able to print this (using File|Print, or the Print script step), and it should look good.

On OS X, this works fine. The font in the printed output is smooth and the letter spacing etc. is good.

On different Windows machines I get different results. The main one I've been working on (Windows XP with I.E. 6 and later I.E. 8) inexplicably squashes all the characters together. So e.g. if I have a value "2.65" in one of the cells, it looks like 265 because the "." overlaps with the tail of the "2". Also other letters/digits partially overlap their neighbours. If I print to PDF (using PDFCreator) then the text is not blocky (i.e. you can zoom right in). The problem is the letter spacing. If I load the same HTML directly in I.E. and print from there, everything looks good. So it seems specific to the webviewer in FileMaker.

On another Windows machine (Win7 with FMPA 10 and Internet Explorer 9) the printed text is fuzzy. Printing to PDFCreator shows that the text is blocky instead of vector based.

On another XP machine with I.E. 7, the output looks OK. Non-blocky and not squashed.

I've tried various different fonts. I've tried setting the letter-spacing to e.g. 2px which helps on the machine where the text is squashed.

I've also tried going into Preview mode in FileMaker and clicking on the Save as PDF button. This produces even worse output than the above, because the contents of the webviewer in the generated PDF have nasty JPEG artifacts.

Also, if I set the size of the web viewer to fit on an A4 page and then save the file and load it up on FileMaker on OS X, the web viewer is too big for the page. Is this to do with page margins?

Why is this happening? How do I fix it? i.e. how do I get FileMaker + Webviewer to print consistently on various machines?

EDIT: If I save the content to a file and load it up in Internet Explorer directly and it prints fine from there, so it definitely has something to do with the embedded browser control in FileMaker. Using window.print() from within the webviewer also works on Windows, but not on OS X. So I'll have to make sure the webviewer contains everything that needs to print and call window.print() for Windows and on OS X I'll have to print from FileMaker. Bleh.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

千秋岁 2024-11-22 04:22:55

您是否考虑过从网络查看器外部打印它?也就是说,如果它是 HTML,并且如果将其保存到桌面,它应该可以正常打印...所以您不能编写一个脚本来抓取 webviewer 内容,将其粘贴在字段中,将该字段的内容导出到桌面,然后操作系统(PC 或 Mac)打印它吗?

Have you thought about printing it from outside the webviewer? I.e. if it's HTML and it should print fine if you save it to the desktop... so can't your write a script to grab the webviewer content, stick it in a field, export that field's contents to the desktop, and then have the OS (PC or Mac) print it?

指尖凝香 2024-11-22 04:22:55

你没有说你是如何制作表格的。你使用的是老派......还是CSS?字体大小等均基于浏览器首选项。使用 CSS 可能会为您提供更可控的结果,但正如您所见,平台/浏览器版本之间存在差异......

You didn't say how you're producing the table. Are you using old school ... or CSS? Font sizes, etc. are all based on browser prefs. Using CSS may provide you with more controllable results but as you've seen, there are variances between platforms/browser versions...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文