Graphics Options

Top  Previous  Next

Property CanvasReference

wPDF provides a Canvas property for easy creation of PDF files. The canvas property is internally managed as a TMetafileCanvas which is created for a metafile which is sent to the PDF engine when EndPage is executed.

 

Using the property CanvasReference you select if the canvas should use the properties of the screen (wprefScreen) device or the default printer (wprefPrinter). Using the printer requires of course that a printer is installed, but has the advantage that the resolution is independent from the size of the monitor.

 

In wPDF V2/V3 the resolution used in 'StartPage' will be automatically applied to the Canvas using the SetViewPortAPI.

 

If the screen device is used as reference Windows 1.) uses the dimension of the screen as maximum clipping rectangle (WinNT and Win2K) and 2.) changes the resolution to the pyhsical size of the monitor! Because of that we recommend to use the printer as reference.

 

property Modes

makes it possible to change the way the drawing commands are interpreted. For standard output this property should remain unchanged but if you create the output in your application its use might be required.

 

wpNoBITBLTFillRect: BitBlt is not used to draw a filled rectangle.

 

wpWhiteBrushIsTransparent: Do not fill objects which use a white background. Please note that this has no effect on bitmaps, only on rectangles or text which is printed opaque.

 

wpExactTextPositioning: In general the PDF engine draws text to not only match the input but also look good. If your application requires that each character has to be at the same position as in the input you can use this flag to get a 1:1 output. (Implementation note: In the PDF file an efficient multi string output command is used, not several single text drawing commands)

 

wpNoTextRectClipping: Text can be clipped to its bounding box. To switch this off you can use this flag. It is a good idea to use this flag if your application uses a lot of TextRect() without expecting clipping.

 

wpClipRectSupport: IntersectClipRect() and SelectClipRgn() are supported.

 

wpDontStackWorldModifications: If your application uses the windows function SetWindowOrgEx() a lot please set this flag. Normally please do not use this flag. It is only required if you see a small, 1 pixel shift in vertical or horizontal lines. If you have access to the printing code you can add SaveDC/RestoreDC around blocks which work with a different origin or resolution to avoid this small visual problem in the created PDF file.

 

wpNoTextRectClipping: Use the windows text output API you can provide a rectangle which is used to clip you are just printing. This is useful if you are printing table cells and don't want to overprint  the contents of the neighbor cell. Usually this clipping rectangle is not active and wPDF will not add unnecessary clipping - but if your application uses this clipping without a real need for it, you can improve the quality of the PDF file by switching this flag on. This will skip the creation of clipping rectangles for text output commands.

 

wpDontAdjustTextSpacing: wPDF will normally use the character and word spacing to render the text to match the width requirement set by windows. This is necessary because the fonts in PDF have a slightly different width than calculated by windows. The reason are rounding errors in windows (or visual optimation) which works with integer positions while PDF uses floating points.

If you use this flag wPDF will not try to enlarge or shrink the text. Normally you won't see a problem, except that you are printing text lines which consist of different parts (font styles fro example).

This flag has no effect if wpExactTextPoitioning is active.

 

wpDontCropBitmaps: Using the command StretchDIB you can specify a rectangle of the source bitmap which will be printed in the destination rectangle. Unless this flag is active the PDF engine will internally remove the unprinted data.

 

wpDontCropBitmaps: The PDF engine will crop images if they are only partly painted. You can use this flag to switch this mode off.

 

wpAllowTransparentBit: Monochrome bitmaps can be optionally painted transparently if they are painted using an OR "ROP" mode or if the flag wpWhiteBrushIsTransparent. This will set the PDF format version to V1.3.

 

wpAlwaysHighResPDF, wpNeverHighResPDF:

 

PDF does only allow coordinates up to 32000. Our PDF engine tries to preserve the original windows coordinates in the PDF file. Unfortunately those coordinates can become larger than 32000. This is especially problematic for Acrobat 5 and before.

 

Usually the PDFEngine will try to avoid such large coordinates and then activate internal division by 10.

 

Using this flags this mode can be forced or disabled.

 

wpUseFontWidthArgument: Ignore Font widths defined by the CreateFont API call.

 

wpNoTextScaling: Never enlarge fonts to match width reported by windows.

 

wpMetaIsDOTNETEMF: internally used only

 

wpInputIsWMFData: internally used only

 

wpHatchBrushIsSolid: switch off the new hatching

 

wpTestIfWeHaveCID: used with the new CidFontMode. When characters are missing from selected font print ?

 

wpTextAsGlyphs: Export the entire text using curves

 

wpDisableAutoGlyphs: Disable the new code which draws characters which were not exported otherwise (missing from current code page, missing from selected font) as curves

 

wpUseOldFontSubsetting: Use the old font subsetting code. This old code produces slightly smaller embedded TTF data but also stripped out too much information from the TTF program.

wpSimulateBoldFonts: Instead of selecting a bold font the bold mode is simulated

 

wpConvertColorsToCMYK:  Convert all font, brush and pen colors to CMYK

 

wpWriteToUnicodeCMAP: Some PDF/A validators require cmaps with fonts files. Unfortunately the tested build of Acrobat produced an error with this extra info.

 

wpDetailedGradients: if set, gradients will be reproduced more detailed, but PDF files will be bigger

 

wpOutlineNumberDetection: keep word distances when the text looks like numbered or bulleted text

 

wpNoAutoTagsForPDFA: do not add a tag at the beginning of each page when PDF/A is selected

 

wpArabicAlwaysAsOutline: export arabic as outline to make sure the glyph combination is prefect

 

wpHebrewAlwaysAsOutline: export hebrew as outline

 

wpNoOutlinesForASIANInPDFA: Don't select outlines for asian text automatically when PDF/A is activated

 

wpDontSimulateItalicFonts:  Disable automatic simulation of italic fonts when the font does not support this mode

 

wpPreserveBookmarkNames: Create named destinations instead of fixed hyperlink jumps to certain bookmarks.