This commit is contained in:
John Whitington 2022-03-07 17:38:41 +00:00
parent 4046437b85
commit f83d8abb5d
2 changed files with 29 additions and 34 deletions

Binary file not shown.

View File

@ -1,6 +1,6 @@
\documentclass{book} \documentclass{book}
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf etc. % Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf etc.
\usepackage{comment}\excludecomment{cpdflib}\excludecomment{pycpdflib}\includecomment{dotnetcpdflib} \usepackage{comment}\excludecomment{cpdflib}\excludecomment{pycpdflib}\excludecomment{dotnetcpdflib}
\usepackage{palatino} \usepackage{palatino}
\usepackage{listings} \usepackage{listings}
\usepackage{microtype} \usepackage{microtype}
@ -410,14 +410,12 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using CoherentGraphics; using CoherentGraphics;
public static void Main(string[] args) // Initialise cpdf
{ Cpdf.startup();
// Initialise cpdf
Cpdf.startup();
// We will take the input hello.pdf and repeat it three times // We will take the input hello.pdf and repeat it three times
using (Cpdf.Pdf mergepdf = Cpdf.fromFile("hello.pdf", "")) using (Cpdf.Pdf mergepdf = Cpdf.fromFile("hello.pdf", ""))
{ {
// The list of PDFs to merge // The list of PDFs to merge
List<Cpdf.Pdf> pdfs = new List<Cpdf.Pdf> {mergepdf, mergepdf, mergepdf}; List<Cpdf.Pdf> pdfs = new List<Cpdf.Pdf> {mergepdf, mergepdf, mergepdf};
@ -429,7 +427,6 @@ public static void Main(string[] args)
// Dispose of merged PDF // Dispose of merged PDF
merged.Dispose(); merged.Dispose();
}
} }
\end{verbatim} \end{verbatim}
\end{small} \end{small}
@ -448,12 +445,11 @@ imports System
imports System.Collections.Generic imports System.Collections.Generic
imports CoherentGraphics imports CoherentGraphics
Sub Main(args as String()) ' Initialise cpdf
' Initialise cpdf Cpdf.startup()
Cpdf.startup()
' We will take the input hello.pdf and repeat it three times ' We will take the input hello.pdf and repeat it three times
Using mergepdf As Cpdf.Pdf = Cpdf.fromFile("hello.pdf", "") Using mergepdf As Cpdf.Pdf = Cpdf.fromFile("hello.pdf", "")
' The list of PDFs to merge ' The list of PDFs to merge
Dim pdfs As List(Of Cpdf.Pdf) = Dim pdfs As List(Of Cpdf.Pdf) =
new List(Of Cpdf.Pdf)({mergepdf, mergepdf, mergepdf}) new List(Of Cpdf.Pdf)({mergepdf, mergepdf, mergepdf})
@ -466,8 +462,7 @@ Sub Main(args as String())
' Dispose of merged PDF ' Dispose of merged PDF
merged.Dispose() merged.Dispose()
End Using End Using
End Sub
\end{verbatim} \end{verbatim}
\end{small} \end{small}