小编Pau*_*aul的帖子

ABCpdf不会在IIS6下的Web应用程序中呈现图像

我正在尝试使用ABCpdf将包含图像的网页渲染到pdf文档中.这是通过Web应用程序完成的.

当我在IIS5中的开发机器上运行应用程序时,一切都很好.当我在IIS6上部署应用程序时,图像不会出现在pdf中.

为了重现这个问题,我创建了一个简单的Web应用程序来从一个简单的网页渲染一个pdf文件,我发现非本地的图像是那些没有出现在pdf中的图像.

与ABCpdf交互的相关代码是:

Doc theDoc = new Doc();
theDoc.Rect.Inset(18, 18);
theDoc.HtmlOptions.PageCacheEnabled = false;
theDoc.HtmlOptions.PageCacheClear();
theDoc.HtmlOptions.UseNoCache = true;
theDoc.HtmlOptions.Timeout = 60000;

int theID = theDoc.AddImageUrl(theUrl);

while (true)
{
  if (!theDoc.Chainable(theID)) break;
  theDoc.Page = theDoc.AddPage();
  theID = theDoc.AddImageToChain(theID);
}

for (int i = 1; i <= theDoc.PageCount; i++)
{
  theDoc.PageNumber = i;
  theDoc.Flatten();
}

theDoc.Save(location);
theDoc.Clear();
Run Code Online (Sandbox Code Playgroud)

我用于测试的html页面是这样的:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Test page</title></head>

<body>
<p>This is a local image</p>
<img src="http://myserver/test/images/testimage.gif" />

<p>This is a …
Run Code Online (Sandbox Code Playgroud)

iis-6 abcpdf

8
推荐指数
1
解决办法
4458
查看次数

Vue在更改路由时重新创建父组件

我在项目中将 Vue.js 与 Vue-router 一起使用,问题是当路由更改时,包含 router-view 的组件会被销毁。这意味着页面上的所有其他组件都被销毁,因此整个事情看起来就像页面刷新一样。

我最近开始使用 Vue,我正在开发的应用程序充满了大量遗留代码,并且很难简化为基础代码,因此我很难隔离问题。

我尝试用小提琴重现该问题,但没有成功。这是模板代码:

<div id="router-app">
  <router-view></router-view>
</div>

<template id="tricky-place">
  <div>
    <h1>Tricky place</h1>
    <ul>
      <li>
        <router-link to="/panel1">Panel1</router-link>
      </li>
      <li>
        <router-link to="/panel2">Panel2</router-link>
      </li>
    </ul>
    <router-view></router-view>
  </div>
</template>

<template id="tricky-place-panel1">
  <div>
    <h2>Panel1</h2>
  </div>
</template>

<template id="tricky-place-panel2">
  <div>
    <h2>Panel2</h2>
  </div>
</template>
Run Code Online (Sandbox Code Playgroud)

和脚本:

const TrickyPlace = Vue.component('tricky-place', {
    created() {
      console.log("TrickyPlace - created");
    },
    mounted() {
        console.log("TrickyPlace - mounted");
    },
    updated() {
        console.log("TrickyPlace - updated");
    },
    destroyed() {
       console.log("TrickyPlace - destroyed");
    },
  template: '#tricky-place'
});

const TrickyPlacePanel1 = …
Run Code Online (Sandbox Code Playgroud)

vue.js vue-router vuejs2

4
推荐指数
1
解决办法
1878
查看次数

标签 统计

abcpdf ×1

iis-6 ×1

vue-router ×1

vue.js ×1

vuejs2 ×1