我正在尝试使用itextsharp将图像添加到pdf,无论图像大小如何,它始终显示为映射到pdf内的不同更大的尺寸?
我添加的图像是624x500像素(DPI:72):
alt text http://www.freeimagehosting.net/uploads/727711dc70.png
这是输出pdf的屏幕:
alt text http://www.freeimagehosting.net/uploads/313d49044d.png
这是我创建文档的方式:
Document document = new Document();
System.IO.MemoryStream stream = new MemoryStream();
PdfWriter writer = PdfWriter.GetInstance(document, stream);
document.Open();
System.Drawing.Image pngImage = System.Drawing.Image.FromFile("test.png");
Image pdfImage = Image.GetInstance(pngImage, System.Drawing.Imaging.ImageFormat.Png);
document.Add(pdfImage);
document.Close();
byte[] buffer = stream.GetBuffer();
FileStream fs = new FileStream("test.pdf", FileMode.Create);
fs.Write(buffer, 0, buffer.Length);
fs.Close();
Run Code Online (Sandbox Code Playgroud)
有关如何计算正确尺寸的任何想法?
我试过ScaleAbsolute,图像仍然呈现不正确的尺寸.
$("#btn_submit").click(function(){
alertify.prompt("Please enter note/remarks for this Form:", function (e, value) {
$("#alertify-ok").val('Submit Form'); //change button text
if (e) {
alertify.success("Form has been submitted");
} else {
alertify.error("Your form is not submitted");
}
});
Run Code Online (Sandbox Code Playgroud)
用于alertify提示对话框的HTML
<button id="alertify-ok" class="alertify-button alertify-button-ok" type="submit">
OK
</button>
Run Code Online (Sandbox Code Playgroud)
用户单击"提交"按钮时会出现提示.尝试使用下面的更改按钮文本,但它不起作用
$("#alertify-ok").val('Submit Form'); //change button text
Run Code Online (Sandbox Code Playgroud)
小提琴 - 我需要将默认OK按钮文本更改为其他内容
如何更改按钮文本Submit Form而不是默认值OK?