This works as long as a printer is defined in the user's Windows profile.
Note I enabled {$DEFINE USELARGEPAGE} in unit WPPDFR1.pas to be sure a printer is available.
Thanks.
This works as long as a printer is defined in the user's Windows profile.
Note I enabled {$DEFINE USELARGEPAGE} in unit WPPDFR1.pas to be sure a printer is available.
Thanks.
WpTools 6.14
When I create rtf files with Word and then open in WPTools my page layout information is wrong. The problem seems to be with section breaks. When a document has section breaks on every page, the page layout information (margins, footer margins, etc.) are wrong. For example, page 1 is being set to 1/2" margins by default no matter what, then page 2 gets margins that were defined on page 1, then page 3 gets margins that were defined on page 2 and so on. It's like a page index is out of order. After looking at the WPTools source code I found a fix. In the unit WPIOReadRTF.pas I change the following...
TWPRTFReader.ChangeProp(ipropCode, Value: Integer; Alt: Boolean = FALSE);
(go to around line 5822 - 5832)
ipropNewSection: // case statement
{$IFDEF WP6}
if FLoadInHeaderFooter then
begin
// Ignore Sections in header and footer texts (Word does such things!)
Ignore;
end else
if Value = 1 then // \sectd
begin
// Set section default - sectd. Use the Document Default Values
** Changed this** bUseSectdLayout := false; //*** CHANGE THIS TO FALSE TO PREVENT SECTIONS FROM USING PREVIOUS PAGE LAYOUT
SectdLayout.paperw := DefLayout.paperw;
SectdLayout.paperh := DefLayout.paperh;
SectdLayout.margl := DefLayout.margl;
SectdLayout.margr := DefLayout.margr;
SectdLayout.margt := DefLayout.margt;
SectdLayout.margb := DefLayout.margb;
SectdLayout.marg_header := DefLayout.marg_header;
SectdLayout.marg_footer := DefLayout.marg_footer;
Layout.marginmirror := DefLayout.marginmirror;
Layout.landscape := DefLayout.landscape;
end else
Alles anzeigen
I don't know if this is the correct fix or not. If anyone has a better fix please let me know.
Thanks,
Tom
I have a question regarding the way TWPDFExport outputs data. When I use an older version of wPDF (3.10), control characters are placed before and after each sentence or paragraph, but when I use a newer version of wPDF (3.54, 3.61), control characters are placed before and after each word. This causes a dramatic slow down in speed and file sizes grow much larger. Is there a switch in wPDF that controls how this works?
Here are a couple snips of raw PDF that show what I'm talking about. Note that in these examples all I'm doing is printing a simple address
9600 Long Point Road, Suite 300
Houston, TX 77055
Example 1 using wPDF by WPCubed GmbH V3.10[32]
Td(9600 Long Point Road, Suite 300 )Tj
1.667 Tw 0 -77 Td(Houston, TX 77055)Tj
6.571 Tw -14 -231
Example 2 using wPDF by WPCubed GmbH V3.54[32]
Td(9600)Tj
0 Tc 136 0 Td( )Tj
0.66667 Tc 17 0 Td(Long)Tj
0 Tc 143 0 Td( )Tj
0.25 Tc 17 0 Td(Point)Tj
0 Tc 143 0 Td( )Tj
0.5 Tc 17 0 Td(Road,)Tj
0 Tc 160 0 Td( )Tj
0.25 Tc 17 0 Td(Suite)Tj
0 Tc 139 0 Td( )Tj
0.66667 Tc 17 0 Td(300 )Tj
0.28571 Tc -806 -77 Td(Houston,)Tj
0 Tc 246 0 Td( )Tj17 0 Td(TX)Tj
89 0 Td( )Tj17 0
Td( )Tj
0.5 Tc 17 0 Td(77055)Tj -359 -231
I appreciate any help.
Tom