Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Gs to split a pdf into multiple pages Post 302846805 by Abigail111 on Monday 26th of August 2013 12:08:49 AM
Old 08-26-2013
How about this code
Code:
namespace RE__Test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public static string FolderName = "c:/";

        private void button1_Click(object sender, EventArgs e)
        {
            string fileName = FolderName + "Sample.pdf";

            REDocument doc = REFile.OpenDocumentFile(fileName, new PDFDecoder());//use PDFDecoder open a pdf file

            List<BaseDocument> baseDocs = doc.SplitDocument(1);

            int index = 0;

            foreach (BaseDocument baseDoc in baseDocs)
            {
                // REImage reimage = (REImage)baseDoc.GetPage(0).ToImage();
                index++;

                REFile.SaveDocumentFile((REDocument)baseDoc, "c:/reDoc" + index + ".pdf", new PDFEncoder());
            }


Last edited by Franklin52; 08-26-2013 at 03:15 AM.. Reason: Please use code tags
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Split text file by pages

Hello! Firts of all, I'm sorry for my English. My problem: I have text file with few Form Feed symbols (FF, ASCII code =12) inside (for example - some report, consists of some pages for printing). I want to split this text by pages - each page (until FF symbol) in single file. I... (2 Replies)
Discussion started by: ranri
2 Replies

2. Shell Programming and Scripting

how to get number of pages in a PDF file

Hello, Can anyone please help me providing script to get the number of pages in a PDF file? TIA Prvn (8 Replies)
Discussion started by: prvnrk
8 Replies

3. Shell Programming and Scripting

[Example] View man pages as pdf

This is a simple example of a shell script. I made it because it's sometimes convenient to search through a manpage and to have access to the terminal while you're reading (maybe to test code). It also serves as a basic example for anyone learning shell scripting. #!/bin/sh nm="/tmp/$1.pdf"... (0 Replies)
Discussion started by: CRGreathouse
0 Replies

4. UNIX for Advanced & Expert Users

creating pdf file with four pages

I have some code in fortran90, example stored in scode.f90 and I want to create a pdf containing the code. I would like to have four pages of code put into each page in the pdf. I was thinking of creating a ps file using mpage and then using ps2pdf after. However, I noticed that ps2pdf shift the... (4 Replies)
Discussion started by: kristinu
4 Replies

5. Shell Programming and Scripting

Split a text file into multiple pages based on pattern

Hi, I have a text file (attached the sample). I have also, attached the way the way the files need to be split. We get this file, that will either have 24 Jurisdictions, or will miss some and retain some. Like in the attached sample file, there are only Jurisdictions 03,11,14,15, 20 and 30.... (3 Replies)
Discussion started by: ebsus
3 Replies
RECURSIVEARRAYITERATOR(3)						 1						 RECURSIVEARRAYITERATOR(3)

The RecursiveArrayIterator class

INTRODUCTION
This iterator allows to unset and modify values and keys while iterating over Arrays and Objects in the same way as the ArrayIterator. Additionally it is possible to iterate over the current iterator entry. CLASS SYNOPSIS
RecursiveArrayIterator RecursiveArrayIteratorextends ArrayIteratorRecursiveIterator Methods o public RecursiveArrayIterator RecursiveArrayIterator::getChildren (void ) o public bool RecursiveArrayIterator::hasChildren (void ) Inherits o public void ArrayIterator::append (mixed $value) o public void ArrayIterator::asort (void ) o public ArrayIterator::__construct ([mixed $array = array()], [int $flags]) o public int ArrayIterator::count (void ) o public mixed ArrayIterator::current (void ) o public array ArrayIterator::getArrayCopy (void ) o public void ArrayIterator::getFlags (void ) o public mixed ArrayIterator::key (void ) o public void ArrayIterator::ksort (void ) o public void ArrayIterator::natcasesort (void ) o public void ArrayIterator::natsort (void ) o public void ArrayIterator::next (void ) o public void ArrayIterator::offsetExists (string $index) o public mixed ArrayIterator::offsetGet (string $index) o public void ArrayIterator::offsetSet (string $index, string $newval) o public void ArrayIterator::offsetUnset (string $index) o public void ArrayIterator::rewind (void ) o public void ArrayIterator::seek (int $position) o public string ArrayIterator::serialize (void ) o public void ArrayIterator::setFlags (string $flags) o public void ArrayIterator::uasort (string $cmp_function) o public void ArrayIterator::uksort (string $cmp_function) o public string ArrayIterator::unserialize (string $serialized) o public bool ArrayIterator::valid (void ) PHP Documentation Group RECURSIVEARRAYITERATOR(3)
All times are GMT -4. The time now is 04:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy