View Issue Details

IDProjectCategoryView StatusLast Update
0016934ScribusImport / Exportpublic2023-05-07 14:42
Reportercyr06 Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Summary0016934: When using script to open PDF file, no possibility to pass option to avoid dialog box before importing
DescriptionI use scripts to process pdf files. Everything works fine. Great job !
The only issue is that when I do a scribus.openDoc(pdfFile) the import dialog box is showing up. So I need to press enter each time which is a problem when I process hundreds of PDF :)
Is there a way to pass options - like scribus.openDoc(pdfFile, all pages, vector) or anything else?
I don't find any information on importing a PDF (export is more detailed)
Thank you !!
Steps To ReproduceMake a script like that
import scribus
import os

file = scribus.fileDialog('Select filename to get the folder path')
basePath = os.path.dirname(file)

for filename in os.scandir(basePath):
    if filename.is_file():
        scribus.openDoc(filename.path)
...

Choose a PDF in a folder containing several PDF.
then the dialog box shows up asking for importing All pages, pages ... and sone other questions
TagsNo tags attached.
PatchNo

Relationships

related to 0016928 new scripter: placeVectorFile is missing several arguments and shows the "importing file" dialog 

Activities

ale

2023-04-26 11:23

manager   ~0050138

i'm working on it in 0016928 .

i'm slowly figuring out

- how to simplify and
- refactor

PdfPlug::convert() and allow the separation of the dialogs from the actual action.

if you know c++ and want to help i welcome contributions : - )

cyr06

2023-04-26 11:47

reporter   ~0050139

I'm sorry but I'm not fluent in c++. But if you tell me where to look I can make some tries
Thank you for your work
For now I made a Mac OS app (with automator) that press enter burn !! :)

cyr06

2023-04-26 11:50

reporter   ~0050140

burn = beurk (= yuck in French)

ale

2023-04-26 18:30

manager   ~0050141

well, for refactoring the function i don't think that wizard skills in c++ are needed... but i guess that one needs to have some sort of firm grasp of it...
and i fear that that's a bit far from what automator is about.

the easy part (creating the the scripter command) is already over : - )

i hope to find some time during the next few weeks and to slowly take apart that 500 lines "monster" (that's a beurk!)

stay tuned

cyr06

2023-05-05 14:53

reporter   ~0050152

Hi Ale
hope you're fine !
I think I have a serious bug while opening some PDF and maybe the answer is in the "monster" you told me about.
In the pdf "test.pdf", there is a text. This file was generated with TCPDF lib (6.6.2). Something like
$pdf->Text(4* $ratio + $fp, 146* $ratio + $fp, "Where is this text?");
When I open this file with a pdf viewer, the text is ok.
But when I use scribus, the text is gone!
Am I missing something or is it a known bug ?
Thank you !!
Cyril
test.pdf (6,719 bytes)

ale

2023-05-06 20:24

manager   ~0050154

i can import the file correctly....
here-it-is.png (2,288 bytes)   
here-it-is.png (2,288 bytes)   

cyr06

2023-05-07 08:09

reporter   ~0050155

So I definitely miss something :)
I'm using Scribus 1.5.8 on a Mac with Big Sur. Maybe I need to make a new bug report on this specific problem.
Thank you

ale

2023-05-07 13:31

manager   ~0050156

you're version is one year old so, indeed, the issue might have been resolved in-between...

cyr06

2023-05-07 14:42

reporter   ~0050157

you're totally right, sorry for that. 1.5.9.svn version opens it as it is.
Thank you again !!

Issue History

Date Modified Username Field Change
2023-04-25 22:07 cyr06 New Issue
2023-04-26 07:20 jghali Project Contributor Builds => Scribus
2023-04-26 07:20 jghali Category General => Import / Export
2023-04-26 11:22 ale Relationship added related to 0016928
2023-04-26 11:23 ale Note Added: 0050138
2023-04-26 11:47 cyr06 Note Added: 0050139
2023-04-26 11:50 cyr06 Note Added: 0050140
2023-04-26 18:30 ale Note Added: 0050141
2023-05-05 14:53 cyr06 Note Added: 0050152
2023-05-05 14:53 cyr06 File Added: test.pdf
2023-05-06 20:24 ale Note Added: 0050154
2023-05-06 20:24 ale File Added: here-it-is.png
2023-05-07 08:09 cyr06 Note Added: 0050155
2023-05-07 08:09 cyr06 File Added: Capture d’écran 2023-05-07 à 10.06.38.png
2023-05-07 13:31 ale Note Added: 0050156
2023-05-07 14:42 cyr06 Note Added: 0050157