with 1 cm left, the print comes out with a blank page;
the problem was solved when I set a local variable "WPScreenPixelsPerInch" to 72 (replacing the global value of 96) in WPPDFWP.pas,
the result size page is 20,99 x 29,71,
with 1 cm left, the print comes out with a blank page;
the problem was solved when I set a local variable "WPScreenPixelsPerInch" to 72 (replacing the global value of 96) in WPPDFWP.pas,
the result size page is 20,99 x 29,71,
Using Delphi7 + Wptools 8
Hi,
when I export my document, the page size is created with 21.01 x 29.71 cm (A4) instead of 21.00 x 29.70 cm
I'm using the script to run:
var Pdf: TWPPDFExport;
begin
WPRichText1.Refresh();
WPRichText1.ReformatAll(True);
Pdf := TWPPDFExport.Create(nil);
try
WPDF_Start();
Pdf.Source := WPRichText1;
Pdf.AutoLaunch := AutoLaunch;
Pdf.Filename := Arquivo;
Pdf.Encryption := [wpEncryptFile, wpEnablePrinting];
Pdf.FontMode := wpEmbedSymbolTrueTypeFonts;
Pdf.Encryption := [wpEnablePrinting, wpEnableCopying];
Pdf.Print;
Result := True;
finally
Pdf.Free;
end;
end;
Setup of WPRichText1:
WPRichText1.AutoZoom := wpAutoZoomWidth;
WPRichText1.AutomaticTextAttr.AlsoUseforPrintOut := True;
WPRichText1.EditOptions := Wp.EditOptions + [wpTableRowResizing, wpAutoInsertRow, wpActivateRedo, wpActivateRedoHotkey, wpAllowCreateTableInTable];
WPRichText1.FormatOptionsEx2 := Wp.FormatOptionsEx2 + [wpfUseKerning, wpfNewKeepNSupport];
WPRichText1.FormatOptionsEx := Wp.FormatOptionsEx + [wpDontUseRowPadding, wpDontUseBorderPadding, wpDontAddExternalFontLeading];
WPRichText1.ViewOptions := Wp.ViewOptions + [wpTraditionalMisspellMarkers];
WPRichText1.ViewOptionsEx := Wp.ViewOptionsEx + [wpDualPageViewStartsLeft];
WPRichText1.PrintParameter.PrintTitle := 'clinux.editor';
WPRichText1.PrintParameter.PrintOptions := [wpAlwaysHideFieldmarkers];
WPRichText1.WriteObjectMode := wobRTF;
WPRichText1.Caret.blink := True;
WPRichText1.OnPaintWatermark := nil;
WPRichText1.InsertPointAttr.Hidden := True;
with this line I can print jpeg image, can you check ?
{$IFDEF EMBEDD_PNGJPG} //WPDF4
// wPDF4 allows transparent PNG embedding
// WPDFCOMM_ADDIMAGEDATA = 3020; // Add image data Param = TWPDFImageCommand
// WPDFCOMM_DRAWPNGDATA = 3021; // Add PNG Data
// WPDFCOMM_DRAWJPEGDATA = 3022; // Add JPEG Data
if (wpPaintObjDestIsPDF in PaintMode) and (DataIs('jpg')or DataIs('jpeg')) then
begin
WPWriteComment( toCanvas.Handle, 3022, BoundsRect, DataPtr, DataLen);
if not bDisablePaint then inherited Paint(toCanvas, BoundsRect, ParentTxtObj, PaintMode);
end else
Yes, I'm using the code below, running LoadFromFile I dont need set fileextension
Fn := 'picture.jpg';
try
wpobj := TWPOImage.Create(WPRichText1.Memo.RTFData);
wpobj.LoadFromFile(Fn);
finally
DeleteFile(Fn);
end;
Yes, I am checking extensions and format (using irfanview) for the image files
When I active {$DEFINE WPDF4} the PNG is printed correctly (with transparency) but when I load JPG files the images don't show, to fix I needed to change the line 1553 in WPOBJ_Image, I'm using Wptools 8 with Delphi 7
{$IFDEF EMBEDD_PNGJPG} //WPDF4
to
{$IFNDEF EMBEDD_PNGJPG} //WPDF4
is correct ? tks
Hi,
sometimes, when I load and print a file, the text of header goes to the footer,
if I do a preview before print, always work,
I think this is a refresh issue, I'm using Delphi 7 + Wptools 8
var
St: TMemoryStream;
WPRichText1.LoadFromStream(St);
WPRichText1.Refresh;
WPRichText1.ReformatAll();
WPRichText1.Print;
Sorry, it worked, we solved the problem of paper size,
but we had a side effect on a third printer (Argox os-214)
instead of one label, it started printing 6 labels (1 ok and 5 blanks)
doesn't work.
I'm trying:
WPRichText1.ReadPrinterProperties();
WPRichText1.ReformatAll(true, true);
WPRichText1.Print;
I'll try this and I go back to say if it works
When I change the printer, the paper size don't change,
thanks
I found the problem, the limitation was on unit printer.pas,
tks
I have identified that the editor only obeys the setting for 2-sided printing if the printer is set to default (windows configuration). Otherwise it prints on two pages, could you check ?
Hi,
is there any known limitation on double-sided printing with versions compiled with Delphi 7?
in my tests, works only with Berlin, both version 7 and 8
tks
I tried upload the file but the editor cant load it