Using ScreenResMode 1440

  • I have a Richtext field, that current is being drawn in a PDF, though different resolutions are effecting how it appears

    The above is the area of code I believe needs to be changed. Is there some way that when this code is executed it believes it is always at a set resolution?
    The issue I am getting are in the following pdf's
    "http://www.microgenx.com/Real Estate Lament 1440 narrow res.pdf"
    "http://www.microgenx.com/Real Estate Lament 1440 wide res.pdf"
    Current control settings are
    WPC.WYSIWYG := False;
    WPC.ScreenResMode := rm1440;

    I have investigated WPTool5 and the new calculations in that looked promising though there is a heavy amount of coding in this application dependant on PTLine and backward compatibility would be a major issue.

    Thanks for any help :)

    • Offizieller Beitrag

    Hi,

    instead of

    MFC := TMetafileCanvas.Create(MF, Canvas.Handle);

    please use a printer DC as reference (GetPrinter, CreateDC, ReleaseDC ) to create the metafile canvas. This way you have a "better" canvas for drawing.

    The rm1440 mode applies a virtual resolution of 1440*1440 to the canvas.

    My question would by why you use such code to create the PDF. Would it be possible to add all text to a TWPRichText and use wPDF to export this text completely? Adding blocks with draw is always a bit complicated otherwise.

    Julian

  • Just for your info I think the original choice for separate blocks was that these are legal docments and have to match close as possible to the real things.
    So the application has the facility to place labels, lines, blocks of text etc. (As the users can match this to their own documents as well)

    Add onto that information can be entered into these forms, if that information goes over a page, or outside the bounds of the box, then rather than flow onto the next page it is separated and placed in references at the end of the document.

    The application is unfortunately beyond merging all the documents into an RTF form.

    I saw that the printer is an option, and I will most likely give it a go. The only issues is client PC's may not have a printer. Has a user ever installed a default printer driver with their application to use as a baseline?