导航:首页 > 文档加密 > asposewordpdf

asposewordpdf

发布时间:2022-10-02 13:52:59

‘壹’ Aspose pdf和word转换

需要使用“aspose-words”包,大小为13M,默认选项转换:

使用最新版19.3,按照API文档里说明的方式去转换,崩溃:

看到论坛上官方说要使用临时License解锁所有功能,申请并且添加认证成功:

但还是崩溃;最后按照首页广告里介绍写的方式去转换,崩溃:

不太可能吧!已经发帖求助官方。

最后论坛上又全部翻了一遍,android端的讨论很少,但是发现一位老哥遇到了同样的问题,官方的答复来看确实是有BUG:

最后的最后,尝试了旧版本,18.6,好吧,也还是崩溃;

回到之前调研的竞品com.hun.androidpdfchanger上,发现其PDF转word用的是在线的........

‘贰’ 在linux环境下,java怎么实现从word格式转换为pdf格式

linux环境下,word格式转换为pdf格式
word转换到PDF的步骤就相对简单了,我们只需要安装一款虚拟打印机软件“Virtual Pdf Printer”即可,它可以将你编辑好的word文档直接输出为PDF文件格式。

安装后在word中点击“打开”→“打印”,
在“打印机名称”中会看到多了一个“Virtual Printer”选项,
选中它,点击确定后(未注册版本有10秒的等待时间),
弹出“保存PDF文件”对话框,先选择文件的保存路径,
再点击“生成设置”按钮,弹出“系统设置”面板,
对输出后的PDF文件进行加密和字体等设置,
点击两次确定,当前的word文档就被转换成PDF格式的文件了.

‘叁’ 如何解决利用aspose把word文档转换为pdf文档时出现乱码 C#

Aspose.PDF不能将word文件转换成PDF文件,因此就会出现aspose把word文档转换为pdf文档时出现乱码情况。
aspose的官网上查了下文档,Aspose.PDF无法直接转换word文档,需要先有个中间步骤。就是先把word转换成XML格式的文件,再使用Aspose.PDF绑定这个XML,再保存为PDF格式。如果word文档中有图片,则生成XML的时候会在临时文件夹中生成图片。

‘肆’ aspose.word 把Word转成图片时,格式变了

Aspose.PDF无法直接转换word文档,需要先有个中间步骤。就是先把word转换成XML格式的文件,再使用Aspose.PDF绑定这个XML,再保存为PDF格式。如果word文档中有图片,则生成XML的时候会在临时文件夹中生成图片。
调整word图片位置方法如下:
1、打开一个word文档,插入一副图片;

2、要想随意调整图片,就要先来设置图片格式,在图片上点右键,选中“设置图片格式”;

3、在弹出的对话框中选择“文字环绕”,“浮于文字上方”,确认之后,就可以随意移动图片位置了,当然相应的文字位置也要根据需要调整。

‘伍’ aspose-word15.8.0收费吗

aspose-word15.8.0收费。aspose-word15.8.0是一个很强大的控件,可以用来操作word,excel,ppt等文件,用这个控件来导入、导出数据非常方便。aspose-word15.8.0是一个java类库,aspose-word15.8.0支持DOC,DOCX,RTF,HTML,OpenDocument,PDF,XPS,EPUB和其他格式。

aspose-word15.8.0功能

aspose-word15.8.0的功能主要可以分为:转换,对DOC,OOXML,RTF,WordprocessingML,HTML,MHTML,TXT和OpenDocument这些格式提供了高质量的转换与被转换功能。文档对象模型,以可编程形式来操作所有文档的元素,提供了大量的API,方便创建、修改、提取、拷贝、分离、加入和替换文档内容。

‘陆’ asp.net中,把word文档转为PDF格式文件的问题。

C#编程,将Word转PDF,该方法有一定弊端,但是比起网路上的其他方法来说,还算比较好的,弊端是需要客户机上安装有WORD2007或更高的版本。
1、添加引用:Microsoft.Office.Interop.Word版本12.0.0.0;2、在开头添加命名空间引用:usingMicrosoft.Office.Interop.Word;3、具体实现方法如下:
//Word转换成pdf
///<summary>
///把Word文件转换成为PDF格式文件///</summary>
///<paramname="sourcePath">源文件路径</param>///<paramname="targetPath">目标文件路径</param>///<returns>true=转换成功</returns>
privateboolWordToPDF(stringsourcePath,stringtargetPath){
boolresult=false;
Microsoft.Office.Interop.Word.WdExportFormatexportFormat=Microsoft.Office.Interop.Word.WdExportFormat.wdExportFormatPDF;objectparamMissing=Type.Missing;
Microsoft.Office.Interop.Word.=newMicrosoft.Office.Interop.Word.ApplicationClass();
Microsoft.Office.Interop.Word.DocumentwordDocument=null;try
{
objectparamSourceDocPath=sourcePath;stringparamExportFilePath=targetPath;
Microsoft.Office.Interop.Word.=exportFormat;
boolparamOpenAfterExport=false;
Microsoft.Office.Interop.Word.=Microsoft.Office.Interop.Word.WdExportOptimizeFor.wdExportOptimizeForPrint;Microsoft.Office.Interop.Word.WdExportRangeparamExportRange=Microsoft.Office.Interop.Word.WdExportRange.wdExportAllDocument;intparamStartPage=0;intparamEndPage=0;
Microsoft.Office.Interop.Word.WdExportItemparamExportItem=Microsoft.Office.Interop.Word.WdExportItem.wdExportDocumentContent;boolparamIncludeDocProps=true;boolparamKeepIRM=true;
Microsoft.Office.Interop.Word.=Microsoft.Office.Interop.Word.WdExportCreateBookmarks.wdExportCreateWordBookmarks;boolparamDocStructureTags=true;boolparamBitmapMissingFonts=true;boolparamUseISO19005_1=false;
wordDocument=wordApplication.Documents.Open(refparamSourceDocPath,refparamMissing,refparamMissing,refparamMissing,refparamMissing,refparamMissing,refparamMissing,refparamMissing,refparamMissing,refparamMissing,refparamMissing,refparamMissing,refparamMissing,refparamMissing,refparamMissing,refparamMissing);if(wordDocument!=null)
wordDocument.ExportAsFixedFormat(paramExportFilePath,paramExportFormat,paramOpenAfterExport,
paramExportOptimizeFor,paramExportRange,paramStartPage,paramEndPage,paramExportItem,paramIncludeDocProps,paramKeepIRM,paramCreateBookmarks,paramDocStructureTags,paramBitmapMissingFonts,paramUseISO19005_1,refparamMissing);
result=true;
if(wordDocument!=null){
wordDocument.Close(refparamMissing,refparamMissing,refparamMissing);wordDocument=null;}
if(wordApplication!=null){
wordApplication.Quit(refparamMissing,refparamMissing,refparamMissing);
wordApplication=null;}GC.Collect();
GC.WaitForPendingFinalizers();GC.Collect();
GC.WaitForPendingFinalizers();}catch{
result=false;
if(wordDocument!=null){
wordDocument.Close(refparamMissing,refparamMissing,refparamMissing);wordDocument=null;}
if(wordApplication!=null){

‘柒’ linux 安装中文字体解决Aspose word转PDF乱码

原因:
linux下没有中文字体支持,window下是正常的
解决方法:linux安装字体
解决前

解决后

字体安装后需要重启一下应用才生效

安装过程

字体目录:/usr/share/fonts/

cp window下的字体(C:\Windows\Fonts)到上面目录(/usr/share/fonts/my_fonts)中

就可以看到安装好的字体了

‘捌’ 如何使用文档处理控件Aspose.Word将图像转换为PDF文档

对于文档处理控件Aspose.words,它的具有代表性的功能是在没有安装MicrosoftWord的情况下,也能实现生成、打印、渲染、邮件合并,文档格式转换等功能。今天在使用Aspose.Words过程中,意外的发现这款文档处理软件的另外一个功能,它可以将图像转换为PDF文件,接下来就为大家分享一下实现这一功能的具体代码:

usingSystem;
usingSystem.Drawing;
usingSystem.Drawing.Imaging;
usingSystem.IO;
usingSystem.Reflection;

usingAspose.Words;
usingAspose.Words.Drawing;

namespaceImageToPdf
{
classProgram
{
publicstaticvoidMain(string[]args)
{
//Sampleinfrastructure.
stringexeDir=Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)+Path.DirectorySeparatorChar;
stringdataDir=newUri(newUri(exeDir),@"../../Data/").LocalPath;

ConvertImageToPdf(dataDir+"Test.jpg",dataDir+"TestJpgOut.pdf");
ConvertImageToPdf(dataDir+"Test.png",dataDir+"TestPngOut.pdf");
ConvertImageToPdf(dataDir+"Test.wmf",dataDir+"TestWmfOut.pdf");
ConvertImageToPdf(dataDir+"Test.tiff",dataDir+"TestTiffOut.pdf");
ConvertImageToPdf(dataDir+"Test.gif",dataDir+"TestGifOut.pdf");
}

///<summary>
///.Wordsfor.NET.
///</summary>
///<paramname="inputFileName">Filenameofinputimagefile.</param>
///<paramname="outputFileName">OutputPDFfilename.</param>
(stringinputFileName,stringoutputFileName)
{
//CreateAspose.Words.DocumentandDocumentBuilder.
//.
Documentdoc=newDocument();
DocumentBuilderbuilder=newDocumentBuilder(doc);

//Readtheimagefromfile,ensureitisdisposed.
using(Imageimage=Image.FromFile(inputFileName))
{
//.Forexample
//theframesofaBMPorTIFFare"pagedimension"whereasframesofaGIFimageare"timedimension".
FrameDimensiondimension=newFrameDimension(image.FrameDimensionsList[0]);

//.
intframesCount=image.GetFrameCount(dimension);

//.
intframesCount=image.GetFrameCount(FrameDimension.Page);

//Loopthroughallframes.
for(intframeIdx=0;frameIdx<framesCount;frameIdx++)
{
//,incaseofamulti-frameTIFF.
if(frameIdx!=0)
builder.InsertBreak(BreakType.SectionBreakNewPage);

//Selectactiveframe.
image.SelectActiveFrame(dimension,frameIdx);

//.
//.
PageSetupps=builder.PageSetup;
ps.PageWidth=ConvertUtil.PixelToPoint(image.Width,image.HorizontalResolution);
ps.PageHeight=ConvertUtil.PixelToPoint(image.Height,image.VerticalResolution);

//.
builder.InsertImage(
image,
RelativeHorizontalPosition.Page,
0,
RelativeVerticalPosition.Page,
0,
ps.PageWidth,
ps.PageHeight,
WrapType.None);
}
}

//SavethedocumenttoPDF.
doc.Save(outputFileName);
}
}
}
阅读全文

与asposewordpdf相关的资料

热点内容
怎么给磁盘加密c盘 浏览:380
内核驱动编译v1 浏览:574
韩国电影伦理中文 浏览:67
大乐透复式算法计算器 浏览:845
啄木鸟40部 浏览:502
我的世界服务器版本下载地址 浏览:925
怎么制作一个游戏的服务器 浏览:800
python中xticks用法 浏览:905
西瓜视频解压软心砖 浏览:137
程序员被孤立怎么办 浏览:807
主角秦风重生小说免费全文阅读 浏览:937
电影名卧布吉岛 浏览:161
泰国肉肉电影 浏览:499
电影无处可逃结局是什么 浏览:102
压缩性模量 浏览:352
平安老师讲解压力化解 浏览:459
快递员的电影是什么名字 浏览:780
日本电影叫什么鱼的名字 浏览:663
找书pdf 浏览:392
高水平应届程序员有前途吗 浏览:79