From users-return-11438-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Fri Feb 8 08:07:38 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9F57F18060E for ; Fri, 8 Feb 2019 09:07:37 +0100 (CET) Received: (qmail 15715 invoked by uid 500); 8 Feb 2019 08:07:36 -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 15703 invoked by uid 99); 8 Feb 2019 08:07:35 -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; Fri, 08 Feb 2019 08:07:35 +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 378F818191B for ; Fri, 8 Feb 2019 08:07:35 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.152 X-Spam-Level: ** X-Spam-Status: No, score=2.152 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FROM_EXCESS_BASE64=0.105, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, 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 mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id WyAkDy8OW2W8 for ; Fri, 8 Feb 2019 08:07:33 +0000 (UTC) Received: from mail-it1-f175.google.com (mail-it1-f175.google.com [209.85.166.175]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id DD549623C0 for ; Fri, 8 Feb 2019 08:07:32 +0000 (UTC) Received: by mail-it1-f175.google.com with SMTP id y184so556617itc.1 for ; Fri, 08 Feb 2019 00:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ha8aLQ941OIaNYQ02ozmRoioO2A8/PEykJ2dGNxtkSY=; b=I8uF1l/Vq17FwPaSZSeVRgm/GfRd7Qg8Hi8WDOZwC0B1taaD6ebTisE5vS+sugKvj3 5VvNG9Jvo6KArT8ga3tmv7gsuWIII9Szn4m2T56f+/iICF8b/6yJ+Z8KymGLnHKwpbwE 4O5hcn3gGwe52pSZNbXEpdiVZyCsf9Tk77QZ+DK0iLFJLwnd+zt4SQiA5OQG4DR+bLwt 4cRd6aniFwdnxS8leo8tEh+Afv2Mo4CCMtVqeLt1wd1Gorb9wLJVzFMOSw+DlJHGmx8e Q8rFcu1W5II+ThHoS3JrPv0dQt9NUrL3QpFELLHGTVIFzZ5lAabPfHu3QkSmf3dp4Fp/ NnCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ha8aLQ941OIaNYQ02ozmRoioO2A8/PEykJ2dGNxtkSY=; b=HZpNx2iCAiOhzHshnUBnmJ1V0W+6VgWqWN76sl/6asThCojSR92xjE+w81YPnz4bYv cAvjh3fQw9WLYHdadTKl9W23Ln0ctxYl6sXOeNk+IlKynK1i0lX78wRgDL8FQfR68I6j f0cUAp5BNdpAeHllRlyZOASXNvytGTRa69RsPOaNTlJ16A22jHgRADCLqQLcDPv/vwTB eM/oox8Rex3VxexWuP9p5mtsBLHd6jL79LcBgd/NsxKg//nXqCUSmBjxGlZlq9Br0RnG tCQTNWRgkUq7ih2g8FTxRMkTo10d6UCHxdppMuF5Bhds0j/trfxNhzexM+2n1y1I7PJp oKqg== X-Gm-Message-State: AHQUAuYiD8MGwyVnYcLY8peGKc1OAeSgwNfNr2S105mTXLt4cxAeD3ZA fRZMf0qxFHZYfHDc5PNfMn/Q6M/aOELJJrneFv9wMUvYSSs= X-Google-Smtp-Source: AHgI3IZ/FOHPpOI52xugPIZMzEm/XRmkpbtQ2rtWflDL61y4w4HZclFjVt4KcHe3jrUQTJyHIBaPqR7jssJSoxRALEo= X-Received: by 2002:a02:23c7:: with SMTP id u190mr11605768jau.125.1549613251200; Fri, 08 Feb 2019 00:07:31 -0800 (PST) MIME-Version: 1.0 References: <561026d2-ef46-ade7-735c-f4002cccfa7d@t-online.de> In-Reply-To: <561026d2-ef46-ade7-735c-f4002cccfa7d@t-online.de> From: =?UTF-8?B?0JXQstCz0LXQvdC40Lkg0JrQvtGA0L7Qu9GM?= Date: Fri, 8 Feb 2019 13:07:20 +0500 Message-ID: Subject: Re: Questions about viewports To: users@pdfbox.apache.org Content-Type: multipart/mixed; boundary="00000000000060bb9f05815d73f7" --00000000000060bb9f05815d73f7 Content-Type: multipart/alternative; boundary="00000000000060bb9c05815d73f5" --00000000000060bb9c05815d73f5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello. On this pdf i have vector image. Pdf has a layers. I try to use pdfbox lib in my Java project. I wrote code like this: PDDocument document =3D PDDocument.load(new File("C:\\Users\\user\\Documents\\=D0=9F=D1=80=D0=B8=D0=BC=D0=B5=D1=80=D1= =8B PDF\\=D1=82=D0=B5=D1=81=D1=82=D0=BE=D0=B2=D1=8B=D0=B5 =D1=84=D0=B0=D0= =B9=D0=BB=D1=8B PDFDocInfo\\07 642_=D0=A2=D0=A0_1_1_=D0=9A=D0=969_=D0=90=D0=9D_1 (=D0=B2=D0= =B5=D0=BA=D1=82=D0=BE=D1=80).pdf")); PDPage page =3D document.getPage(0); List viewports =3D page.getViewports(); for (int i =3D 0; i < viewports.size(); i++) { System.out.println("Viewport " + (i+1)); PDViewportDictionary get =3D viewports.get(i); PDRectangle bBox =3D get.getBBox(); System.out.println("=D0=A0=D0=B0=D0=B7=D0=BC=D0=B5=D1=80 "+= bBox.getWidth()+" x "+bBox.getHeight()); } When i get viewports from page, i can get Width and Height. What is viewport means? Its like viewports for vector images on page or it is viewports for layers of pdf file? =D0=BF=D1=82, 8 =D1=84=D0=B5=D0=B2=D1=80. 2019 =D0=B3. =D0=B2 00:39, Tilman= Hausherr : > Am 07.02.2019 um 12:29 schrieb =D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9= =D0=9A=D0=BE=D1=80=D0=BE=D0=BB=D1=8C: > > Hello. I try to understand how to get Vector images from pdf file. I > think > > that viewport related to vector images on page of pdf document. Is that > > right? How many vieports is how many vector images in pdf? And width an= d > > height of viewport is related to vector images? Or vieports is related = to > > layers in Resources - Properties? > > > I have no idea what you mean, although there is a concept of viewports > in the PDF specification and PDFBox does support viewport dictionaries. > Please share a PDF file and explain what you are trying to do. > > Tilman > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org > > --00000000000060bb9c05815d73f5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello. On this pdf i have vector image. P= df has a layers. I try to use pdfbox lib in my Java project.=C2=A0
I wr= ote code like this:
PDDocument document =3D PDDocument.load(= new File("C:\\Users\\user\\Documents\\=D0=9F=D1=80=D0=B8=D0=BC=D0=B5= =D1=80=D1=8B PDF\\=D1=82=D0=B5=D1=81=D1=82=D0=BE=D0=B2=D1=8B=D0=B5 =D1=84= =D0=B0=D0=B9=D0=BB=D1=8B PDFDocInfo\\07 642_=D0=A2=D0=A0_1_1_=D0=9A=D0=969_= =D0=90=D0=9D_1 (=D0=B2=D0=B5=D0=BA=D1=82=D0=BE=D1=80).pdf"));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PDPage page =3D document.getPag= e(0);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 List<PDViewpor= tDictionary> viewports =3D page.getViewports();
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (int i =3D 0; i < viewports.size(); i++)= {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 System= .out.println("Viewport " + (i+1));
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PDViewportDictionary get =3D viewports.= get(i);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 P= DRectangle bBox =3D get.getBBox();
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 System.out.println("=D0=A0=D0=B0=D0=B7=D0= =BC=D0=B5=D1=80 "+bBox.getWidth()+" x "+bBox.getHeight());
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }

When i get viewports from page, i can get Width and Height. What i= s viewport means? Its like viewports for vector images on page or it is vie= wports for layers of pdf file?

=D0=BF=D1=82, 8 =D1=84=D0=B5=D0= =B2=D1=80. 2019 =D0=B3. =D0=B2 00:39, Tilman Hausherr <THausherr@t-online.de>:
Am 07.02.2019 um 12:29 schrieb =D0= =95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9 =D0=9A=D0=BE=D1=80=D0=BE=D0=BB=D1= =8C:
> Hello. I try to understand how to get Vector images from pdf file. I t= hink
> that viewport related to vector images on page of pdf document. Is tha= t
> right? How many vieports is how many vector images in pdf? And width a= nd
> height of viewport is related to vector images? Or vieports is related= to
> layers in Resources - Properties?
>
I have no idea what you mean, although there is a concept of viewports
in the PDF specification and PDFBox does support viewport dictionaries. Please share a PDF file and explain what you are trying to do.

Tilman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org

--00000000000060bb9c05815d73f5-- --00000000000060bb9f05815d73f7 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org --00000000000060bb9f05815d73f7--