diff --git a/korektury/models.py b/korektury/models.py
index 88c1a5e6..37213172 100644
--- a/korektury/models.py
+++ b/korektury/models.py
@@ -103,7 +103,7 @@ class KorekturovanePDF(models.Model):
# Změnil se počet stran, ukládáme
super(KorekturovanePDF, self).save()
- def save(self):
+ def save(self, **kwargs):
# Pokud se nezmenilo PDF, tak nepregenerovavej nahledy
try:
original = KorekturovanePDF.objects.get(pk=self.pk)
@@ -113,7 +113,7 @@ class KorekturovanePDF(models.Model):
except ObjectDoesNotExist:
pass
# uložíme nahrávané pdf
- super(KorekturovanePDF, self).save()
+ super(KorekturovanePDF, self).save(kwargs)
# uložíme png a změněný počet stran
self.convert()
diff --git a/korektury/testpdfs/A.pdf b/korektury/testpdfs/A.pdf
new file mode 100644
index 00000000..083bac6a
Binary files /dev/null and b/korektury/testpdfs/A.pdf differ
diff --git a/korektury/testpdfs/B.pdf b/korektury/testpdfs/B.pdf
new file mode 100644
index 00000000..c0d61df6
--- /dev/null
+++ b/korektury/testpdfs/B.pdf
@@ -0,0 +1,5125 @@
+%PDF-1.5
+%
+5 0 obj
+<>
+stream
+
+
+
+
+ image/jpeg
+
+
+ Tisk
+
+
+ 2014-02-10T11:27:01+01:00
+ 2014-02-10T10:27:07Z
+ 2014-02-10T11:27:01+01:00
+ Adobe Illustrator CC (Windows)
+
+
+
+ 256
+ 116
+ JPEG
+ /9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAASAAAAAEA
AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK
DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f
Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgAdAEAAwER
AAIRAQMRAf/EAaIAAAAHAQEBAQEAAA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obVJCKFhDGIw1KmleOKo7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FX
Yq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXY
q7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq
7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7
FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FX//2Q==
+
+
+
+ xmp.iid:25c354aa-a49c-cc4e-acca-855cba8252a4
+ xmp.did:25c354aa-a49c-cc4e-acca-855cba8252a4
+ uuid:5D20892493BFDB11914A8590D31508C8
+ proof:pdf
+
+ xmp.iid:8e6b66c4-a348-994c-aeef-f975a7d6fb7a
+ xmp.did:8e6b66c4-a348-994c-aeef-f975a7d6fb7a
+ uuid:5D20892493BFDB11914A8590D31508C8
+ proof:pdf
+
+
+
+
+ saved
+ xmp.iid:3e87526c-5553-9b49-a487-443853d93c29
+ 2014-02-10T11:18:18+01:00
+ Adobe Illustrator CC (Windows)
+ /
+
+
+ saved
+ xmp.iid:25c354aa-a49c-cc4e-acca-855cba8252a4
+ 2014-02-10T11:27:01+01:00
+ Adobe Illustrator CC (Windows)
+ /
+
+
+
+
+
+
+ EmbedByReference
+
+ Z:\WWW\Gymnazium Jirovcova\Logo\Logo gymji 2.jpg
+ xmp.did:d90990ba-a891-594f-b74d-a6e8c24a3ba4
+ xmp.iid:9b17acee-8902-0f49-8f1a-d8965e1ffb40
+
+
+
+
+
+
+
+ Z:\WWW\Gymnazium Jirovcova\Logo\Logo gymji 2.jpg
+ xmp.did:d90990ba-a891-594f-b74d-a6e8c24a3ba4
+ xmp.iid:9b17acee-8902-0f49-8f1a-d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