r15087 by jghali - #9090: PDF bookmark on non printable layer results in bad PDF output

scribus-commit scribus-commit at lists.scribus.net
Wed May 19 22:50:51 CEST 2010


Revision: 15087
Author: jghali
Date: 2010-05-19T20:46:31.027756Z
Commit message: #9090: PDF bookmark on non printable layer results in bad PDF output

Changeset: 
M  /trunk/Scribus/scribus/pdflib_core.cpp

Diffs:
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp	(revision 15086)
+++ scribus/pdflib_core.cpp	(revision 15087)
@@ -9774,7 +9774,16 @@
 			if (ip->childCount())
 				Inhal += "/Count -"+QString::number(ip->childCount())+"\n";
 			if ((ip->PageObject->OwnPage != -1) && PageTree.Kids.contains(ip->PageObject->OwnPage))
-				Inhal += "/Dest ["+QString::number(PageTree.Kids[ip->PageObject->OwnPage])+" 0 R "+ip->Action+"\n";
+			{
+				QString action = ip->Action;
+				if (action.isEmpty())
+				{
+					const Page* page = doc.DocPages.at(ip->PageObject->OwnPage);
+					double actionPos = page->height() - (ip->PageObject->yPos() - page->yOffset());
+					action = QString("/XYZ 0 %1 0").arg(actionPos);
+				}
+				Inhal += "/Dest ["+QString::number(PageTree.Kids[ip->PageObject->OwnPage])+" 0 R "+action+"\n";
+			}
 			Inhal += ">>\nendobj\n";
 			Inha[ip->ItemNr] = Inhal;
 			++it;




More information about the scribus-commit mailing list