Thanks for sticking with me through all this. Here's what I've come up with.
* TextDynamic Basis
* TD-Premium-Addon
* TD-ServerLicense-Addon
* wRTF2PDF 3 Standard
* Addon: wPDF/-Control Internet License
Have I made the right choices?
Thanks for sticking with me through all this. Here's what I've come up with.
* TextDynamic Basis
* TD-Premium-Addon
* TD-ServerLicense-Addon
* wRTF2PDF 3 Standard
* Addon: wPDF/-Control Internet License
Have I made the right choices?
I'm still confused about products. The manual says that wRTF2PDF includes textDynamic functionality, and can be used in client applications as well as asp.net apps, and that's what I want. On the "Buy" page I selected wRTF2PDF, then noticed that there's also a server license option. The base product is called "server", so I don't get why I need to buy this option. And then when I do "Checkout", I'm offered discounts on several products, including textDynamic basis. Aren't all the basis functions included in wRTF2PDF? I can't buy anything until my questions are cleared up.
Zitat von wpsupport
We're eliminating Delphi and converting the merge code to C#. Just to be clear, we have both windows apps and a website. Both use wptools for merging. The windows apps print to paper, and the website produces pdfs instead. It sounds like you're saying I don't need textDynamic to do this, which greatly puzzles me.
Now I'm confused about pdf products.
1. We have some delphi windows apps that use wptools6 to merge and print letters. We'll convert Delphi to C#, and use textDynamic (premium).
2. Currently, we wrap the windows Delphi code into an isapi dll. That uses the same merging code to produce a TWPCustomRichText document, which is processed by TWPPDFExport into a pdf file. In asp.net, I'm guessing it would be simpler to make a C# dll assembly instead of an isapi dll, right? And wouldn't PDF Creation, plus Server License be sufficient for this? Here's how we do it now.
function TMergeEngine.putPDF(lenderID, title, outPath:string): string;
var
pdf: TWPPDFExport;
begin
rtfMerged.ReformatAll(True,False);
pdf := TWPPDFExport.Create(nil);
try
WPDF_Start(wpUserID,wpLicense);
pdf.AutoLaunch := False;
pdf.Source := rtfMerged;
Result := fileNameForPDF(LenderID,title,outPath);
pdf.Filename := Result;
pdf.Print;
except on e: exception do begin
Result := e.Message;
end;
end;
pdf.Free;
end;
Alles anzeigen
I'm trying to figure out pricing. To do the merging, it looks like I want the premium package. In addition to that, we need to support printing of individual items to pdf from our website. That is, the item is merged by the webserver, then saved to a pdf and presented to the user. One webserver only, and one or two urls. Is PDF Creation sufficient, or do I need wPDFControl4?
Looks good. Digging deeper, our OnMailMergeGetText uses RTTI to get values of published properties (and avoid having a giant case statement). I suspect the same thing can be done with reflection in C#. Do you have an example, or a hint on where to start? I didn't immediately find one in the textDynamic manual.
I'm trying to understand the detailed coding differences we'll need to implement if we convert our apps from delphi to C# and use TextDynamic instead of WPTools6.
We do merging and printing, which means we have a large number of templates that we need to continue to work without modification after the conversion. The templates are not data-aware, the replacement variables are populated assigning a custom procedure to rtfTemplate.OnMailMergeGetText:
rtfTemplate.OnMailMergeGetText := rtfTemplateMailMergeGetText;
The merge uses TWPCustomRichText.MergeText(). You've said that TextDynamic works differently, but do you have any documentation on how we'll need to change the way we do things?
Thanks for your quick reply. TWPCustomRichText.Print is how we're printing the merged document directly. The same rich text object is assigned to the preview dialog when previewing and printing.
We seem to have fixed this by changing a printer setting in the PC's control panel. When setting the paper size to Legal, there is also an item called "Other Size"/"Change Document Size", which was set to letter size. We changed that to Legal, and now the Print method honors the margins as expected.
I don't pretend to understand why it matters, but I can't argue with the result. Thanks again for your support.
We've installed a new printer (Xerox) to replace an older Ricoh. Some of the things we print are on legal sized paper. When they're previewed and then printed using the wptools preview dialog, all works fine. If they are printed directly, the top margin is increased by about an inch. What should I be looking for in my software or printer settings?
We setup a specific printer on the PC for each type of print job so we can deviate the settings individually. My software knows the paper tray and sets that prior to printing.
Anything we can do about resources? Are you talking about RAM? It seems that the problem has happened on XP machines, and once on a Vista box.
Once in awhile we'll print a few hundred merged letters, and one of them will fail to print the logo (one logo is used per batch -- it is preloaded into a variable before the merge begins). We can re-print that one item and the logo is ok. We can re-print the whole batch and almost always all the logos are fine. This happens on different computers and printers.
This happens in Delphi 7 and also in Delphi XE (duplicate code in each environment).
Is there any known issue we can address? Sounds like a timing loop issue to me, but I have no idea where it might be, except that we seem to have eliminated delphi and the printer driver. Here's the code, which I'm sure looks familiar.
procedure TMergeEngine.rtfTemplateMailMergeGetText(Sender: TObject;
const inspname: String; Contents: TWPMMInsertTextContents);
var
wpobj : TWPOImage;
begin
//vvv jhg 04/02/2013
if UpperCase(inspname)='LOGO' then begin
// A) - there is no image in this field
if Contents.CurrentObject=nil then
begin
wpobj := TWPOImage.Create(rtfTemplate);
if (rv.LenderLogo.Picture.Graphic<>nil) then begin
wpobj.Graphic := rv.Logo.Picture.Graphic;
wpobj.WidthTW := wpobj.ContentsWidth;
wpobj.HeightTW:= wpobj.ContentsHeight;
Contents.obj := wpobj;
end;
end
else
// B) There is an image, we replace the contents
begin
Contents.CurrentObject.Graphic := rv.Logo.Picture.Graphic;
end;
end
else
contents.StringValue := rv.propertyByName(inspname);
//^^^ jhg 04/02/2013
end;
Alles anzeigen
Yee Haw!! I compare the D2011 dfm with the D7 one and found imagelist2 was missing in the former. copied it into the dfm (reckless of me, I know), recompiled, and now I have glyphs. Hallaleuja.
ZitatI vaguely recall a problem like this from the past, but can't find anything that solves it
Ok, January 2012 I asked the same question. Looks like an issue in a dfm. Must have applied the fix to my D7 but not to my XE.
In delphi XE, i'm previewing a merged document. on the top bar I see the listbox to choose display size - Page Height, etc. But the print dialog buttons are not visible unless I mouse over them, and then they just show raised squares. They do function though -- I click, and I get a printer setup dialog, for example.
I vaguely recall a problem like this from the past, but can't find anything that solves it. Any hints?
I'm trying to understand this FAQ and not getting very far. Pardon my ignorance.
I have a jpg (a logo image) in a database that should print at the top of each merged document. In the example you refer to image1 and image2. What are these, and where do they live? Do you have a more complete example?
In my wptools 6 document, I have the following, which translates to a medium sized dot, centered vertically on the line. When we print this document to our production printer, it comes out as a character-sized rectangular box. When we print to another printer or to wPDF, it prints as a the dot, as it should.
We lease the printer, and the lessor's technical guy is certain that the problem is in our wptools application. Could he be right? In any case, what might our problem be?
Jeremy
Julian, thanks, PNGIMG did the trick.
Jeremy
In my mailMergeGetText method, I want to set the content.string for one replacement var to a small block of text containing 2 parts. The first part is easy -- just a sentence. The 2nd part is a paragraph, indented a bit.
for example
Can you suggest a way to do this?
I have wpObj_Image in my uses clause, it has DEFINE PNGLIB defined. I can select png, bmp and jpg files. The latter 2 types will add to the document and display, but the png won't. You can see the text expand and then immediately shrink when WPRichText1.TextObjects.Insert(img) is executed.
procedure TfrmEditTemplate.actnODgraphicAccept(Sender: TObject);
var
img: TWPOImage;
begin
img := TWPOImage.Create(WPRichText1.Memo.RTFData);
img.LoadFromFile(actnODgraphic.Dialog.FileName);
WPRichText1.TextObjects.Insert(img);
end;
By the way, PNGDELPHI is no longer available. Codegear challenged it, and asked for it to be removed from free downloads.
Julian, I hate to be a pitbull about this, but I don't understand your comment. Can you explain what you mean by
ZitatIn second try You didn't add wpNoMinimumCellPadding