Age | Commit message (Collapse) | Author |
|
Return encryption dictionary as const reference
from CPDF_Parser.
Create a copy in CPDF_Creator if needed.
Change-Id: I270f71d307d818fba7f65ebe379f5942ae816934
Reviewed-on: https://pdfium-review.googlesource.com/38390
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Change-Id: Ie997bfa5437d4222a381be3fc2b4334d6c8e2d5b
Reviewed-on: https://pdfium-review.googlesource.com/38190
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Fix a couple of post submit comments on the originally version of this
API.
BUG=pdfium:953
Change-Id: Id5b7480c5791821340366371b4ab861e78d47e8b
Reviewed-on: https://pdfium-review.googlesource.com/38150
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds an experimental callback to the form fill API that
allows PDFium to signal to the embedder that an attempt call save
occurred. The embedder is responsible for showing an appropriate
UI when this occurs. When PDF saving is implemented the API can
be removed.
BUG=pdfium:953
Change-Id: Iba30f4d0547fe773b793e499995be426626092a0
Reviewed-on: https://pdfium-review.googlesource.com/35870
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
To be used together with the existing FPDFFormObj_CountObjects()
function.
Change-Id: I8ed69624e967708c8db7e8f135e28fbe6a52752f
Reviewed-on: https://pdfium-review.googlesource.com/37890
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Change-Id: Ibf09905523ae2d80ce48bfe7337733d8dc718669
Reviewed-on: https://pdfium-review.googlesource.com/37850
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
- FPDFPageObjMark_RemoveParam()
Bug: pdfium:1037
Change-Id: I3ec25128795c36ba7f2f72a9d288a7855ecc3180
Reviewed-on: https://pdfium-review.googlesource.com/37770
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
- FPDFPageObj_RemoveMark()
Bug: pdfium:1037
Change-Id: I7ff320261d64e3ead45375ccc72301e7c64dd6e3
Reviewed-on: https://pdfium-review.googlesource.com/37710
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:1037
Change-Id: Ia2cd0d6ef99495dda3289988123489e3a2ad6e82
Reviewed-on: https://pdfium-review.googlesource.com/37750
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I2927ebdf0aff31193ad69dcd5542f3858ffdd6ee
Reviewed-on: https://pdfium-review.googlesource.com/37790
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
FPDF_ImportNPagesToOne() has width/height parameters to indicate the
dimensions of pages in the returned PDF. PDF is not a raster-based
format, so pixels are not the right unit for page dimensions.
Change-Id: Iff5b373a5a020b5822aaa29d2b44f1dbf7a75b13
Reviewed-on: https://pdfium-review.googlesource.com/37810
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:1037
Change-Id: Ifcb0a4330d077895c5f02395588150f29a5466aa
Reviewed-on: https://pdfium-review.googlesource.com/37731
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
The new functions are:
- FPDFPageObjMark_GetParamBlobValue
- FPDFPageObjMark_SetBlobParam
Bug: pdfium:1037
Change-Id: Ie04df04c64c6cf517a8cde182d7e9a38c3c78d1b
Reviewed-on: https://pdfium-review.googlesource.com/37570
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:1037
Change-Id: Iddc0d51874cf22d24ddf634ff767cd08807a4904
Reviewed-on: https://pdfium-review.googlesource.com/37630
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The functions:
- FPDFPageObjMark_GetParamValueTypeByKey()
- FPDFPageObjMark_GetParamIntValueByKey()
- FPDFPageObjMark_GetParamStringValueByKey()
are renamed, respectively, to:
- FPDFPageObjMark_GetParamValueType()
- FPDFPageObjMark_GetParamIntValue()
- FPDFPageObjMark_GetParamStringValue()
Bug: pdfium:1037
Change-Id: Iac9cc8c0a9ccaea101bbaaab9063cd2c755c9d47
Reviewed-on: https://pdfium-review.googlesource.com/37611
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The key getters are necessary to list the properties, but after getting
those keys, the *ByKey functions can be called. These functions are
therefore unnecessary.
In a follow-up CL, I will remove the "ByKey" suffix from the other
versions.
Bug: pdfium:1037
Change-Id: I02760025470a295971c4900fce1b6a8bbc7a5820
Reviewed-on: https://pdfium-review.googlesource.com/37590
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The marked content operators are BMC, BDC and EMC. In the case of
BDC, it is preceded by a direct dict or a property name.
Bug: pdfium:1118
Change-Id: I3ee736ff7be3e7d7dde55ef581af3444a325e887
Reviewed-on: https://pdfium-review.googlesource.com/37470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
One version is for a mark without a dictionary. The second is for
a mark with a direct dictionary. The third is for a mark with
indirect properties.
Bug: pdfium:1118
Change-Id: Ice0ff11d5ba4eaf2ccdf57be49b9140ba5c9b159
Reviewed-on: https://pdfium-review.googlesource.com/37550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
To find out the number of sub-objects a form object has, similar to how
FPDFPage_CountObjects() does it for page objects.
Change-Id: I7e5775dece42b74fd5b71b1d9622a1aa37bf64ac
Reviewed-on: https://pdfium-review.googlesource.com/37316
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
|
|
Bug: pdfium:1118
Change-Id: I2e9adaae64cba5b3915c19f3c99743cddbe58736
Reviewed-on: https://pdfium-review.googlesource.com/37371
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL creates the following new functions in the public API:
- FPDFPageObj_AddMark
- FPDFPageObjMark_SetIntParam
- FPDFPageObjMark_SetStringParam
Bug: pdfium:1037
Change-Id: Icabf3fdd8e8153b9156bab807a3708d38a9365d8
Reviewed-on: https://pdfium-review.googlesource.com/37330
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:1037
Change-Id: Ie887c0bbf3e543676adec6d8411b0b3254677d3c
Reviewed-on: https://pdfium-review.googlesource.com/37170
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This is called by many client to make sure CountItems() does not
crash. Moving the check to CountItems() makes HasRef() unnecessary.
Bug: pdfium:1037
Change-Id: I4f21f33a88c9aad54f0dae18a38b370c6ceaec80
Reviewed-on: https://pdfium-review.googlesource.com/37133
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This allows deciding if FPDFPageObj_GetFillColor() or
FPDFPageObj_GetStrokeColor() should be used to get the effective color
of a text object.
Change-Id: Ic6e99a9eb8512b164756da8b5fcd8cd7771271ae
Reviewed-on: https://pdfium-review.googlesource.com/36750
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This enables more complicated cleanup when an observed object
is destroyed. Use it to make documents observable and to allow
the CPDF_Avail to cleanup without the need for intermediate class.
Change-Id: I3a8e758b7ff542e0a58710eff1ac8017205cbd45
Reviewed-on: https://pdfium-review.googlesource.com/36373
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit 35ab1bd0328a244cc2f6dcde2822c8117738b01d.
Reason for revert: Causing crashes and bad flattening.
BUG=chromium:858921,chromium:858952
Original change's description:
> Simplify CPDF_PageOrganizer::UpdateReference method.
>
> Change-Id: I52fe66472bdc2a61d7074f77627a3ee1d5646255
> Reviewed-on: https://pdfium-review.googlesource.com/35611
> Reviewed-by: dsinclair <dsinclair@chromium.org>
> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
TBR=dsinclair@chromium.org,art-snake@yandex-team.ru
Change-Id: I9a3635140867793e7109c15b64d66ec1d1a8b1f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/36550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
CPDFTextObjectFromFPDFPageObject() will take the FPDF_PAGEOBJECT and
performs the same check anyway.
Change-Id: I6535ab749d5a3222c6f2e6fba648f7ee515d3ddc
Reviewed-on: https://pdfium-review.googlesource.com/36372
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I52fe66472bdc2a61d7074f77627a3ee1d5646255
Reviewed-on: https://pdfium-review.googlesource.com/35611
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
Improve CPDF_Document interface.
Fix relationship between CPDF_Document and CPDF_Parser.
This CL changes CPDF_Document to internally create the CPDF_Parser
and removes the need for the CPDF_Parser to know about the CPDF_Document.
Change-Id: Iec7aef19575c90f30b9a6c919dfd4f4417e4caf2
Reviewed-on: https://pdfium-review.googlesource.com/35630
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Ideally, unowned ptrs might well be const, as updating something
through an unowned reference is best avoided.
Change-Id: Ida8111ffe0ee1e30bbf6b7718b0929dfb5cafdff
Reviewed-on: https://pdfium-review.googlesource.com/36050
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
In turn, this requires making some of the tests use an indirect
root dictionary so as to satisfy the lifetime requirements.
Change-Id: Ibdbe294a76200d4486134e5848c169a6c2d802bf
Reviewed-on: https://pdfium-review.googlesource.com/36110
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
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>
|
|
Cleanup CL to address some comments on
https://pdfium-review.googlesource.com/c/pdfium/+/35730 that appeared
after I sent it to the CQ.
Change-Id: I7d5539101547a79d6fc3edf45720b60a1112e2e5
Reviewed-on: https://pdfium-review.googlesource.com/35951
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Getters should nearly always be const when they return a
non-const pointer to an unowned object. Saves a bit of
code along the way.
Grep for similar occurrences and add "const".
Change-Id: I492bf962a7d62452fa40310146226dc0c8ebb753
Reviewed-on: https://pdfium-review.googlesource.com/35890
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Move receiving "Info" dictionary form API implementation to CPDF_Document.
Also added test.
Bug: pdfium:664
Change-Id: I273980750fbdd4d20711f651245780fc9ba02789
Reviewed-on: https://pdfium-review.googlesource.com/35490
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Define constant values in the public API for the valid values of alert
button type, alert icon type, and beep type. Replace various magic
numbers through out the code base using these values. Also replace the
XFA specific versions with an enum class that is guaranteed to have the
same values, instead of #defines that just happen to.
This CL does not attempt to add error checking on these values, since
it currently doesn't exist so adding it may cause regressions.
Change-Id: Ief3aee2a4ad419691c18fc1dba8b984ad222141b
Reviewed-on: https://pdfium-review.googlesource.com/35730
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:1051
Change-Id: Ia990a47eeceb47fd2b15fe4ea7226861507484db
Reviewed-on: https://pdfium-review.googlesource.com/35115
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
It is hard to tell if there is some unsavory stuff going on with
references otherwise. Avoids some const_casts in the process.
Add some UnownedPtrs along the way to check caller's storage duration.
Change-Id: Ic8d85802083f0b27e07993ea25f8f1c15fca1712
Reviewed-on: https://pdfium-review.googlesource.com/35750
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
XFA has its own method for generating alerts in the embedder,
CPDFSDK_FormFillEnvironment::Alert, which is a slight variation of the
non-XFA CPDFSDK_FormFillEnvironment::JS_appAlert. Converting the two
instances of calls to the XFA only method to use the non-XFA method
and removing the XFA only method.
Change-Id: I60ea92b2ae69ea96ce4c216ef6d9029d79580b05
Reviewed-on: https://pdfium-review.googlesource.com/35690
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: 853238
Change-Id: I133be340fd877e9acd2733845d454924dc86d295
Reviewed-on: https://pdfium-review.googlesource.com/35711
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Many of these are converting ByteString => c_str => ByteStringView, since
the ByteStringView ctor is implicit. This is unfortunate, since that
involves a strlen() which the ByteString already knows if we use
AsStringView() instead.
This changed one test result where we can now return the string
"\0" instead of "" -- since strlen no longer eats the NUL. This
seems consistent, say, with String.fromCharCode().
Change-Id: I17f68d1a1f4b352960208f9148e68ab4c4d78bd2
Reviewed-on: https://pdfium-review.googlesource.com/35590
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
c_str() is a bit of a code smell, esp. since Byte/Wide strings
know how to do this all by themselves.
Change-Id: I9c86cee42c12a3f72ddb1d410a91cf25647d0ce6
Reviewed-on: https://pdfium-review.googlesource.com/35530
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Remove some string copies in barcode that were noticed whilst
looking for moves.
Change-Id: Ieda34d00f633576ba1f0dca283dcdabfb36f236c
Reviewed-on: https://pdfium-review.googlesource.com/35410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@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>
|
|
Loop through the dirty page objects and streams and regenerate all
streams that are dirty.
Bug: pdfium:1051
Change-Id: I837b5a7cd9542b7777e7c7ae7ac9cc75f69f30b5
Reviewed-on: https://pdfium-review.googlesource.com/34330
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
cpdfsdk_annot.cpp:315 and cpdfsdk_annot.cpp:338 are nearly identical,
except that the #ifdef XFA code passed along the correct type from
the argument. Prefer this behaviour even when non-XFA.
Change-Id: Id4d5fbcc773ffd10746c4ddc77a571e818e5a957
Reviewed-on: https://pdfium-review.googlesource.com/35030
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@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>
|
|
The polymorphic IPDF_Page::GetDocument() allows getting the document
without special cases. The subsequent retrieval of the page view
via the helper function is equivalent to the inline code in the other
branch of the ifdef.
Change-Id: I8c7008c18610e11e7dcc4151fa7369cfc3625049
Reviewed-on: https://pdfium-review.googlesource.com/35070
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
So remove it and combine the XFA/non-XFA cases.
Change-Id: I13d718de13ec31bf4f5c045164ea5791bf22f92d
Reviewed-on: https://pdfium-review.googlesource.com/35050
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This is an anti-pattern when XFA can be configured at runtime.
Make it easier to find some more remaining cases.
Change-Id: I1ee8d95b2fd52be5e37ef4e859e3e9179ea25975
Reviewed-on: https://pdfium-review.googlesource.com/34990
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|