AV creating large pdf

  • Using Win XP (2GB ram), Delphi 7, just purchase wPDF 3.

    Having trouble generating 2A0 sized pdf with a large picture created
    using many Canvas methods -
    it fails at the end after calling EndDoc,
    in TWPCustomPDFExport.DrawMetafileEx at line 1998:

    Code
    WPPDF_Action(pdf_env, WPPDF_ENHMETAFILE, meta, @link);

    with the exception message "Zu wenig Arbeitsspeicher (4544)" (not enough memory?). It's not that the resulting file would be overly large - have
    successfully created A0 pdf's of around 800kb.

    I realise this is a resource-intensive operation, but can you offer any
    advice on how to get around this? I fear this will also happen with
    smaller page sizes on older computers.

    TIA

    • Offizieller Beitrag

    Hi,

    I would not be sure that the problem is in wPDF.

    You can write a protocoll using property DebugMode .= true;
    Now the pages will be saved as metafiles.

    It would be possible to load this metafile and export is X times. It would be interesting to see if it still happens.

    Do you use SaveDC/RestoreDC ?

    Julian

  • Zitat von wpsupport


    I would not be sure that the problem is in wPDF.

    You can write a protocoll using property DebugMode .= true;
    Now the pages will be saved as metafiles.
    It would be possible to load this metafile and export is X times. It would be interesting to see if it still happens.

    I'm not sure what you mean here by 'write a protocol'. I set the DebugMode property to True, but get the same error in the same place.
    Where would this metafile be, and how do I export it? Could you explain further?

    Zitat von wpsupport


    Do you use SaveDC/RestoreDC ?

    No, should we? It's not actually our code, but it is well established.

    Some further information:
    The pdf only ever consists of one page. A pdf with exactly the same information can be created on an A0 page, but the program fails when trying on a 2A0 page. No memory seems to be lost after generating the pdf, although memory consumption does increase during the process.

    Any help in this matter would be greatly appreciated, as the situation is becoming more urgent.

    TIA