Age | Commit message (Collapse) | Author |
|
In contrast with FPDFText_GetFontSize(), this exposes the font size of
the text object according to the text state, rather than the font size
of a particular character.
Change-Id: Iac88d1aea8fb6bb5522bdaf01363aa6d32025b8f
Reviewed-on: https://pdfium-review.googlesource.com/35931
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
This is similar to FPDFPath_GetMatrix(), but works on text, not path
objects.
Change-Id: If268362b7fa4398124b953e0e2225074523f5f65
Reviewed-on: https://pdfium-review.googlesource.com/35434
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Bug: pdfium:978
Change-Id: I0dcffdfd1b19b83e5234da7791cb3f3e52cc257b
Reviewed-on: https://pdfium-review.googlesource.com/35110
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This is similar to the existing FPDFImageObj_SetMatrix(), but this
exposes the matrix of CPDF_PathObject and provides both a getter and a
setter.
Change-Id: Ib90a64929dae1b2be3889eca57e4af822d7823be
Reviewed-on: https://pdfium-review.googlesource.com/33670
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It was already possible to set the draw mode of a path object, this is
the other direction.
Change-Id: Id0ee98dd8dfe433edd0e4715fc009ad4d1625981
Reviewed-on: https://pdfium-review.googlesource.com/33010
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It was already possible to set the stroke width of a page object, this
is the other direction.
Change-Id: I5c4681b232768fc928bc7a169f223877284d4812
Reviewed-on: https://pdfium-review.googlesource.com/32770
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL deprecates the following APIs in favor of the more general
versions:
FPDFPath_SetStrokeColor
FPDFPath_GetStrokeColor
FPDFPath_SetStrokeWidth
FPDFPath_SetLineJoin
FPDFPath_SetLineCap
FPDFPath_SetFillColor
FPDFPath_GetFillColor
FPDFText_SetFillColor
Change-Id: Iccaa2ce26025e51366bc50e058e39650f3698836
Reviewed-on: https://pdfium-review.googlesource.com/32711
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
This CL adds the following APIs:
FPDFPageObj_SetStrokeColor
FPDFPageObj_GetStrokeColor
FPDFPageObj_SetStrokeWidth
FPDFPageObj_SetLineJoin
FPDFPageObj_SetLineCap
FPDFPageObj_SetFillColor
FPDFPageObj_GetFillColor
Bug: pdfium:980
Change-Id: I19f9abb6756314ba8bd2f66a6c38e2e722cd8473
Reviewed-on: https://pdfium-review.googlesource.com/32192
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
The existing PostScript modes write data into EMF comments. This
satisfies Chromium's use case, but other embedders want to write data
out via ExtEscape() in PASSTHROUGH mode.
BUG=pdfium:1068
Change-Id: I998035e99fbb84b16dcd244b750b476cecc3bd22
Reviewed-on: https://pdfium-review.googlesource.com/31299
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
|
|
Bug: pdfium:1037
Change-Id: I05f992d2a4ee5a11b5c57ec51107c4b00011809c
Reviewed-on: https://pdfium-review.googlesource.com/31190
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
New calls added in this cl:
- FPDFPageObjMark_GetParamKey
- FPDFPageObjMark_GetParamValueType
- FPDFPageObjMark_GetParamIntValue
Bug: pdfium:1037
Change-Id: Iedb74ddbf8a5483de62094ec295dadd6367d5175
Reviewed-on: https://pdfium-review.googlesource.com/30912
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:1037
Change-Id: I1b7035eb199f9dd1d730b0b1112aa455f0fabcc2
Reviewed-on: https://pdfium-review.googlesource.com/30870
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Initially it contains:
- FPDFPageObj_CountMarks
- FPDFPageObj_GetMark
- FPDFPageObjMark_GetName
This allows reading the content marks from a page object.
Bug: pdfium:1037
Change-Id: I3d7554b71f938778890fdb44088e0d45dd2718d9
Reviewed-on: https://pdfium-review.googlesource.com/28710
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This call removes a page object from a page. We currently offer an
API to insert these objects, but not to remove.
Bug: pdfium:1037
Change-Id: I35ff596f9e7c87a39051f0cb1de40a5bec40fee5
Reviewed-on: https://pdfium-review.googlesource.com/28492
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I3ee754c2875b6ea28750803dbd8e4d9fe6dd1d41
Reviewed-on: https://pdfium-review.googlesource.com/24570
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
- Adds two new public bits of API:
- StructElement_GetMCID(STRUCTELEMENT) to return the marked content
ID of the struct element.
- IMAGEOBJ_METADATA.mcid to contain the marked content ID of the
image.
- Restores ContentMark::GetMCID, which was removed with other dead
code in https://pdfium-review.googlesource.com/c/pdfium/+/19170.
- Adds a couple calls to tests, including a simple new PDF to test
the struct tree marked content ID.
Bug:pdfium:957
Change-Id: I92856e43d741df989e53a575a08258da19a39f22
Reviewed-on: https://pdfium-review.googlesource.com/20632
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Add a presubmit check to prevent future missing entries. Also fix an
erroneous header entry.
Change-Id: I8aeafd820de984f5af90b3e4ea428f582e82f254
Reviewed-on: https://pdfium-review.googlesource.com/21571
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Keep the old name, but mark it as deprecated and don't use it in own
code.
Change-Id: I17b88dccacf494a03562c0d003cfcb2bc03bf430
Reviewed-on: https://pdfium-review.googlesource.com/14750
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This was the last place talking about "point objects".
Change-Id: Ib5f5d5b8efdd674ca5902ff82c2bd4d9f2db8bb1
Reviewed-on: https://pdfium-review.googlesource.com/14651
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Combined with the previously added FPDFPath_CountPoint(), this allows
getting the coordinates of all points of a path.
Change-Id: Ic969723d4b01ee427498d38ce323c74147b87a9c
Reviewed-on: https://pdfium-review.googlesource.com/14111
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
It was already possible to get the fill color, this exposes the number of
points. Naming attempts to be consistent with existing
FPDFPage_CountObject().
Change-Id: I79e8dd9f0c077de84ce9017a01d239e48e58174a
Reviewed-on: https://pdfium-review.googlesource.com/13592
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Since the returned data is a key, it should be a byte string and not a
wide string.
Change-Id: I9243d88586ea5b13c4b6556479d17316bf07e32e
Reviewed-on: https://pdfium-review.googlesource.com/12710
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Added FPDFImageObj_GetImageMetadata() for retriving the image metadata
of image objects, including its dimension, DPI, bits per pixel, and
colorspace.
* Added a corresponding embedder test.
Bug=pdfium:677
Change-Id: I4229334d1ac2125b21a46e2e44ea937ea2e94b51
Reviewed-on: https://pdfium-review.googlesource.com/10110
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
This CL renames DLLEXPORT to FPDF_EXPORT and STDCALL to FPDF_CALLCONV to
be more PDFium specific.
This is split off of https://pdfium-review.googlesource.com/c/8970 by
Felix Kauselmann.
Bug: pdfium:825
Change-Id: I0aea9d43f1714b1e10e935c4a7eea685a5ad8998
Reviewed-on: https://pdfium-review.googlesource.com/10610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
builds."
This reverts commit 00334675c18a0203f313cceb670c970a77280f49.
Reason for revert: Breaking the deps roller - https://chromium-review.googlesource.com/c/609307
Original change's description:
> Add a build target and a proper export header for shared library builds.
>
> This CL adds support for Chromium's component build feature to pdfium.
>
> The export header stub in fpdfview.h is expanded to match Chromium's
> export mechanisms and patterns (fixes pdfium:825).
>
> A component/shared library build can be triggered by adding
>
> is_component_build = true
>
> as a gn argument. Please note that setting this will also affect some
> of pdfiums dependencies like v8, which will be build as components
> too.
>
> Additionally, this CL provides a "pdf_source_set" template which
> dynamically enables the use of "source_set" when building a complete
> static library or a shared library to reduce build time.
>
> When testing this it is recommended to only build the pdfium target as
> most of pdfiums test rely on non-public functions which aren't exported
> by the shared library.
>
> Bug: pdfium:825,pdfium:826
> Change-Id: Icedc538ec535e11d1e53c4d5fabc8c064b275752
> Reviewed-on: https://pdfium-review.googlesource.com/8970
> Reviewed-by: dsinclair <dsinclair@chromium.org>
> Commit-Queue: dsinclair <dsinclair@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org,brucedawson@chromium.org,dsinclair@google.com,dsinclair@chromium.org,licorn@gmail.com
Change-Id: Ib02af2298932481293f50d362ae87bfedf284821
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: pdfium:825, pdfium:826
Reviewed-on: https://pdfium-review.googlesource.com/10550
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL adds support for Chromium's component build feature to pdfium.
The export header stub in fpdfview.h is expanded to match Chromium's
export mechanisms and patterns (fixes pdfium:825).
A component/shared library build can be triggered by adding
is_component_build = true
as a gn argument. Please note that setting this will also affect some
of pdfiums dependencies like v8, which will be build as components
too.
Additionally, this CL provides a "pdf_source_set" template which
dynamically enables the use of "source_set" when building a complete
static library or a shared library to reduce build time.
When testing this it is recommended to only build the pdfium target as
most of pdfiums test rely on non-public functions which aren't exported
by the shared library.
Bug: pdfium:825,pdfium:826
Change-Id: Icedc538ec535e11d1e53c4d5fabc8c064b275752
Reviewed-on: https://pdfium-review.googlesource.com/8970
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Added FPDFImageObj_GetImageFilterCount() and
FPDFImageObj_GetImageFilters() for retrieving image filters of image
objects.
* Added a corresponding embedder test.
* Changed the filter of an image object in embedded_image.pdf from
DCTDecode to ASCIIHexDecode + DCTDecode, so we have a test case
for images with more than one filter.
Bug=pdfium:677
Change-Id: I398790a2cad33fea4ca16a0eb0889c04caa6b962
Reviewed-on: https://pdfium-review.googlesource.com/10130
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Bug=pdfium:854
Change-Id: I227418cdcb77e0aa7d48338f1ee0d753cef6bfdb
Reviewed-on: https://pdfium-review.googlesource.com/10390
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Added FPDFImageObj_GetImageDataDecoded() for retrieving the uncompressed
data of an image, and FPDFImageObj_GetImageDataRaw() for retrieving the
raw data of an image.
* Refactored out DecodeStreamMaybeCopyAndReturnLength(), which is
used to decode both attachment data and image data.
* Within DecodeStreamMaybeCopyAndReturnLength(), used a different
decoder function which takes care of multiple filters if exist. As
a result, CPDF_StreamParser::DecodeInlineStream() which was made
static previously is now moved back into namespace.
Bug=pdfium:677
Change-Id: I22a22c99acaca98ef8c15f88911f2646a2c854d5
Reviewed-on: https://pdfium-review.googlesource.com/9811
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Added FPDFImageObj_GetBitmap() that returns the bitmap of an image
object, and a FPDFBitmap_GetFormat() that returns the format of a
bitmap.
* Fixed a small bitmap conversion bug in cfx_dibsource.cpp.
* Enabled EmbedderTest::CompareBitmap() to support different formats
of bitmaps.
* Added an embedder test and a test PDF file with images of many
different formats.
Bug=pdfium:677
Change-Id: I6a72f9d969cf5f3577db9400ca33197c213622ed
Reviewed-on: https://pdfium-review.googlesource.com/9690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
This CL adds the missing STDCALL annotations from the PDFium APIs.
Bug: pdfium:818
Change-Id: I415efbb68f6f90cc367a4fc7289619764b528ade
Reviewed-on: https://pdfium-review.googlesource.com/8031
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
BUG=chromium:734850
Change-Id: Icc0947e2e99e77a36d8963fcf0b6d3deea161d3e
Reviewed-on: https://pdfium-review.googlesource.com/7194
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
There is already public APIs for SetFillColor, GetFillColor, and
SetStrokeColor; this is the only one missing.
This function is helpful to have when extracting path information from
annotations.
Change-Id: I2bf80a1dc5433e65bbb1d005c0e609d01c9133be
Reviewed-on: https://pdfium-review.googlesource.com/6710
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
CL [1] added the ability to set the blend mode for a page object. This
CL adds the corresponding component to GraphicsData since the blend
mode is part of ExtGSState. In addition, a test using the SetBlendMode
method is added.
[1] https://pdfium-review.googlesource.com/c/5953/
Bug: pdfium:720
Change-Id: I49120284345185c200a45cc3b37ec59f0658e2dc
Reviewed-on: https://pdfium-review.googlesource.com/6510
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I7a26e288410b4bce0be1779b1d4cec7eb1243945
Reviewed-on: https://pdfium-review.googlesource.com/6171
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=pdfium:720
R=npm@chromium.org
Change-Id: I2a43b34da6946265ca06502b9ff19ad352fd18cb
Reviewed-on: https://pdfium-review.googlesource.com/5953
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
BUG=pdfium:721
R=npm@chromium.org
Change-Id: I71b6281346b3ed67f6b8703eccd7794588559819
Reviewed-on: https://pdfium-review.googlesource.com/6013
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
BUG=pdfium:719
R=npm@chromium.org
Change-Id: Ifd9330de265f8419d588b65fbd6a6187f17badd1
Reviewed-on: https://pdfium-review.googlesource.com/5950
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
BUG=pdfium:718
R=npm@chromium.org
Change-Id: Icdc1546c87a676a7d05330dece2c5eacd92c0c92
Reviewed-on: https://pdfium-review.googlesource.com/5951
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This CL replaces some reinterpret_cast with static_cast in fpdfsdk. It also
removes an obsolete comment in fpdfedit.h
Change-Id: I36c29bfcd6382490a8c955b50ccfa4c93ab351c7
Reviewed-on: https://pdfium-review.googlesource.com/5632
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Callers should use FPDFPageObj_NewImageObj() instead.
Change-Id: If9f262af771344799a372645e466d3b8e64482ed
Reviewed-on: https://pdfium-review.googlesource.com/5153
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
There is already a method to add text from standard font, this CL adds
an option to add text using a loaded font. The font set into a text object
is ref counted and may be released, so call LoadFont on this new text obj,
and add a method to close the font. This CL also improves the SetText method
so that it now uses a WideString, in preparation for CID fonts with non-Latin
characters.
Bug: pdfium:667
Change-Id: I6829d702357d2a898a12f5297e4fd2ec993a9891
Reviewed-on: https://pdfium-review.googlesource.com/4770
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
It was already possible to set the fill color, this is the other
direction.
Change-Id: Id53f3c9969ca036ec1f9383a2cdbaf224395215f
Reviewed-on: https://pdfium-review.googlesource.com/3690
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
The possible return values were already part of the public header in the
form of a set of defines.
Change-Id: I040e0f330fdd7a3cd29f74fc6ee06d122afd2dd0
Reviewed-on: https://pdfium-review.googlesource.com/3570
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Add public FPDFPageObj_NewImageObj() call to replace
FPDFPageObj_NewImgeObj() which is missing a letter.
Change-Id: I5355ee5e5bf7e6e161e2004ec7e9257c85a463f7
Reviewed-on: https://pdfium-review.googlesource.com/2840
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The new method replaces the previous one for loading only type1 fonts. This
will create the font dictionary with the very basics needed, according to the
tables in chapter 5 of the PDF spec. The tests for now are only checking that
the information is getting passed on properly. Followup: adding text with those
fonts, generating the contents (doing that will allow testing whether the parts
that I've skipped like Encoding and cmaps are needed or not).
BUG=pdfium:667
Change-Id: Id1a61501e09542804a391552fd002f2caed41939
Reviewed-on: https://pdfium-review.googlesource.com/2915
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Given a stream of data, we create a type1 font and fill up the required
dictionary entries according to PDF spec 1.7. Table 5.8 describes Type 1 font
dictionaries, and Table 5.19 describes font descriptors.
BUG=pdfium:667
Change-Id: I571b09fb533467d77ed0104e613726387aec1f87
Reviewed-on: https://pdfium-review.googlesource.com/2835
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
BUG=pdfium:667
Change-Id: I05e301385a7af4b6ce27dc0b885e23646abf3dd9
Reviewed-on: https://pdfium-review.googlesource.com/2711
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:661
Change-Id: Ie1dc82a1323a35ebbd63a5b7b8f8c95f9a5325fe
Reviewed-on: https://pdfium-review.googlesource.com/2613
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Added methods to create paths, set their colors, determine whether they will be
stroked and/or filled. FPDFPage_InsertObject should be used to add a path to a
page.
BUG=pdfium:661
Change-Id: I8fd17b33a09c5126e517bfd1a69a893216c160e8
Reviewed-on: https://pdfium-review.googlesource.com/2534
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|