Return-Path: X-Original-To: apmail-pdfbox-users-archive@www.apache.org Delivered-To: apmail-pdfbox-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 653ED18EAD for ; Thu, 10 Mar 2016 20:51:04 +0000 (UTC) Received: (qmail 28454 invoked by uid 500); 10 Mar 2016 20:51:04 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 28435 invoked by uid 500); 10 Mar 2016 20:51:04 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 28418 invoked by uid 99); 10 Mar 2016 20:51:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Mar 2016 20:51:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6331518053B for ; Thu, 10 Mar 2016 20:51:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.448 X-Spam-Level: * X-Spam-Status: No, score=1.448 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id kbx1_rscEgAo for ; Thu, 10 Mar 2016 20:51:02 +0000 (UTC) Received: from mail-vk0-f43.google.com (mail-vk0-f43.google.com [209.85.213.43]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id BBA985F1BE for ; Thu, 10 Mar 2016 20:51:01 +0000 (UTC) Received: by mail-vk0-f43.google.com with SMTP id c3so110822607vkb.3 for ; Thu, 10 Mar 2016 12:51:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=wvnwxwPgjkfTlR0wYALWb/0yS20o0J5GzJVEldTHCVs=; b=OZlQ0mI4uo8UMQqaIWtg0D1w/6GD3TctmvMWnjVgZnuamz6JWbEn3Z51LOigVC5wiX Alyy2pjFL335LkXqfu9xJjlDJ/vBrJd4mwM51Gs8pV2iImAyl/GXK8SXA9n7VIcpemx5 KPve8IfOZqtJgQqriHcsz4Q1CtnXFlHX+QN2xJBQDmp06FK//KoPNyZFkJj71lW+536W PIlAEdgQFODoi3kTS/DxJLcAGfQI+N0Jknb6blDziYaljY1158uSHbSSwWdlxkQd/BpH hTrXijBdx9E6xn8Pm/AL32tn3gY0fkUz1odVizSJX7TWzu6PwXgZyuomW10onPS7LFHQ gWUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=wvnwxwPgjkfTlR0wYALWb/0yS20o0J5GzJVEldTHCVs=; b=e38N5cR0n9ORQpwpKN5V3psHvhqsXEnI16JSIQEUktLNMtSjxDUIhPsZEsqRqDcj6X sAfn3TlSkobJlkQmBMhD33X07TNDOla20NekexCSyuHxzOqzBL//1iTxNA7ssG8nJsOQ kQCNFywakMXYbaBzZx/E0s6hiNKtEX9swxmI4zgA8JW63b533iaFI1oiVqV6wV6M+XoV zxSmzsZjPCVZINbSUkIqNy4yajOM+16QpCD5gS/hnHCms+izpXuDdcYPQAcXieOC1DWF fKxfK+VJhrTnp23SDVO/D/hx8Ibf1Lr7j/W0AHwrQlxlPWvMkjcWShEbSWUq2SkFFx5i iD3w== X-Gm-Message-State: AD7BkJLhRdIXVEBo9Ea9HYk454N6zazK9vG8kogLSL8BZtzPjyuh1L/9ZOsNGcsi+gs49Q0nU8FrZcGKJGDX3w== MIME-Version: 1.0 X-Received: by 10.31.169.87 with SMTP id s84mr5952726vke.55.1457643060982; Thu, 10 Mar 2016 12:51:00 -0800 (PST) Received: by 10.176.2.115 with HTTP; Thu, 10 Mar 2016 12:51:00 -0800 (PST) In-Reply-To: <56E1AA98.3090005@t-online.de> References: <56DFC28B.8000607@t-online.de> <56E1AA98.3090005@t-online.de> Date: Thu, 10 Mar 2016 14:51:00 -0600 Message-ID: Subject: Re: How to reset text on a new page? From: Blake McBride To: users@pdfbox.apache.org Content-Type: multipart/alternative; boundary=001a1141636edbfa26052db7f85d --001a1141636edbfa26052db7f85d Content-Type: text/plain; charset=UTF-8 Thanks. I actually got it working. I have even switched between text mode and line drawing mode. I'm now working on being able to switch back to text mode. Thanks for the help! Blake On Thu, Mar 10, 2016 at 11:10 AM, Tilman Hausherr wrote: > Am 10.03.2016 um 15:50 schrieb Blake McBride: > >> Thanks, but getting a little confused here. Let me ask this: >> >> Each page in a document has its own PDPageContentStream _and_ PDPage. >> This >> means that there is a one-to-one relationship between >> PDPageContentStream's >> and PDPage objects. Is that (always) true? >> > > No. It is possible to have the same content stream for several pages. It > is even possible to have the same page object several times. This is > possible, but would not be very useful, obviously. And that may be what > happened to you. > > And it is also possible to have an array of content streams for one page, > but that is a different story. > > If still you don't know what went wrong, please post your code (rather, > the shortest possible code that reproduces the problem). > > Tilman > > > > >> Thanks. >> >> Blake >> >> >> >> On Wed, Mar 9, 2016 at 12:28 AM, Tilman Hausherr >> wrote: >> >> You must create a new content stream object for each page. And of course >>> also a new PDPage object too. >>> >>> Tilman >>> >>> >>> Am 09.03.2016 um 04:31 schrieb Blake McBride: >>> >>> Hi, >>>> >>>> I get that one starts text with contentStream.beginText() and ends text >>>> with contentStream.endText(). And I get that one gets a new page with >>>> doc >>>> .addPage(page). But when I use all this to print two pages, I end up >>>> with >>>> two pages each with the same text (the merge of the contents of the two >>>> pages). How can I clear the page contents for a new page? (I didn't >>>> see >>>> an example that printed two pages in the examples.) >>>> >>>> Thanks! >>>> >>>> Blake McBride >>>> >>>> >>>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org >>> For additional commands, e-mail: users-help@pdfbox.apache.org >>> >>> >>> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org > > --001a1141636edbfa26052db7f85d--