Beiträge von robnic

    Changing the code in:

    wPDF.StartPage(MulDiv(trunc(pg.width),Screen.PixelsPerInch,Screen.PixelsPerInch),
    MulDiv(trunc(pg.height),Screen.PixelsPerInch,Screen.PixelsPerInch),
    Screen.PixelsPerInch, Screen.PixelsPerInch,0);


    works fine

    Roberto

    I don't know why but now when i export (using wpdf V3) FR4 reports i have a pdf larger than the report (A4). So when the PDF is printed the report is cut. What could be the problem ?
    I remember this thing was working and don't know when the problem started. Maybe when i have upgraded from FR3 to FR4 ...

    thanks a lot for any help. Need to solve this thing urgently :|

    The code i use is:

    procedure
    fr_2_wpdf(report:Tfrxreport;wpdf:TWPPDFPRINTER;pdf_file:string;start_page,end_page:integer);
    var
    i: integer;
    Pg: TfrxReportPage;
    begin
    wPDF.canvasreference:=wprefScreen;

    With report do
    begin
    if ((start_page=0) and (end_page=0)) then
    begin
    end_page:=previewpages.Count-1;
    end
    else begin
    start_page:=start_page-1;
    end_page:=end_page-1;
    end;

    if previewpages.Count <> 0 then
    begin
    wPDF.filename:=pdf_file;

    wPDF.BeginDoc;

    for i := start_page to end_page do
    begin
    Pg:=PreviewPages.Page[i];

    wPDF.StartPage(MulDiv(trunc(pg.width),72,72),
    MulDiv(trunc(pg.height),72,72),
    72, 72,0);

    PreviewPages.DrawPage(i, wPDF.canvas, 1, 1, 0, 0);

    wPdf.EndPage;
    end;

    wPDF.EndDoc;
    end;
    end;
    end;

    wpdf properties are:

    object wPDF: TWPPDFPrinter
    CidFontMode = wpCIDOff
    PDFAMode = wpdfaOff
    PDFReadMode = wpdfStandard
    CanvasReference = wprefScreen
    AutoLaunch = False
    EncodeStreamMethod = wpEncodeNone
    CompressStreamMethod = wpCompressFlate
    Info.IsUTF8 = False
    Info.Producer = 'WPTools'
    CreateThumbnails = False
    CreateOutlines = False
    Modes = []
    Options = []
    PageMode = pwUseNone
    ZoomMode = pwZoomDefault
    FontMode = wpUseTrueTypeFonts
    Encryption = []
    Security = wpp40bit
    InMemoryMode = False
    JPEGQuality = wpJPEG_100
    ExtraMessages = []
    InputfileMode = pwIgnoreInput
    ConvertJPEGData = False
    DebugMode = False
    Left = 164
    Top = 66
    end

    Hello

    a customer of mine would like to edit pdf created with wpdf (V3)
    Is there any problem to use Adobe acrobat ? Any experiences ?
    Does someone knows if exists some not adobe tool (maybe free?) to edit pdf documents ?


    thanks

    Roberto

    I need to print a barcode (EAN13) into PDF canvas, using of course WPDF

    I have a component (named Tean) that allows to generate a barcode and draw it into a bitmap (i use a 1 bit depth bitmap, b/w).

    So now i need to draw this bitmap into the WPDF canvas

    Problem: The barcode so printed can't be read by a barcode reader.

    Seems to me that the problem is that the barcode bitmap is stretched for the dimensions that are selected in my pdf designer.

    Now i do:

    rect.left:=round(leftcoord*pdfresolution);
    rect.top:=round(topcoord*pdfresolution);
    rect.right:=round((leftcoord+barcodewidth)*pdfresolution);
    rect.bottom:=round((topcoord+barcodeheight)*pdfresolution);

    wpdf.drawbitmap(rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top,bmp.handle)

    // leftcoord,topcoord,barcodewidth and barcodeheight are set in my page designer


    What i want is that the barcodewidth is calculated automatically so the barcode is printed with a perfect ratio (i think this is the problem why now it's not read correctly by the barcode reader)

    I have tryed to do: barcodewidth:=bmp.width/wPDF.XPixelsPerInch
    but the barcode so printed is very small

    Any help ?

    thank you in advance

    Roberto

    I would like to write the page number and total pages number in a document created with wPDF.

    Example:

    1/3
    2/3
    3/3

    The number of current page is not a problem of course but is there a way to have the number of total pages ?
    I know the number of pages only when the reports is completed. My idea was to reread the PDF and replace some tag. Possible to do it with wPDF ?
    I don't want to create the PDF twoice because it's large.

    Any suggestion on how to do it ?

    thank you :)

    Roberto

    I don't know why but it happens that if EUREKALOG (it's a bug tracking tool) is activated in my project, the text is not drawed into wPDF canvas.

    Does someone knows something? I'll check also in EUREKALOG newsgroup.

    Roberto

    I use WPDF to draw some text into a PDF

    I use the method: DrawText(wPDF.Canvas.Handle, PChar(text), Length(text), rect, format);

    Probably it's a simply thing but i can't undestand why if i draw a text where the last character is a symbol, the symbol is drawed in the first position.

    For example, if a draw 'Art:' the text drawed is ':Art'
    or 'Art@' became '@Art'

    I have read the Drawtext delphi help but i can't see nothing related to this thing.

    I don't think this probem is related to wpdf ...

    thanks for any help

    Roberto
    Delphi 2007
    Windows Vista
    WPDF 3.21

    I have installed the last version of wPDF 2.x (2.94)

    I use wPDF to export my reports created with quickreport.
    I have noticed that the background color of the text is ignored. In the pdf it's white (transparent)

    I use the method DrawMetaFileEx to draw the quickreport canvas into the wpdf canvas. Example: wPDF.DrawMetaFileEx(0,0,0,0,aMeta.Handle,Screen.PixelsPerInch,Screen.PixelsPerInch);

    Is it a bug or there's some reason for this :?:

    thank you

    Roberto
    Delphi 7