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
BOOKLETIMPOSER(1)					      General Commands Manual						 BOOKLETIMPOSER(1)

NAME
bookletimposer - An utility to reorganize PDF pages SYNOPSIS
bookletimposer [options] [input-file] bookletimposer -a [options] input-file DESCRIPTION
bookletimposer is an utility to achieve some basic imposition on PDF documents, especially designed to work on booklets. It allows: o to transform linear documents to booklets; o to reduce a document to put many on one sheet (for tracts for example); o to transform booklets to linear documents. It is a free software released under the GNU General Public License, either version 3 or (at your option) any later version. OPTIONS
--version show program's version number and exit. -h, --help show an help message and exit. -o OUTFILE, --output=OUTFILE set output PDF file to OUTFILE. -a, --no-gui automatic converstion (don't show the user interface). In that mode, the input file must be defined. -i, --gui show the user interface (default). -b, --booklet produce a booklet out of a linear document (default). -l, --linearize produce a linear document out of a booklet. -n, --no-reorganisation don't reorganize (will only scale and assemble pages). -c, --copy-pages copy the same group of input pages on one output page. -p PAGES_PER_SHEET, --pages-per-sheet=PAGES_PER_SHEET number of pages per sheet, in the format HORIZONTALxVERTICAL, e.g. 2x1. -f OUTPUT_FORMAT, --format=OUTPUT_FORMAT output page format, e.g. A4 or A3R. -k, --keep do not overwrite output file if it exists. EXAMPLES
bookletimposer Displays the GTK+ user interface. bookletimposer --no-gui --booklet --pages-per-sheet=2x1 --output=out.pdf in.pdf Converts in.pdf into a booklet with two pages per sheet an saves the result as out.pdf. bookletimposer --no-gui --linearise --pages-per-sheet=2x1 in.pdf Converts the two-pages-per-sheet booklet in.pdf into a page-by-page PDF. As the output file name is not defined, it will default to in- conv.pdf. SEE ALSO
pdfshuffler(1) BookletImposer source code and documentation can be found on the web at <https://kjo.herbesfolles.org/bookletimposer/> KNOWN ISSUES
BookletImposer is under development, which means that for the moment, some things work, some others do not... Thanks to report bugs to <kjo@a4nancy.net.eu.org> if you find some! AUTHORS
Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>. bookletimposer user manual 2012 BOOKLETIMPOSER(1)
All times are GMT -4. The time now is 05:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy