Age | Commit message (Collapse) | Author |
|
This adds a public function that loads a PDF as a VectorGraphicData
which essentially spilts the ImportPDF to general import as a
VectorGraphicData and then creation of a new Graphic. This is
needed so we can just load the VectorGraphicData independent to
a Graphic itself, so we don't needlessly create a new Graphic
instance in some cases.
Change-Id: Ib5f570242da69a1537bfdf1054f8eb40ecead31b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107991
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Commit d75c5b38911557173c54a78f42ff220ab3918573 (tdf#136836 emfio: speed
up import of EMF import when the orig PDF is available, 2020-09-17)
improved both performance and correctness of the EMF import, in case it
had a PDF fallback.
It turns out that PDF fallback can be nominally non-transparent, and
still the EMF equivalent supports transparency.
Fix the problem by enabling transparency in the PDF-in-EMF case.
Change-Id: I4d1585a5db6f28bd9c9cb380b5f193f4d5edcc8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104849
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
This implements custom annotation marker, which overrides the
default marker drawing of comments in Draw/Impress. The
polygon is transported from the import of PDF to SdPdfFilter,
then the sd::Annotation is set-up, by settuing up the new class
CustomAnnotationMarker.
CustomAnnotationMarker also supports setting of the line color,
line width and fill color.
The OverlayPolyPolygon is the new class that is responsible for
the marker overlay, mainly to create the Primitive2D of the
marker, that will be shown on the screen.
This only implements Polygon PDF annotation sub-type.
Change-Id: Ic663c31c5b3db5c13179dde63c1a0b81159f4b80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104365
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
The bugdoc has a shape, its bitmap fill is an EMF, which is actually a
PDF. The PDF is has a height of 5cm, but the shape has a height of 14
cm.
Inform vcl::RenderPDFBitmaps() about the size of the shape, so the
result won't be blurry. This approach makes sure that we don't
unconditionally render at higher resolution, i.e. the "load a PDF of 100
pages into Online" use-case won't use more memory than before.
API CHANGE, because the EMF reader is only available via UNO, though
it's likely that no actual external code would ever invoke it directly.
Change-Id: If1d8def0136d408a31a0cc54777a7f26430a0ff3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102996
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Ib804f497a6c8f609e4899f9ebcef4c1096f44ce0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102090
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: Ic7ad2e044cc1807b105bcad2daf978224b96f298
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100956
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
PDF annotations have the modification date and time accessible in
the PDF specific format. With PDFium we read the annotation date
and time and convert that to css::utils::DateTime (by converting
to ISO8601 compatible string first).
Add support for modification date and tme for annotations into
ImportPDFUnloaded and when the annotations are inserted into the
document as comments (in Draw document).
Change-Id: I24aacde84b7530365d67ed335b1eefbaee706eca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96759
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I3e072f011089864f3349a470a32412cc33bcc022
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96758
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
ImportPDFUnloaded returned graphics as a vector of std::pair with
Graphic and Size. Instead, use a new struct PDFGraphicResult, so
it can be extended in the future.
Change-Id: Idda00a3b98a8efcbd9b8c8d0ee3982becfdc1d7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96755
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
When loading the pages of PDF, the size of the document was
set to the wrong value. Size returned by ImportPDFUnloaded was
in pixels, which is not really useful considering the svx and
sd core uses 100th mm as the unit and converting it to a device
dependent pixel will just bring grief. Also we don't need to know
the size in pixels until we actually render.
This change removes DPI as the parameter to the ImportPDFUnloaded
and changes the code to get the size of the page from the PDF as
points and converts that to 100th mm.
Change-Id: I0c0db23d2775e2897ba7621ef6320a974c0b9275
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91330
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
In principle, the current Svg/Emf/Wmf and PDF handling is trying to
achieve the same thing: Keep the original stream untouched, provide a
replacement graphics, and a kind of rendering.
To hold the data, the Svg/Emf/Wmf and PDF were using different structures
though. This commit consolidatates that, and makes the Insert
-> Image... (for PDF) actually using the VectorGraphicData to hold the
original stream.
This breaks loading the PDF as a document via PDFium - I'll fix it in
the next commit(s).
Change-Id: Iac102f32b757390a03438c165e430283851cc10b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90561
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
... in the function declaration. Const-qualification of these parameters
only has an effect in function definitions.
Change-Id: I50a7c523ef785508bb51d0763c1367450e6e3a14
Reviewed-on: https://gerrit.libreoffice.org/79475
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
This fixes the destruction of the static cache of the PDF data; without
this, there were already missing uno runtime info.
(cherry picked from commit 20055ebe1b27f716a2acf1f0f4dda2864ae811bf)
Change-Id: I877c9ccf96c4b7eabf3d643e17f324d86d987f94
Reviewed-on: https://gerrit.libreoffice.org/77691
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
Reviewed-on: https://gerrit.libreoffice.org/56268
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit e07561d2ae743b208a0807ef32d7f011614b73e5)
Change-Id: I5e4a16ff38b9643127ce16879b35f456c13bcff8
Reviewed-on: https://gerrit.libreoffice.org/77688
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
Otherwise the swap out / swap in creates new copy of the underlying PDF
stream.
Change-Id: I88a16a69143783a998201e183bea1a9553e337bd
Reviewed-on: https://gerrit.libreoffice.org/56266
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/69626
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 826208d2da6c92e94b38ef447e47550285742755)
Reviewed-on: https://gerrit.libreoffice.org/77687
Tested-by: Jenkins
|
|
Different parameter name in declaration and definition, repeating type
name inside the very same line when initializing from a cast, and so on.
Change-Id: I52dc29ed845fb1a780dfab586bfd67db0d4a9e54
Reviewed-on: https://gerrit.libreoffice.org/57370
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I58f2fd973a731b148f40b37139cd74bac097a7d2
|
|
Also allow for rendering PDFs to images at custom
resolution, instead of hard-coded (old hard-coded
value of 96 dpi is now default arguments).
Change-Id: Ia5b52f72d6ce7130a2debc7c6f86504aa041bdc8
Reviewed-on: https://gerrit.libreoffice.org/54786
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
|
|
Change-Id: I81225e228d9cf2b9849110715dbfdeb59f2805dd
Reviewed-on: https://gerrit.libreoffice.org/54746
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
|
|
LOK now opens PDFs as images using Pdfium,
which has a superior accuracy and support
to poppler, the default pdf reader.
Change-Id: Ifbbecf7f048f001836fb98886705cba47e6bed4e
|