Int pdfCount = 0 //'total input pdf file count Optional ByVal keywords As String = "") Optional ByVal title As String = "", _ Optional ByVal subject As String = "", _ Optional ByVal creatorName As String = "", _ Optional ByVal authorName As String = "", _ Public Boolean MergePdfFiles(String pdfFiles, String outputPath) Return("No files to process, use AddFile method") Page = writer.GetImportedPage(reader2, i) Ĭb.AddTemplate(page, 0, -1f, 1f, 0, 0, reader2.GetPageSizeWithRotation(i).Height) Ĭb.AddTemplate(page, 0f, 1f, -1f, 0f, reader2.GetPageSizeWithRotation(i).Width, 0f) reader2 = new (GetFullPath(sourceFile)) ĭocument.SetPageSize(reader2.GetPageSizeWithRotation(i)) writer = .GetInstance(document, new System.IO.FileStream(targetPath, System.IO.FileMode.Create)) Public string ConcatFilesOld(List files, string targetPath) PdfImportedPage pg = wr.GetImportedPage(prd, i) PdfContentByte content = wr.DirectContent įor (int i = 1 i <= prd.NumberOfPages i++) Wr.SetPdfVersion(PdfWriter.PDF_VERSION_1_6) wr.SetPdfVersion(PdfWriter.PDF_VERSION_1_7) System.IO.MemoryStream output = new System.IO.MemoryStream() psize = prd.GetPageSize(1) ĭocument doc = new Document(psize, 50, 50, 50, 70) Public byte SetMetadati(System.IO.MemoryStream inputPdf, IDictionary md) LogTool.SaveLogMessage(ex, actionName, this.csName) NewPage = writer.GetImportedPage(reader, j) PdfContentByte cb = writer.DirectContent Using (System.IO.MemoryStream ms = new System.IO.MemoryStream()) Private byte MergePDFFiles(List fileList) Writer.SetEncryption(.STRENGTH128BITS, UserPassword, null, (int)PDFpermisson) ĭocument.SetPageSize(reader.GetPageSizeWithRotation(i)) Public string ModifyPermissions(string PathSource, string PathTarget, string UserPassword, List Permissons) Reader = new (file) Ĭb.AddTemplate(page, 0f, 1f, -1f, 0f, reader.GetPageSizeWithRotation(i).Width, 0f) writer = .GetInstance(document, new System.IO.FileStream(GetFullPath(targetPath), System.IO.FileMode.Create)) Rectangle pageSize = PageSize.GetRectangle(pSize) Public string SetSize(string sourceFile, string pSize, string targetPath) InsertText(cb, fontSize, x, y, text, angle, red, green, blue, opacity) Page = writer.GetImportedPage(reader, i) Ĭb.AddTemplate(page, 0, -1f, 1f, 0, 0, reader.GetPageSizeWithRotation(i).Height) Ĭb.AddTemplate(page, 1f, 0, 0, 1f, 0, 0) writer = .GetInstance(document, new System.IO.FileStream(PathTarget, System.IO.FileMode.Create)) document = new (reader.GetPageSizeWithRotation(1)) Return(String.Format("Invalid Page pages", selectedPage, n)) If (!(selectedPage > 0 & selectedPage <= n)) Public string AddText(string PathSource, string PathTarget, int x, int y, int selectedPage, String text, int angle, int red, int green, int blue, int fontSize, float opacity)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |