方维网站建设如何看到网站的制作公司

当前位置: 首页 > news >正文

方维网站建设,如何看到网站的制作公司,网络培训视频如何加速,led灯散热片技术支持 东莞网站建设GrapeCity PDF 文档 (GcPdf) 改进了对由 GcPdf 以外的软件生成的现有 PDF 文档的处理 在新的 v6.2 版本中#xff0c;GcPdf 增强了 PDF 文档的加载和保存#xff0c;并提供以下优势#xff1a; GcPdf 现在可以加载和保存可能不严格符合 PDF 规范的 PDF 文档。GcPdf 现在将…GrapeCity PDF 文档 (GcPdf) 改进了对由 GcPdf 以外的软件生成的现有 PDF 文档的处理 在新的 v6.2 版本中GcPdf 增强了 PDF 文档的加载和保存并提供以下优势 GcPdf 现在可以加载和保存可能不严格符合 PDF 规范的 PDF 文档。GcPdf 现在将保留 PDF 文档中嵌入的不属于 PDF 规范一部分的任何自定义数据。加载 PDF 文档的平均速度已得到提高。 由于 GcPdf 处理加载 PDF 的方式发生了变化一些较低级别的 GcPdf API 必须进行更改如果使用这些 API可能需要对代码进行少量更改受影响的 API 的完整列表。 无需指定密码即可使用受密码保护的文件 GcPdf 现在允许使用受密码保护的文件而无需指定密码。加载受密码保护的文件后您现在可以执行以下操作而无需指定密码 不基于 PDF 字符串对象的读/写属性例如 您可以获取/设置 CheckBoxField 或 RadioButtonField 的值获取某个文档的统计信息例如获取页数、注释等获取或更改文档元数据因为元数据通常未加密更改某些类型字段的值CheckBoxField、RadioButtonFieldTextBoxField 和 CombTextField 的值可以更改但有一些限制如果可以在不使用 PDF 字符串的情况下定义新对象则可以添加新对象例如您可以将 SquareAnnotation 添加到页面或所有页面 引入了一个新的DecryptionOptions类来表示解密选项。加载加密的 PDF 时您可以将其作为可选参数传递给 GcPdfDocument.Load() 方法。特别是您可以将DecryptionOptions.ThrowExceptionIfInvalidPassword标志设置为 false默认情况下为 true以允许加载受密码保护的 PDF而无需指定其密码。另一个相关标志是DecryptionOptions.ThrowExceptionIfUnsupportedSecurityOptions。默认情况下也是如此。将其设置为 false 将使 GcPdf 能够加载具有未知或损坏的安全处理程序的文档。 以下代码在不指定密码的情况下向受密码保护的 PDF 添加注释 using var fs File.OpenRead(financial-report.pdf); var doc new GcPdfDocument(); doc.Load(fs, new DecryptionOptions() { ThrowExceptionIfInvalidPassword false, ThrowExceptionIfUnsupportedSecurityOptions false }); // Get the size of the first page: var page doc.Pages[0]; var pageSize page.Size; // Add a square annotation: SquareAnnotation sa new SquareAnnotation(); sa.Page page; sa.Rect new RectangleF(10, 10, pageSize.Width - 20, pageSize.Height - 20); sa.Color Color.Red; doc.Save(AnnotationAdded.pdf); 用于处理低级 PDF 原语的新 APIGrapeCity.Documents.Pdf.Spec 和 GrapeCity.Documents.Pdf.Wrappers 命名空间 在此版本中GcPdf 引入了一个新的 API允许熟悉 PDF 规范的开发人员直接访问原始 PDF 对象这些对象是任何 PDF 文档的构建块。这些包括 PDF 数组请参阅 GrapeCity.Documents.Pdf.Spec 类型 PdfArray、PdfArrayObject、IPdfArray、IPdfArrayExt 和 GrapeCity.Documents.Pdf.Wrappers.PdfArrayWrapper。PDF bool请参阅 GrapeCity.Documents.Pdf.Spec 类型 PdfBool、PdfBoolObject、IPdfBool 和 IPdfBoolExt。PDF 词典请参阅 GrapeCity.Documents.Pdf.Spec 类型 PdfDict、PdfDictObject、IPdfDict、IPdfDictExt 和 GrapeCity.Documents.Pdf.Wrappers.PdfDictWrapper。PDF 名称请参阅 GrapeCity.Documents.Pdf.Spec 类型 PdfName、PdfNameObject、IPdfName 和 IPdfNameExt。PDF null请参阅 GrapeCity.Documents.Pdf.Spec 类型 PdfNull、PdfNullObject、IPdfNull 和 IPdfNullExt。PDF 编号请参阅 GrapeCity.Documents.Pdf.Spec 类型 PdfNumber、PdfNumberObject、IPdfNumber 和 IPdfNumberExt。PDF 参考请参阅 GrapeCity.Documents.Pdf.Spec 类型 PdfRef、PdfRefObject、IPdfRef 和 IPdfRefExt。PDF 流请参阅 GrapeCity.Documents.Pdf.Spec.PdfStreamObjectBase。PDF 字符串请参阅 GrapeCity.Documents.Pdf.Spec 类型 PdfString、PdfStringObject、IPdfString 和 IPdfStringExt。 例如这些新的 API 可用于访问有时由 PDF 制作者添加但未在 PDF 规范中描述的自定义属性。例如DocumentInfo 对象是 PDF 字典。PDF 规范列出了该字典中可以出现的属性创建者、作者等。尽管如此在许多现实生活中的 PDF 文件中DocumentInfo 字典包含 PDF 规范中不存在的“SourceModified”属性。GrapeCity.Documents.Pdf.Spec 命名空间中的类型现在允许开发人员访问/编辑此类自定义项目。 有关 GrapeCity.Documents.Pdf.Spec 和 GrapeCity.Documents.Pdf.Wrappers 命名空间的更多信息请参阅 GcPdf 参考。 示例获取图像属性 使用上面的新 API现在可以使用从流中检索的图像来处理由图像扫描仪创建的许多 PDF其中大多数每页仅包含一个 JPEG 或 G4 TIFF 图像。GcPdf 包含新的PdfImageInfo类它是新的PdfDictWrapper对象的后代。该类包含许多允许获取底层 PDF 流对象的属性/数据的方法。此添加将检索流图像并直接解压缩或处理图像。 您可以检索以下图像属性 直接检索每个页面上每个图像的流使用 GetImages() 检索检索上述图像流的压缩格式Filter检索上述图像流的黑白信息Decode或BlackIs1检索可以识别上述图像流颜色的信息ColorSpace 或 BitsPerComponent检索流和每个掩码ImageMask的信息和更多 以下代码从 PDF 流中检索图像属性 using (FileStream fs new FileStream(......\06-1.pdf, FileMode.Open, FileAccess.Read, FileShare.Read)) {GcPdfDocument doc new GcPdfDocument();doc.Load(fs);GcPdfDocument doc new GcPdfDocument();doc.Load(fs);var imgs doc.GetImages();// Get the info about the first image in the PDF// (we know there is one image, so no index checks for examples simplicity sake):PdfImage pi (PdfImage) imgs[0].Image; // NOTE: no cast here, PdfImageBase is the type of the Image property.Console.WriteLine(\(PdfImage object ID: {pi.ObjID});// The PdfImage is a descendant of PdfDictWrapper object it has a lot of methods// which allow to get properties/data of underlying PDF stream objectusing (PdfStreamInfo psi pi.GetPdfStreamInfo()){Console.WriteLine(\) Image stream length: {psi.Stream.Length});Console.WriteLine(\( ImageFilterName: {psi.ImageFilterName});Console.WriteLine(\)ImageFilterDecodeParams: {psi.ImageFilterDecodeParams});// dump content of ImageFilterDecodeParamsforeach (var kvp in psi.ImageFilterDecodeParams.Dict){Console.WriteLine(\({kvp.Key}: {kvp.Value});}// example how to get value of BlackIs1:var blackIs1 psi.ImageFilterDecodeParams.GetBool(PdfName.Std.BlackIs1, null);Console.WriteLine(\)BlackIs1: {blackIs1});}// dump properties of PdfImage dictionaryConsole.WriteLine();Console.WriteLine(Properties of PdfImage dictionary:);foreach (KeyValuePairPdfName, IPdfObject kvp in pi.PdfDict.Dict){Console.WriteLine(\({kvp.Key}: {kvp.Value});} var cs pi.GetIPdfObject(PdfName.Std.ColorSpace);Console.WriteLine(\)ColorSpace: {cs.GetType().Name} {cs});var bpc pi.GetIPdfObject(PdfName.Std.BitsPerComponent);Console.WriteLine(\(BitsPerComponent: {bpc?.GetType().Name} {bpc}); } 复制 输出显示检索到的所有图像属性。 ​ 在文本字段中设置格式 GcPdf 现在允许用户使用添加到 TextField、CombTextField、ComboBoxField 类的新直接方法SetPercentFormat、SetNumberFormat、SetDateFormat、SetTimeFormat、SetSpecialFormat 方法以直观的方式指定 TextField 的日期、时间、数字格式和特殊格式。新方法将支持设置类似于 Acrobat 中的 TextField 属性的属性。 添加了新的枚举SpecialFormat、CurrencySymbolStyle、NumberNegativeStyle和NumberSeparatorStyle 。这些在上述方法中用作参数。 以下代码使用新方法和参数设置 TextField 上的数值 GcPdfDocument doc new GcPdfDocument(); var p doc.NewPage(); var g p.Graphics;TextField result new TextField(); result.Widget.Page p; result.Widget.Rect new System.Drawing.RectangleF(100,100,100,100); result.Widget.Border.Width 1;result.SetNumberFormat(2, Field.NumberSeparatorStyle.Dot, Field.NumberNegativeStyle.ShowParentheses, \u20ac, Field.CurrencySymbolStyle.BeforeNoSpace);result.Value 12345.67f; result.SetNumberValue(12345.67f, 2, Field.NumberSeparatorStyle.Dot, Field.NumberNegativeStyle.None, \), Field.CurrencySymbolStyle.BeforeNoSpace);p.Doc.AcroForm.Fields.Add(result);doc.Save(NumberTextField.pdf); GrapeCity 文档 PDF 查看器 (GcPdfViewer) 文档列表面板增强功能 GcPdfViewer 现在支持使用自定义 HTML 标记增强文档列表面板。GcPdfViewer 在DocumentListItem类型中提供name、path、title和PreviewContent属性允许用户指定自定义 HTML 标记来表示文档列表。以下是属性的简要说明 名称 - 显示文档列表项的名称路径 - PDF 文档的绝对或相对 URL标题 - 项目工具提示PreviewContent - 文档列表中用作预览内容的 HTML 内容 现有的客户端属性和方法 - documentListUrl选项以及addDocumentListPanel 和loadDocumentList 方法已得到增强可以接受DocumentListItem作为参数来指定文档列表项的预定义列表。 以下代码将属性设置为文档列表面板中的第一个图块“Finance” const options { workerSrc: /documents-api-pdfviewer/demos/product-bundles/build/gcpdfviewer.worker.js,supportApi: {apiUrl: window.top.SUPPORTAPI_URL,token: window.top.SUPPORTAPI_TOKEN,webSocketUrl: false},restoreViewStateOnLoad: false};const baseAssetsPath /documents-api-pdfviewer/demos/product-bundles/assets/;options.documentListUrl [ { path: baseAssetsPath pdf/documents-list/financial-report.pdf,title: Finance,previewContent: renderPreviewCard(Finance, View Financial, budget reports and collaborate over them., baseAssetsPath images/preview/svg/Finance.svg)}, ]; 复制 ​ 键盘快捷键 GcPdfViewer 支持多种键盘快捷键可以提高在查看器中处理 PDF 文档的效率。GcPdfViewer 还支持重新定义、禁用、覆盖和删除默认键盘快捷键以及将默认键盘快捷键绑定到其他键并使用 ViewerOptions 类的快捷方式选项通过 API 创建自定义键盘快捷键。  GcPdfViewer 还支持重新定义、禁用、覆盖和删除默认键盘快捷键以及将默认键盘快捷键绑定到其他键并使用 ViewerOptions 类的快捷键选项通过 API 创建自定义键盘快捷键。  以下代码有助于将holdToPan 操作绑定到“P”键 // Bind the P shortcut to the holdToPan action and leave the CtrlP shortcut for the print action. viewer.options.shortcuts[P] [{ ctrl: true, tool: print }, { tool: holdToPan }];