html静态页生产A4纸大小pdf图片,倒入InDesign中怎么设置?

html-css015

html静态页生产A4纸大小pdf图片,倒入InDesign中怎么设置?,第1张

要将HTML页面设置为A4纸大小,可以使用CSS中的@page规则。例如,可以在HTML文档的<head>元素中包含以下样式:

@page {

size: A4

margin: 0

}

这将设置HTML页面的尺寸为A4,并且不会有页边距。

此外,可以使用以下样式来设置不同的页边距:

@page {

size: A4

margin: 2cm 3cm 2cm 3cm/* top right bottom left */

}

若要在InDesign中导入动态数据,可以使用InDesign的数据合并功能。 数据合并允许您将数据源(例如CSV文件或Excel工作簿)链接到InDesign文档,并在文档中创建一系列相同的布局页面,其中每个页面都显示来自数据源的不同记录。 请参阅InDesign的文档或教程了解有关如何使用数据合并的详细信息。

此外,您还可以使用InDesign的脚本功能来动态地将数据导入到InDesign文档中。 请参阅InDesign的文档或相关教程了解有关如何使用脚本的详细信息。

在project栏右键 -->new -->html file

或者直接在最上面一栏的file -->new -->html file

或者file -->new project -->html5 boilerplate

动态页面如aspx,php等以html,shtml等形式表示

可用模板或urlrewriter静态化

public static bool WriteFile(string strText,string strContent,string strAuthor)

{

string path = HttpContext.Current.Server.MapPath("/news/")

Encoding code = Encoding.GetEncoding("gb2312")

string temp = HttpContext.Current.Server.MapPath("/news/template.html")

StreamReader sr=null

StreamWriter sw=null

string str=""

try

{

sr = new StreamReader(temp, code)

str = sr.ReadToEnd()

}

catch(Exception exp)

{

HttpContext.Current.Response.Write(exp.Message)

HttpContext.Current.Response.End()

sr.Close()

}

public static string getUrltoHtml(string Url)

{

errorMsg = ""

try

{

System.Net.WebRequest wReq = System.Net.WebRequest.Create(Url)

System.Net.WebResponse wResp =wReq.GetResponse()

System.IO.Stream respStream = wResp.GetResponseStream()

System.IO.StreamReader reader = new System.IO.StreamReader(respStream, System.Text.Encoding.GetEncoding("gb2312"))

return reader.ReadToEnd()

}

catch(System.Exception ex)

{

errorMsg = ex.Message

}

return ""

}