Ignore:
Timestamp:
Aug 2, 2006, 3:02:52 PM (15 years ago)
Author:
Eugene Romanenko
Message:

bitmap printing, preliminary postscript printing, export to PS for djvu plugin, other improvements

Location:
trunk/Lucide/SOURCE/plugins/lupoppler
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.cpp

    r71 r91  
    678678
    679679
    680 SOM_Scope void SOMLINK exportToPostScript(LuPopplerDocument *somSelf,
     680SOM_Scope boolean SOMLINK exportToPostScript(LuPopplerDocument *somSelf,
    681681                                    Environment *ev, string filename,
    682                                    long first_page, long last_page,
    683                                    double width, double height,
    684                                    boolean duplex)
     682                                    long first_page, long last_page,
     683                                    double width, double height,
     684                                    boolean duplex)
    685685{
    686686    if ( filename == NULL ) {
    687         return;
     687        return FALSE;
    688688    }
    689689    if ( last_page < first_page ) {
    690         return;
     690        return FALSE;
    691691    }
    692692
    693693    LuPopplerDocumentData *somThis = LuPopplerDocumentGetData(somSelf);
    694694    PDFDoc *doc = ((PopplerDocument *)somThis->data)->doc;
    695 
    696695
    697696    PSOutputDev *out = new PSOutputDev( filename, doc->getXRef(),
     
    701700                                        duplex, 0, 0, 0, 0, gFalse );
    702701
    703 
    704     for ( long i = first_page; i < last_page; i++ ) {
     702        if ( !out->isOk() ) {
     703                delete out;
     704        return FALSE;
     705        }
     706
     707    for ( long i = first_page; i <= last_page; i++ ) {
    705708        doc->displayPage( out, i + 1, 72.0, 72.0, 0, gFalse, gTrue, gFalse );
    706709    }
    707710
    708711    delete out;
     712    return TRUE;
    709713}
    710714
  • trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.xh

    r88 r91  
    151151typedef boolean   SOMLINK somTP_LuPopplerDocument_isPostScriptExportable(LuPopplerDocument *somSelf, Environment *ev);
    152152typedef somTP_LuPopplerDocument_isPostScriptExportable *somTD_LuPopplerDocument_isPostScriptExportable;
    153 typedef void   SOMLINK somTP_LuPopplerDocument_exportToPostScript(LuPopplerDocument *somSelf, Environment *ev,
     153typedef boolean   SOMLINK somTP_LuPopplerDocument_exportToPostScript(LuPopplerDocument *somSelf, Environment *ev,
    154154                string filename,
    155155                long first_page,
     
    587587
    588588/* method: exportToPostScript */
    589 void   exportToPostScript(Environment *ev,
     589boolean   exportToPostScript(Environment *ev,
    590590                string filename,
    591591                long first_page,
     
    595595                boolean duplex)
    596596{
    597    SOM_ResolveD(this,LuPopplerDocument,LuDocument,exportToPostScript)
     597   return SOM_ResolveD(this,LuPopplerDocument,LuDocument,exportToPostScript)
    598598        (this, ev,filename,first_page,last_page,width,height,duplex);
    599599}
  • trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.xih

    r61 r91  
    909909 * Overridden method: exportToPostScript
    910910 */
    911 SOM_Scope void  SOMLINK exportToPostScript(LuPopplerDocument *somSelf, Environment *ev,
     911SOM_Scope boolean  SOMLINK exportToPostScript(LuPopplerDocument *somSelf, Environment *ev,
    912912                string filename,
    913913                long first_page,
     
    923923#define somId_exportToPostScript somId_LuPopplerDocumentexportToPostScript
    924924#endif
    925 typedef void   SOMLINK somTP_xih_LuPopplerDocument_exportToPostScript(LuPopplerDocument *somSelf, Environment *ev,
     925typedef boolean   SOMLINK somTP_xih_LuPopplerDocument_exportToPostScript(LuPopplerDocument *somSelf, Environment *ev,
    926926                string filename,
    927927                long first_page,
Note: See TracChangeset for help on using the changeset viewer.