Comments (6)
If I understand correctly you want to specify the current page orientation, right?
Never tried it yet but it should be feasible.
First you gotta identify the attribute(s) and value(s) that change in the SLA when switching layout. For this I'd recommend saving one empty SLA file with portrait layout, then switching its layout, saving under another name and using any open source 'text diff' tool to identify the differences between the 2 files. I guess at least the page width and height will have changed, and maybe some other attribute as well.
Second you should create data columns for these values and attributes in you data set, eg one column 'page-height', 'page-width', and any other required (text or number) value/attribute.
Lastly create one SG dynamic attribute in your SG template (see readme 'advanced' section or video tutorial) for each of these changing values.
Finding out the exact syntax for the XPATH selector of the dynamic attribute can be a bit tricky but it 'simply' boils down to the list of parents elements in the XML tree of the SLA file. One way to see this tree more explicitly is to rename one of your empty layout test SLA file with an '.xml' extension and open it in a web browser (Firefox, chrome,...): they usually show xml files as collapsible trees. Look for a quick introduction to the XPATH selector syntax may help (you may have seen something close in advanced CSS syntax, that is based on XPATH).
Good luck. Kindly let me know how this works for you. If it's too technical let me know or ask again here, and I (or someone else) might be able to help.
Greetings.
B.
from scribusgenerator.
I created one landscape file and a copy of it changing orientation to portrait. I find the following changes using diffchecker showing changes in portrait as compared to the landscape file:
- PAGEWIDTH,PAGEHEIGHT properties are exchanged inside <DOCUMENT
- ORIENTATION="1" changed to ORIENTATION="0" inside <DOCUMENT
- Size="" changed to Size="Custom" Inside the <PAGE
- All ItemID properties inside each <PAGEOBJECT changed to new value
How should i create the SGAttributes. I need to give the orientation through csv file. but what about other parameters which change when the orientation changes. should i specify the pagewidth and pageheight through csv.
from scribusgenerator.
I added an SGAttribute named ORIENTATION with value %VAR_orientation% and provided a column inside the csv input with values as 0 and 1 on alternative rows. But I find that all the generated sla files are still in the landscape orientation.
from scribusgenerator.
i find that the orientation and pagewidth,pageheight changes in the attributes of the resulting file while passing it through the csv input file, but visually there is no difference!!
from scribusgenerator.
Just a thought - but I suspect the values that changed are needed together to inform other things - the dimensions of a page are essentially irrelevant without an orientation, certainly to a printer etc.
I.e. the shape is not an indication of it's orientation, except by convention or prior knowledge.
A bit like the marker on a map to inform you of which direction is North, the map itself tells you nothing unless you know already this - hence the symbol for North. 😃
from scribusgenerator.
Related Issues (20)
- No module named 'Tkinter' -- solved HOT 4
- Link vector/SVG files with Generator HOT 5
- csv import keep text with text styles, bold, list, em, ... HOT 1
- No module named 'scribus'
- Cannot Fetch image from folder HOT 2
- Fetching an image into an image frame in Scribus and export it as a new layer in the generated the PDF file. HOT 3
- [TYPO] in README.md HOT 1
- add support for inline images - add images dynamicaly into a text frame HOT 4
- Clarifications on how `%SG_NEXT-RECORD%` works... HOT 5
- Scribus Generator not working HOT 2
- Colorize Image Effect changes the colour in generated document HOT 1
- --single overlapps pages
- Help wanted. Add Danish and German æ, ø, å and ä, ö HOT 2
- ModuleNotFoundError: No module named 'Tkinter' HOT 6
- Cannot specify %VAR_logo% using Scribus1.5.8 HOT 1
- s HOT 1
- Is it possible to print %VAR_COUNT%, also noted the duplication of a last entry in .csv HOT 1
- Variable substitution not working when hyphenation is active on text frame HOT 3
- Last row duplicates to fill the remaining placeholders in the template when using SG_NEXT-RECORD HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scribusgenerator.