C++操作Word回転pdf


word回転pdfは主にwordが持参した関数を利用し、主に3つの関数(1)Saveas()がある.(2)PrintOut();(3)ExportAsFixedFormat();この3つ
関数は実装できます.次に、説明に重点を置きます.
関数プロトタイプpublic:Void SaveAs(&Object^FileName,//ファイル名にはパス名が含まれています.たとえば、COleVariant(_T("G:\C+\MFC 2 table 1\000.pdf"))&Object^FileName,//17:wdFormatpdf&Object^LockComments,//false;COleVariant((short)false),&Object^Password,//空にする;COleVariant(_T(")&Object^AddToRecentFiles,//false;COleVariant(short)false,&Object^WritePassword,//空にする;COleVariant(_T(")&Object^ReadOnlyRecommende,//false;COleVariant((short)false),&Object^EmbedTrueTypeFonts,//falseを置く;COleVariant(short)false,&Object^SaveNativePictureFormat,//falseを置く;COleVariant(short)false,&Object^SaveFormsData,//false;COleVariant(short)false,&Object^SaveAsAOCCELetter,//falseを置く;COleVariant(short)false,&Object^Encoding,//false;COleVariant((short)false),&Object^InsertLineBreaks,//falseを置く;COleVariant((short)false),&Object^AllowSubstitutions,//falseを置く;COleVariant(short)false,&Object^LineEnding,//false;COleVariant(short)false,&Object^AddBiDiMarks//false;COleVariant((short)false), );
printOut()の場合、wordにはこのオプションが存在しなければ実行できません.一方、ExportAsFixedFormat()はC++で呼び出されないようで、MSDNではC++にはこの関数がなく、C#で実現できる
主な2番目のパラメータの設定:
Name
Value
Description
wdFormatDocument
0
Microsoft Office Word format.
wdFormatDOSText
4
Microsoft DOS text format.
wdFormatDOSTextLineBreaks
5
Microsoft DOS text with line breaks preserved.
wdFormatEncodedText
7
Encoded text format.
wdFormatFilteredHTML
10
Filtered HTML format.
wdFormatHTML
8
Standard HTML format.
wdFormatRTF
6
Rich text format (RTF).
wdFormatTemplate
1
Word template format.
wdFormatText
2
Microsoft Windows text format.
wdFormatTextLineBreaks
3
Windows text format with line breaks preserved.
wdFormatUnicodeText
7
Unicode text format.
wdFormatWebArchive
9
Web archive format.
wdFormatXML
11
Extensible Markup Language (XML) format.
wdFormatDocument97
0
Microsoft Word 97 document format.
wdFormatDocumentDefault
16
Word default document file format. For Microsoft Office Word 2007, this is the DOCX format.
wdFormatPDF
17
PDF format.
wdFormatTemplate97
1
Word 97 template format.
wdFormatXMLDocument
12
XML document format.
wdFormatXMLDocumentMacroEnabled
13
XML document format with macros enabled.
wdFormatXMLTemplate
14
XML template format.
wdFormatXMLTemplateMacroEnabled
15
XML template format with macros enabled.
wdFormatXPS
18
XPS format.