WPCubed Product Support

Page Layout Problem with Sections

Hi,

We are utilizing sections in our WPTools editors which may have different page layouts. That works fine when we directly print to a printer or PDF writer. However, when we save the document to a file in RTF format we have a problem: The page layout of the last section in the document is overwritten by the page layout of the first section. All sections upto the last one are just fine.

We are still using WPTools version 5.30.1.

Any help on this issue will be appreciated.

Thanks,

#1 ♥ 0
7.9k Views 3 users read 7 min
support

Hi,

Can you mail me an example file in WPT format.

You should really use a new version. You can check out the history.txt for fixes which have been implemented the last 9 months.

Julian

#2 ♥ 0

Alright Julian, here is a file with three sections. The first section is setup to print portrait, the next two landscape. However, the last section appears as portrait as the first section when saved to RTF.

<WPTools_Format>
<GlobalPageFormat><StandardFont>
<SectionPageFormat>
<SectionPageFormat>
<SectionPageFormat>
<variables>
<variable></variables>
<numberstyles></numberstyles>
<stylesheet><pstyle>
<pstyle>
<pstyle>
<pstyle>
<pstyle>
<pstyle>
<pstyle>
<pstyle>
<pstyle>
<pstyle>
<pstyle>
<pstyle>
<pstyle>
</stylesheet><element>
<cs><div></div>
</element>
<element>
<table><tr><td><cs><c>ADMIN - Sigma Data Systems, Inc.</td>
<td><c><txtobj>
 - <txtobj>
</td>
<td><c><txtobj>
 of <txtobj>
</td>
</tr>
</table>
</element>
<element>
<div></div>
</element>
<element>
<table><tr><td><c>ADMIN - Sigma Data Systems, Inc.</td>
<td><c><txtobj>
 - <txtobj>
</td>
<td><c><txtobj>
 of <txtobj>
</td>
</tr>
</table>
</element>
<element>
<div></div>
</element>
<element>
<table><tr><td><c>ADMIN - Sigma Data Systems, Inc.</td>
<td><c><txtobj>
 - <txtobj>
</td>
<td><c><txtobj>
 of <txtobj>
</td>
</tr>
</table>
</element>
<cs><div><c>DEPARTMENT OF HUMAN RESOURCES</div>
<cs><div><c>Certification of Eligibles</div>
<cs><div></div>
<cs><div></div>
<cs><div><cs><c>Classification:<c>	456789 : Maintenance Worker</div>
<div><c>Date Certified:<c>	April 16, 2008</div>
<div><c>Certification #:<c>	REQ:02-2543  REF:001</div>
<div></div>
<cs><div><c>Reason for Vacancy:  <c>	</div>
<cs><div><c>	</div>
<cs><div><c>	</div>
<cs><div></div>
<div><c>Number Referred:<c>	1</div>
<div></div>
<div><c>Hiring Department:<c>	Department of Public Works</div>
<div></div>
<div><c>Department Director:<c> 	</div>
<cs><div></div>
<div><c>Department Director Signature:<c> 							</div>
<div></div>
<div><cs><c>	<cs><c>	<c>	</div>
<div><c>				Signature													Date</div>
<div></div>
<cs><div><c>Key for Interview Results:</div>
<div></div>
<div><c>S 		= Selected </div>
<div><c>INS 	= Interviewed, Not Selected</div>
<div><c>FTA = Failed to Appear for Interview</div>
<div><c>DNR= Did Not Respond</div>
<div><c>W 	= Waived Interview/Appointment</div>
<div><c>DQ	= Disqualified (Police/Human Resources only)</div>
<div></div>
<cs><div></div>
<cs><div><c>Recruitment Master Information	</div>
<div></div>
<cs><div><c>Recruitment ID:<c> 97-141 : Janitor</div>
<div></div>
<div><c>Human Resources Analyst:<c> Jack Feldhaus</div>
<div></div>
<div><c>Number of Eligibles:<c> </div>
<div></div>
<cs><div><c>                                                                                Interview Date        Outcome            </div>
<div></div>
<cs><div><c>	|	|	|</div>
<div><c>HECTOR L. ALTORO	|	|	|</div>
<div><c>8289 NORTH 17 STREET 	|	|	|</div>
<div><c>LOS ANGELES CA 32146	|	|	|</div>
<div><c>(414)645-6567 (414)   -	|	|	|</div>
<cs><div><cs><c>Yes<c>	|	|	|</div>
<cs><div><cs><c>	<c>|	|<c>	<c>|</div>
<cs><div></div>
<div><c>Some extra text!</div>

Thanks,

#3 ♥ 0
support

Hi,

there is no section defined in this data.

Julian

#4 ♥ 0

Julian,

This output is from a TWPCustomRichText engine which got content by appending 3 sections by calling the AppendAsSection method with a TWPCustomRtfEdit editor as parameter. I used the SaveToFile method with WPTOOLS format to produce it. I don't understand why it does not contain any sections...

Thanks

#5 ♥ 0
support

Hi,

Here you will find a demo for sections:

Please modify to reproduce the problem - based on the current version of WPTools.

Regards,

Julian

#6 ♥ 0

We have upgraded to WPTools 5.47.5, and tested this issue. It still uses the formating of the first part of the document in the last section of the document.

We have downloaded the demo, and built it using Delphi 2005. I did not see the purpose of using the Save+Load String button, or the WPT checkbox. Therefore, my testing did not utilize those controls. Without any changes to the demo code, we were seeing the same format problem as in our application. The preview within the demo looks correct, but the resulting RTF file created by the Save button results in the problem formatting seen in MS Word.

After seeing the problem in the demo, I added code to insert more text when the new section is appended. When the RTF from this demo is viewed in Word, it also shows an additional blank page at the start of each section (in addition to the wrong layout of the last section).

I am sending you an email containing the modified demo, and the resulting RTF files.

#7 ♥ 0
This category is archived. No new posts are possible.