Bug #141

uppweb when producing .pdf consumes too much memory and produces nothing...

Added by Miroslav Fidler almost 8 years ago. Updated over 6 years ago.

Status:RejectedStart date:10/22/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-Spent time:-
Target version:-

History

#1 Updated by Sender Ghost almost 8 years ago

I think, the streamable version of PdfDraw needed, for this case. Not just "monolith" version of PdfDraw::Finish method. Something, which could give the beginning of PDF document, the partial contents between drawing and the end of PDF document to save.

FileOut fo(AppendFileName(pdfdir, "Upp.pdf"));
Size sz = Size(3968, 6074);
for(int i = 0; i < tt.GetCount(); i++) {
    PdfDraw pdf;
    RichText text = ParseQTF(tt[i]);
    UPP::Print(pdf, text, sz);

    if (i == 0)
        fo << pdf.GetBegin();
    else if (i == tt.GetCount() - 1)
        fo << pdf.GetEnd();
    else
        fo << pdf.GetContents();
}

or something, which will merge many PDF documents after:
Size sz = Size(3968, 6074);
for(int i = 0; i < tt.GetCount(); i++) {
    PdfDraw pdf;
    RichText text = ParseQTF(tt[i]);
    UPP::Print(pdf, text, sz);

    SaveFile(AppendFileName(pdfdir, Format("Upp_%s.pdf", AsString(i))), pdf.Finish());
}

#2 Updated by Sender Ghost almost 8 years ago

Some correction for the first example:

FileOut fo(AppendFileName(pdfdir, "Upp.pdf"));
Size sz = Size(3968, 6074);
for(int i = 0; i < tt.GetCount(); i++) {
    PdfDraw pdf;
    RichText text = ParseQTF(tt[i]);
    UPP::Print(pdf, text, sz);

    if (i == 0)
        fo << pdf.GetBegin();

    fo << pdf.GetContents();

    if (i == tt.GetCount() - 1)
        fo << pdf.GetEnd();
}

#3 Updated by Miroslav Fidler almost 8 years ago

  • Priority changed from High to Normal

#4 Updated by Miroslav Fidler over 6 years ago

  • Status changed from New to Rejected

Also available in: Atom PDF