private List<string> PrepressProcessing(Notebook notebook, bool printFrontSide) { List<PairOfNumbers> pairOfNumbers = printFrontSide ? notebook.FrontSide : notebook.BackSide; Dictionary<int, string> currentImagePages = pdfToJpegConverter.ConvertPages(Path, pairOfNumbers, Dpi); ImageCollectionHandler imageCollectionHandler = new ImageCollectionHandler(); return imageCollectionHandler.Handling(currentImagePages, pairOfNumbers, OffSetCrop); }
//private List<Notebook> CreateNotebook(int numberLastPrintPage, int countListNotebook, int numberFirstPrintPage) //{ // totalPageCount = numberLastPrintPage; // //listCount = countListNotebook; // List<Notebook> notebooks = new List<Notebook>(); // for (int firstPage = numberFirstPrintPage; firstPage <= totalPageCount; firstPage += /*listCount **/ 4) // { // Notebook notebook = new Notebook(); // AddBothPairs(firstPage, notebook); // notebooks.Add(notebook); // } // return notebooks; //} private Notebook CreateNotebook(int firstPage, int listCountInNotebook) { Notebook notebook = new Notebook(); for (int pairNumber = 0; pairNumber < listCountInNotebook; pairNumber++) { PairOfNumbers frontPair = CreateFrontPair(pairNumber, firstPage, listCountInNotebook); notebook.AddFrontSidePair(frontPair); PairOfNumbers backSide = CreateBackPair(pairNumber, firstPage, listCountInNotebook); notebook.AddBackSidePair(backSide); } return notebook; }
private Notebook FormationNotebook(int numberFirstPrintPage, int countPageNotebook) { int numberFirstPage = numberFirstPrintPage; int numberLastPage = numberFirstPage + countPageNotebook - 1; Notebook notebook = new Notebook(); for (int numberSheet = 0; numberSheet < countPageNotebook / 4; numberSheet++) { notebook.AddFrontSidePair(new PairOfNumbers(numberLastPage, numberFirstPage)); numberFirstPage++; numberLastPage--; notebook.AddBackSidePair(new PairOfNumbers(numberFirstPage, numberLastPage)); numberFirstPage++; numberLastPage--; } return notebook; }
public void PrintNoteBook(Notebook notebook, bool printFrontSide) { List<string> printImagesPages = PrepressProcessing(notebook, printFrontSide); PrintPdf(printImagesPages); }