Beiträge von scott

    Julian,
    Maybe i am not explaining what i am looking for very well. I am trying to append pages from one PDF document to an existing PDF document....but the pagecount is always 0. Does wPDf have this capability?

    In addition to that it would be nice if i could somehow read a PDF file into some sort of image files life a metafile for thumbnail display. I don't know if wPDF has this capability.

    If wPDF does not have this capablity does any of your other VCL's or do you recommend any?

    I must be missing something....i have tried messing with the inputfilemode and writing a test app in c++ and delphi, but i can't get a file to append to another file. the input file seems to overwrite its data on top of the original. I have tried many different things but below is a sample of code. I am trying to;

    PDFFileA=PDFFileA+PDFFileB.

    Thanks in advance.

    I am placing data/text on seperate individual pdf document and creating new pdf output documents. I am now trying to combine all of those new ouput pdf documents into one pdf document so i can then open the entire print job for viewing an print.

    can wppdfprinter do this? It looks like wppdfexport can but i don't have that tool. Is there a command line tool that could be used to comine all pdf's in a given directory?


    below is my failed code but will give a better idea of what i am trying to do.

    Thanks for any help


    //combine all .OUT pdf files and then ask to display
    TWPPDFPrinter *pdf=new TWPPDFPrinter(Application);
    AnsiString sOutputFile;
    AnsiString sInputFile;

    AnsiString sTempPath=FMain->User->asUser[173];//pdf archive path
    if (sTempPath=="")
    sTempPath=FMain->sDataPath;
    sOutputFile=sTempPath + "VTSTATE_"+FMain->Client->sTPLast +"_"+FMain->Client->sID+".PDF";

    pdf->Filename=sOutputFile;
    pdf->BeginDoc();

    AnsiString sFileSpec = FMain->sProgramPath+"LVT*.OUT";
    AnsiString sSource,sDest;
    HANDLE hFind;
    LPWIN32_FIND_DATA lpFindFileData = new WIN32_FIND_DATA;
    bool bFound=false;
    hFind = FindFirstFile(sFileSpec.c_str(),lpFindFileData);
    if (hFind!=INVALID_HANDLE_VALUE)
    bFound = true;

    AnsiString sFile;

    int iPages=0;

    while (bFound)
    {
    sFile=FMain->sProgramPath+lpFindFileData->cFileName;
    pdf->InputFile=sInputFile;
    //pdf->Print();
    bFound = FindNextFile(hFind,lpFindFileData);
    iPages++;
    pdf->EndPage();
    }

    pdf->EndDoc();
    delete lpFindFileData;
    delete pdf;

    ShowMessage(FormatFloat("0",iPages) + " page PDF created in " + sOutputFile);