Paul McNett wrote: > Carl Karsten wrote: > >> Got some questions: >> >> 1. Is this correct: we can add attributes and the designer won't strip them >> out, like <test> >> >> <Image> >> <Comment>"more foo"</Comment> >> <expr>"./icons/vendor_blue.png"</expr> >> <Height>25</Height> >> <Show>self.Record["vendor"]</Show> >> <test>foo</test> >> > > > Correct. > >> 2. Is what I have in <Show> above the syntax for turning on/off an image? >> it is a bool: <TestCursor> <record vendor="False" > > > Yes. > > > >> 3. In the designer, I can select multiple objects. is there a way to move >> them >> around as a group? either by dragging, or opening the Command window and >> ... >> um... doing some sort of x=x+100 operation. > > > You can select multiple objects, and then use the keyboard arrow keys to > nudge them around. Ctrl+Arrow moves them by 10 points at a time.
oh damm, why didn't I think of that! > > >> 4. anyone have any code scraps that open the rfxml and chunk things around? >> like I want to make a 2nd copy of what will be printed on the badge (so that >> we >> can fold it in half and have the same things on both sides.) I think this >> could >> be done by doing 2 columns, but we may want stuff across the bottom that >> spans >> both sides. which could be done with page headers. but in the event that I >> want to do something that can't be done otherwise... > > > I'd get your badge the way you want it, and then put the second copy in > via copy/paste of the group of objects. > > >> 4a. copy a sub set of objects to a new rfxml. I have a full 8x11 page >> layout, I >> want to make a 2nd rfxml that is just the objects in the upper 4x3" corner, >> and >> set the page size to 4x3. > > > Should work. Select group of objects, copy. File|New, click on band to > paste into, paste. that would be great if I really thought "the way you want it" would happen first. but I predict changes made after the forks, so I want to be able to run some code that will create the derivatives. > > >> 5. when I resize the detail line smaller, it pushes all the objects off the >> top >> of the page. Is there some way to keep them relative to the top of the page? > > > This is because the y value is relative to the bottom of the band, not > the top like we are used to in VFP. I don't have a simple way to tell > you how to reverse that. > At least I know how to move everything down first. It would be nice if "Select All" would select all :) It is easy enough to Shift-Click in the object browser, so no biggie. > >> 6. Watermark - I want "SAMPLE" somehow displayed in big overlapping letters >> that >> are transparent/translucent/whatever. maybe diagonal. > > > Put it in the PageForeground band (or PageBackground if you want it > behind the badge). > > >> 7. barcodes. anyone done anything? I just want to encode an ID that can be >> read by http://jocr.sourceforge.net A free pdf417 would be nifty too. > > > Haven't looked into this, but assuming you have a truetype barcode font > on the system, and you set the object to that font, it should "just work". > > >> 8. create an image instead of a pdf. just double checking that this "can't >> be >> done" - report-lab list: "The graphics subframework can create charts and >> diagrams (but not whole pages with paragraphs and tables)" > > > There are third-party utilities to do this, but AFAIK we can't do it > directly yet. I'd like this too, BTW. After searching high and low for a more elegant solution: https://pycon.coderanger.net/browser/django/trunk/pycon/badges/views.py#L91 system('convert %s %s' % (pdfname, imgname)) ewww. > > >> 9. what is the right way to "install a font"? currently I have this in my >> code: >> >> pdfmetrics.registerFont(TTFont("FreeSans", >> "/usr/share/fonts/truetype/freefont/FreeSans.ttf")) >> rw = dReportWriter(OutputFile=buffer, ReportFormFile=xmlfile, >> Cursor=[ds]) >> >> Do I need to do that every time? > > > You don't need to do that every time you run the report, just the first > time after reportlab is first imported. Any idea what kind of resources get used? I am hoping it just stores the 2 strings in a list, and doesn't load the 500k file until it is used. I am thinking it will be better to only register it when I know it is going to be used (so right before the dReportWriter() call) even it it makes that process a bit longer. > > >> Do I need the full path, or is there some search path that will be searched? > > > You need the full path. yuck. http://www.reportlab.org/rsrc/userguide.pdf I just read over "Chapter 3 Fonts and encodings" p 44, and now my head is spinning. It sounds like a directories can be registered: "Unfortunately, there is no reliable standard yet for such locations (not even on the same platform) and, hence, you might have to edit the file reportlab/rl_config.py to modify the value of the T1SearchPath identifier to contain additional directories." But I can't quite follow it. I only need this to run on one box, so a hard coded path is fine for now. Carl K _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]
