Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

objpdffile.cpp File Reference

#include "objpdffile.h"
#include "cmdutil.h"
#include "bookmarkpalette.h"
#include "prefsmanager.h"
#include "scribusdoc.h"
#include "scribuscore.h"
#include <structmember.h>
#include <QFileInfo>
#include <QList>
#include <QPixmap>
#include <vector>

Include dependency graph for objpdffile.cpp:

Go to the source code of this file.

Classes

struct  PDFfile

Functions

void SCRIBUS_API ReOrderText (ScribusDoc *doc, ScribusView *view)
static int minmaxi (int val, int min, int max)
static double minmaxd (double val, double min, double max)
static void PDFfile_dealloc (PDFfile *self)
static PyObject * PDFfile_new (PyTypeObject *type, PyObject *, PyObject *)
static int PDFfile_init (PDFfile *self, PyObject *, PyObject *)
static PyObject * PDFfile_getfile (PDFfile *self, void *)
static int PDFfile_setfile (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_getfonts (PDFfile *self, void *)
static int PDFfile_setfonts (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_getpages (PDFfile *self, void *)
static int PDFfile_setpages (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_getresolution (PDFfile *self, void *)
static int PDFfile_setresolution (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_getdownsample (PDFfile *self, void *)
static int PDFfile_setdownsample (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_geteffval (PDFfile *self, void *)
static int PDFfile_seteffval (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_getlpival (PDFfile *self, void *)
static int PDFfile_setlpival (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_getowner (PDFfile *self, void *)
static int PDFfile_setowner (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_getuser (PDFfile *self, void *)
static int PDFfile_setuser (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_getsolidpr (PDFfile *self, void *)
static int PDFfile_setsolidpr (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_getimagepr (PDFfile *self, void *)
static int PDFfile_setimagepr (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_getprintprofc (PDFfile *self, void *)
static int PDFfile_setprintprofc (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_getinfo (PDFfile *self, void *)
static int PDFfile_setinfo (PDFfile *self, PyObject *value, void *)
static PyObject * PDFfile_save (PDFfile *self)

Variables

static PyMemberDef PDFfile_members []
static char * effval_doc
static char * lpival_doc
static PyGetSetDef PDFfile_getseters []
static PyMethodDef PDFfile_methods []
PyTypeObject PDFfile_Type


Function Documentation

static double minmaxd ( double  val,
double  min,
double  max 
) [static]

Definition at line 35 of file objpdffile.cpp.

Referenced by PDFfile_save().

static int minmaxi ( int  val,
int  min,
int  max 
) [static]

Definition at line 26 of file objpdffile.cpp.

Referenced by PDFfile_save().

static void PDFfile_dealloc ( PDFfile self  )  [static]

Definition at line 91 of file objpdffile.cpp.

static PyObject* PDFfile_getdownsample ( PDFfile self,
void *   
) [static]

Definition at line 668 of file objpdffile.cpp.

static PyObject* PDFfile_geteffval ( PDFfile self,
void *   
) [static]

Definition at line 695 of file objpdffile.cpp.

static PyObject* PDFfile_getfile ( PDFfile self,
void *   
) [static]

Definition at line 547 of file objpdffile.cpp.

static PyObject* PDFfile_getfonts ( PDFfile self,
void *   
) [static]

Definition at line 569 of file objpdffile.cpp.

static PyObject* PDFfile_getimagepr ( PDFfile self,
void *   
) [static]

Definition at line 848 of file objpdffile.cpp.

static PyObject* PDFfile_getinfo ( PDFfile self,
void *   
) [static]

Definition at line 892 of file objpdffile.cpp.

static PyObject* PDFfile_getlpival ( PDFfile self,
void *   
) [static]

Definition at line 736 of file objpdffile.cpp.

static PyObject* PDFfile_getowner ( PDFfile self,
void *   
) [static]

Definition at line 782 of file objpdffile.cpp.

static PyObject* PDFfile_getpages ( PDFfile self,
void *   
) [static]

Definition at line 602 of file objpdffile.cpp.

static PyObject* PDFfile_getprintprofc ( PDFfile self,
void *   
) [static]

Definition at line 870 of file objpdffile.cpp.

static PyObject* PDFfile_getresolution ( PDFfile self,
void *   
) [static]

Definition at line 641 of file objpdffile.cpp.

static PyObject* PDFfile_getsolidpr ( PDFfile self,
void *   
) [static]

Definition at line 826 of file objpdffile.cpp.

static PyObject* PDFfile_getuser ( PDFfile self,
void *   
) [static]

Definition at line 804 of file objpdffile.cpp.

static int PDFfile_init ( PDFfile self,
PyObject *  ,
PyObject *   
) [static]

static PyObject* PDFfile_new ( PyTypeObject *  type,
PyObject *  ,
PyObject *   
) [static]

static PyObject* PDFfile_save ( PDFfile self  )  [static]

Definition at line 951 of file objpdffile.cpp.

References LPIData::Angle, PDFOptions::Articles, PDFOptions::Binding, PDFOptions::bleeds, ScribusMainWindow::bookmarkPalette, PDFOptions::Bookmarks, MarginStruct::Bottom, BookPalette::BView, PDFOptions::Compress, PDFOptions::CompressMethod, PDFOptions::Datei, PDFPresentationData::Di, PDFPresentationData::Dm, ScribusView::Doc, ScribusMainWindow::doc, PDFOptions::doMultiFile, PDFPresentationData::effectType, PDFOptions::EmbeddedI, PDFOptions::EmbedList, PDFOptions::Encrypt, LPIData::Frequency, ScribusMainWindow::getPDFDriver(), ScribusDoc::HasCMS, ScribusMainWindow::HaveDoc, PDFOptions::ImageProf, PDFOptions::Info, PDFOptions::Intent, PDFOptions::Intent2, MarginStruct::Left, PDFOptions::LPISettings, PDFPresentationData::M, minmaxd(), minmaxi(), PDFPresentationData::pageEffectDuration, ScribusDoc::pageHeight, ScribusView::PageToPixmap(), PDFPresentationData::pageViewDuration, ScribusDoc::pageWidth, PDFOptions::PassOwner, PDFOptions::PassUser, ScribusDoc::PDF_Options, PDFOptions::PDFVersion_14, PDFOptions::PDFVersion_X3, PDFOptions::Permissions, PDFOptions::PicRes, PDFOptions::PresentMode, PDFOptions::PresentVals, ScribusCore::primaryMainWindow(), ScribusCore::PrinterProfiles, PDFOptions::PrintProf, Py_RETURN_NONE, PDFOptions::Quality, PDFOptions::RecalcPic, ReOrderText(), PDFOptions::Resolution, MarginStruct::Right, ScCore, PDFOptions::SolidProf, LPIData::SpotFunc, PDFOptions::Thumbnails, MarginStruct::Top, ScribusDoc::unitRatio(), PDFOptions::UseLPI, PDFOptions::UseProfiles, PDFOptions::UseProfiles2, PDFOptions::UseRGB, PDFOptions::UseSpotColors, PDFOptions::Version, and ScribusMainWindow::view.

static int PDFfile_setdownsample ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 674 of file objpdffile.cpp.

static int PDFfile_seteffval ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 701 of file objpdffile.cpp.

static int PDFfile_setfile ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 553 of file objpdffile.cpp.

static int PDFfile_setfonts ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 575 of file objpdffile.cpp.

static int PDFfile_setimagepr ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 854 of file objpdffile.cpp.

static int PDFfile_setinfo ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 898 of file objpdffile.cpp.

static int PDFfile_setlpival ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 742 of file objpdffile.cpp.

static int PDFfile_setowner ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 788 of file objpdffile.cpp.

static int PDFfile_setpages ( PDFfile self,
PyObject *  value,
void *   
) [static]

static int PDFfile_setprintprofc ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 876 of file objpdffile.cpp.

static int PDFfile_setresolution ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 647 of file objpdffile.cpp.

static int PDFfile_setsolidpr ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 832 of file objpdffile.cpp.

static int PDFfile_setuser ( PDFfile self,
PyObject *  value,
void *   
) [static]

Definition at line 810 of file objpdffile.cpp.

void SCRIBUS_API ReOrderText ( ScribusDoc doc,
ScribusView view 
)

Definition at line 502 of file util.cpp.

Referenced by PDFfile_save(), and ScribusMainWindow::slotReallyPrint().


Variable Documentation

char* effval_doc [static]

Initial value:

 const_cast<char*>(
"List of effection values for each saved page.\n"
"It is list of list of six integers. Those int has followin meaning:\n\t"
"- Length of time the page is shown before the presentation\n\tstarts on the selected page. (1-3600)\n\t"
"- Length of time the effect runs. (1 - 3600)\n\t\tA shorter time will speed up the effect,\n\t\ta longer one will slow it down\n\t"
"- Type of the display effect\n\t\t0 - No Effect\n\t\t1 - Blinds\n\t\t2 - Box\n\t\t3 - Dissolve\n\t\t4 - Glitter\n\t\t5 - Split\n\t\t6 - Wipe\n\t"
"- Direction of the effect of moving lines\n\tfor the split and blind effects.\n\t\t0 - Horizontal\n\t\t1 - Vertical\n\t"
"- Starting position for the box and split effects.\n\t\t0 - Inside\n\t\t1 - Outside\n\t"
"- Direction of the glitter or wipe effects.\n\t\t0 - Left to Right\n\t\t1 - Top to Bottom\n\t\t2 - Bottom to Top\n\t\t3 - Right to Left\n\t\t4 - Top-left to Bottom-Right")

Definition at line 914 of file objpdffile.cpp.

char* lpival_doc [static]

Initial value:

 const_cast<char*>(
"Rendering Settings for individual colors.\n\n"
"This is list of values for each color\n"
"Color values have structure [siii] which stand for:\n\t"
"s - Color name ('Black', 'Cyan', 'Magenta', 'Yellow')\n\t"
"i - Frequency (10 to 1000)\n\t"
"i - Angle (-180 to 180)\n\t"
"i - Spot Function\n\t\t0 - Simple Dot\n\t\t1 - Line\n\t\t2 - Round\n\t\t3 - Ellipse\n"
"Be carefull when supplying these values as they\nare not checked for validity.")

Definition at line 924 of file objpdffile.cpp.

PyGetSetDef PDFfile_getseters[] [static]

Initial value:

 {
    {const_cast<char*>("file"), (getter)PDFfile_getfile, (setter)PDFfile_setfile, const_cast<char*>("Name of file to save into"), NULL},
    {const_cast<char*>("fonts"), (getter)PDFfile_getfonts, (setter)PDFfile_setfonts, const_cast<char*>("List of fonts to embed."), NULL},
    {const_cast<char*>("pages"), (getter)PDFfile_getpages, (setter)PDFfile_setpages, const_cast<char*>("List of pages to print"), NULL},
    {const_cast<char*>("resolution"), (getter)PDFfile_getresolution, (setter)PDFfile_setresolution, const_cast<char*>("Resolution of output file. Values from 35 to 4000."), NULL},
    {const_cast<char*>("downsample"), (getter)PDFfile_getdownsample, (setter)PDFfile_setdownsample, const_cast<char*>("Downsample image resolusion to this value. Values from 35 to 4000\nSet 0 for not to downsample"), NULL},
    {const_cast<char*>("effval"), (getter)PDFfile_geteffval, (setter)PDFfile_seteffval, effval_doc, NULL},
    {const_cast<char*>("lpival"), (getter)PDFfile_getlpival, (setter)PDFfile_setlpival, lpival_doc, NULL},
    {const_cast<char*>("owner"), (getter)PDFfile_getowner, (setter)PDFfile_setowner, const_cast<char*>("Owner's password"), NULL},
    {const_cast<char*>("user"), (getter)PDFfile_getuser, (setter)PDFfile_setuser, const_cast<char*>("User's password"), NULL},
    {const_cast<char*>("solidpr"), (getter)PDFfile_getsolidpr, (setter)PDFfile_setsolidpr, const_cast<char*>("Color profile for solid colors"), NULL},
    {const_cast<char*>("imagepr"), (getter)PDFfile_getimagepr, (setter)PDFfile_setimagepr, const_cast<char*>("Color profile for images"), NULL},
    {const_cast<char*>("printprofc"), (getter)PDFfile_getprintprofc, (setter)PDFfile_setprintprofc, const_cast<char*>("Output profile for printing. If possible, get some guidance from your printer on profile selection."), NULL},
    {const_cast<char*>("info"), (getter)PDFfile_getinfo, (setter)PDFfile_setinfo, const_cast<char*>("Mandatory string for PDF/X-3 or the PDF will fail\nPDF/X-3 conformance. We recommend you use the title of the document."), NULL},
    {NULL, NULL, NULL, NULL, NULL}  
}

Definition at line 934 of file objpdffile.cpp.

PyMemberDef PDFfile_members[] [static]

Initial value:

 {
    {const_cast<char*>("thumbnails"), T_INT, offsetof(PDFfile, thumbnails), 0, const_cast<char*>("Generate thumbnails. Bool value.")},
    {const_cast<char*>("compress"), T_INT, offsetof(PDFfile, compress), 0, const_cast<char*>("Compression switch. Bool value.")},
    {const_cast<char*>("compressmtd"), T_INT, offsetof(PDFfile, compressmtd), 0, const_cast<char*>("Compression method.\n\t0 - Automatic\n\t1 - JPEG\n\t2 - zip\n\t3 - None.")},
    {const_cast<char*>("quality"), T_INT, offsetof(PDFfile, quality), 0, const_cast<char*>("Image quality\n\t0 - Maximum\n\t1 - High\n\t2 - Medium\n\t3 - Low\n\t4 - Minimum")},
    {const_cast<char*>("bookmarks"), T_INT, offsetof(PDFfile, bookmarks), 0, const_cast<char*>("Embed the bookmarks you created in your document.\nThese are useful for navigating long PDF documents.\nBool value")},
    {const_cast<char*>("binding"), T_INT, offsetof(PDFfile, binding), 0, const_cast<char*>("Choose binding.\n\t0 - Left binding\n\t1 - Right binding")},
    {const_cast<char*>("presentation"), T_INT, offsetof(PDFfile, presentation), 0, const_cast<char*>("Enable Presentation Effects.Bool value")},
    {const_cast<char*>("article"), T_INT, offsetof(PDFfile, article), 0, const_cast<char*>("Save Linked Text Frames as PDF Articles\n\tBool value")},
    {const_cast<char*>("encrypt"), T_INT, offsetof(PDFfile, encrypt), 0, const_cast<char*>("Use Encription. Bool value")},
    {const_cast<char*>("uselpi"), T_INT, offsetof(PDFfile, uselpi), 0, const_cast<char*>("Use Custom Rendering Settings. Bool value")},
    {const_cast<char*>("usespot"), T_INT, offsetof(PDFfile, usespot), 0, const_cast<char*>("Use Spot Colors. Bool value")},
    {const_cast<char*>("domulti"), T_INT, offsetof(PDFfile, domulti), 0, const_cast<char*>("Produce a PDF File for every Page. Bool value")},
    {const_cast<char*>("aprint"), T_INT, offsetof(PDFfile, aprint), 0, const_cast<char*>("Allow Printing the Document. Bool value")},
    {const_cast<char*>("achange"), T_INT, offsetof(PDFfile, achange), 0, const_cast<char*>("Allow Changing the Document. Bool value")},
    {const_cast<char*>("acopy"), T_INT, offsetof(PDFfile, acopy), 0, const_cast<char*>("Allow Copying Text and Graphics. Bool value")},
    {const_cast<char*>("aanot"), T_INT, offsetof(PDFfile, aanot), 0, const_cast<char*>("Allow Adding Annotations and Fields. Bool value")},
    {const_cast<char*>("version"), T_INT, offsetof(PDFfile, version), 0, const_cast<char*>("Choose PDF version to use:\n\t12 = PDF/X-3\n\t13 = PDF 1.3 (Acrobat 4)\n\t14 = PDF 1.4 (Acrobat 5)")},
    {const_cast<char*>("outdst"), T_INT, offsetof(PDFfile, outdst), 0, const_cast<char*>("Output destination.\n\t0 - screen\n\t1 - printer")},
    {const_cast<char*>("profiles"), T_INT, offsetof(PDFfile, profiles), 0, const_cast<char*>("Embed a color profile for solid colors. Bool value.")},
    {const_cast<char*>("profilei"), T_INT, offsetof(PDFfile, profilei), 0, const_cast<char*>("Embed a color profile for images. Bool value.")},
    {const_cast<char*>("intents"), T_INT, offsetof(PDFfile, intents), 0, const_cast<char*>("Rendering intent for solid colors\n\t0 - Perceptual\n\t1 - Relative Colorimetric\n\t2 - Saturation\n\t3 - Absolute Colorimetric")},
    {const_cast<char*>("intenti"), T_INT, offsetof(PDFfile, intenti), 0, const_cast<char*>("Rendering intent for images\n\t0 - Perceptual\n\t1 - Relative Colorimetric\n\t2 - Saturation\n\t3 - Absolute Colorimetric")},
    {const_cast<char*>("noembicc"), T_INT, offsetof(PDFfile, noembicc), 0, const_cast<char*>("Don't use embedded ICC profiles. Bool value")},
    {const_cast<char*>("bleedt"), T_DOUBLE, offsetof(PDFfile, bleedt), 0, const_cast<char*>("Bleed Top\n""Distance for bleed from the top of the physical page")},
    {const_cast<char*>("bleedl"), T_DOUBLE, offsetof(PDFfile, bleedl), 0, const_cast<char*>("Bleed Left\n""Distance for bleed from the left of the physical page")},
    {const_cast<char*>("bleedr"), T_DOUBLE, offsetof(PDFfile, bleedr), 0, const_cast<char*>("Bleed Right\n""Distance for bleed from the right of the physical page")},
    {const_cast<char*>("bleedb"), T_DOUBLE, offsetof(PDFfile, bleedb), 0, const_cast<char*>("Bleed Bottom\n""Distance for bleed from the bottom of the physical page")},
    {NULL, 0, 0, 0, NULL} 
}

Definition at line 513 of file objpdffile.cpp.

PyMethodDef PDFfile_methods[] [static]

Initial value:

 {
    {const_cast<char*>("save"), (PyCFunction)PDFfile_save, METH_NOARGS, const_cast<char*>("Save selected pages to pdf file")},
    {NULL, (PyCFunction)(0), 0, NULL} 
}

Definition at line 1163 of file objpdffile.cpp.

PyTypeObject PDFfile_Type

Definition at line 1168 of file objpdffile.cpp.

Referenced by initscribus().

Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.