• R/O
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

圧縮フォルダを解凍する。画像が複数含まれるので分割する。フォルダごとにpdfに変換


Commit MetaInfo

修訂2 (tree)
時間2017-09-08 10:06:52
作者bellyoshi

Log Message

pdf作成

Change Summary

差異

--- WindowsApp1/WindowsApp1/Form1.Designer.vb (revision 1)
+++ WindowsApp1/WindowsApp1/Form1.Designer.vb (revision 2)
@@ -24,6 +24,7 @@
2424 Private Sub InitializeComponent()
2525 Me.btnExecute = New System.Windows.Forms.Button()
2626 Me.TextBox1 = New System.Windows.Forms.TextBox()
27+ Me.lstLog = New System.Windows.Forms.ListBox()
2728 Me.SuspendLayout()
2829 '
2930 'btnExecute
@@ -43,11 +44,21 @@
4344 Me.TextBox1.TabIndex = 1
4445 Me.TextBox1.Text = "D:\ZIP\(一般コミック) [横山光輝] 三国志 全60巻"
4546 '
47+ 'lstLog
48+ '
49+ Me.lstLog.FormattingEnabled = True
50+ Me.lstLog.ItemHeight = 12
51+ Me.lstLog.Location = New System.Drawing.Point(41, 128)
52+ Me.lstLog.Name = "lstLog"
53+ Me.lstLog.Size = New System.Drawing.Size(120, 88)
54+ Me.lstLog.TabIndex = 2
55+ '
4656 'Form1
4757 '
4858 Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
4959 Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
5060 Me.ClientSize = New System.Drawing.Size(600, 261)
61+ Me.Controls.Add(Me.lstLog)
5162 Me.Controls.Add(Me.TextBox1)
5263 Me.Controls.Add(Me.btnExecute)
5364 Me.Name = "Form1"
@@ -59,4 +70,5 @@
5970
6071 Friend WithEvents btnExecute As Button
6172 Friend WithEvents TextBox1 As TextBox
73+ Friend WithEvents lstLog As ListBox
6274 End Class
--- WindowsApp1/WindowsApp1/Form1.vb (revision 1)
+++ WindowsApp1/WindowsApp1/Form1.vb (revision 2)
@@ -1,5 +1,10 @@
1-Public Class Form1
1+Imports System.IO, com
2+Imports iTextSharp.text.pdf
3+Imports iTextSharp.text
4+
5+Public Class Form1
26 Private Sub btnExecute_Click(sender As Object, e As EventArgs) Handles btnExecute.Click
7+ lstLog.Items.Add("処理開始")
38 Dim allPath = TextBox1.Text '全冊フォルダ
49 '全冊フォルダのzipファイルを列挙するし以下を繰り返す。
510 'tempフォルダがあれば削除する。
@@ -12,6 +17,17 @@
1217 '2番目以降のファイルを読み込む。
1318 '2つに分割し右側をfilename_count.jpeg,左側をfilename_count+1.jpegとして保存する
1419 'tempフォルダをpdf化する
15-
20+ 'A4サイズを横向きで
21+ Dim pdfDocument = New Document(PageSize.A4.Rotate(), 0, 0, 0, 0)
22+ '出力先のファイル名
23+ Dim makePdfFilePath = "d:\test.pdf"
24+ Dim fileStream = New FileStream(makePdfFilePath, FileMode.Create)
25+ Dim writer = PdfWriter.GetInstance(pdfDocument, fileStream)
26+ 'PDFドキュメントを開く
27+ pdfDocument.Open()
28+ pdfDocument.Add(New Paragraph("test"))
29+ 'PDFドキュメントを閉じる
30+ pdfDocument.Close()
31+ lstLog.Items.Add("処理終了")
1632 End Sub
1733 End Class