ExtendScript: Get all text from a document
Hi all.
I have the following task: I need to translate a document into another language using ExtendScript. So, as "input" I have a document with a text/graphics/tables/etc. in Language_1 and a "somehow-separated file", which will contain data about translation into the Language_2. E.g.:
Some_text_in_language_1 Some_text_in_language_2
Some_other_text_in_language_1 Some_other_text_in_language_2
To get the source text from the document, I've tried to use this:
var pgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
while(pgf.ObjectValid()){
var test = pgf.GetText(Constants.FTI_String);
var text, str;
text = "";
for (var i=0; i < test.len ; i +=1)
var str=test[i] .sdata.replace(/^\s+|\s+$/g, '') ;
text = text + str;
PrintTextItem (test[i]);
pgf = pgf.NextPgfInFlow;
But with this, I can only access the regular text in the document (e.g. the text in tables remains untougched). Is there any way I can the all textual data from specified document? Or maybe, the full list of controls, which can contain it, to iterate throught them and extract it one-by-one? Or maybe there's a better way to solve this problem?
Thanks in advance! Any advice would be greatly appreciated.
There is another way to loop through ALL paragraphs in a document, regardless whether they are in a table or in the main text flow. You can use the FirstPgfInDoc property of the document and loop through all Pgf objects using the NextPgfInDoc property of the Pgf until you reach an invalid object. Note that this also includes all paragraphs in the master and reference pages, so it might be useful to check where the Pgf is located (on a body page or not). There is a script on this forum that does that - I believe it was created and posted by Rick Quatro.
Working your way through the main text flow does not guarantee that you have all the visible text in the doc. There may be multiple flows and there may also be text frames that are placed inside anchored frames. Those text frames are not contained directly in the main flow of the document.
Good luck with your scripting
Jang
Similar Messages
-
IPhone 5 not getting all texts from Galaxy S6
My girlfriend is having a problem not getting all of my texts. As far as we know, it is only happening to texts from my phone. They are showing as sent on the Galaxy S6, but do not show up, ever, on her iPhone 5. The missing messages are random.
Hi there
I’m sorry to hear that there have been some issues with receiving texts. I’d be happy to look into this for you! Can you please send me a private message by Clicking Here and include the following information?
Full name
Cell number
Recipient’s number
Best time to call
Thanks,
Charise
-
My daughter recently broke her iphone 4. We had a spare so we exchanged SIM card. Now that we are linked in the cloud, I am getting all of her text messages and when I text her i get a text from my number. What should i try next?
stop using the same Apple ID for iMessage on both phones
-
How ias integrate with Snacktory for getting main text from an html page
Hi All,
i am new to endeca and ias, i have an requirement, need to get main text from whole html page before ias save text to Endeca_Document_Text property,
as ias save all text in page to endeca_document_text property, it is not ok for reading when show in web page, i use an third party API to filter out the main text from original page,
now i want to save these text to endeca_document_text property,
an another question,
i get zero page when doing the logic of filtering main text from original html text in ParseFilter( HTMLMetatagFilter implements ParseFilter) using Snacktory.
if only do little things, it will work fine, if do more thing, clawer fail to crawl page. any one know how to fix it.
log for clawler.
Successfully set recordstore configuration.
INFO 2013-09-03 00:56:42,743 0 com.endeca.eidi.web.Main [main] Reading seed URLs from: /home/oracle/oracle/endeca/IAS/3.0.0/sample/myfirstcrawl/conf/endeca.lst
INFO 2013-09-03 00:56:42,744 1 com.endeca.eidi.web.Main [main] Seed URLs: [http://www.liferay.com/community/forums/-/message_boards/category/]
INFO 2013-09-03 00:56:43,497 754 com.endeca.eidi.web.db.CrawlDbFactory [main] Initialized crawldb: com.endeca.eidi.web.db.BufferedDerbyCrawlDb
INFO 2013-09-03 00:56:43,498 755 com.endeca.eidi.web.Crawler [main] Using executor settings: numThreads = 100, maxThreadsPerHost=1
INFO 2013-09-03 00:56:44,163 1420 com.endeca.eidi.web.Crawler [main] Fetching seed URLs.
INFO 2013-09-03 00:56:46,519 3776 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-1] come into EndecaHtmlParser getParse
INFO 2013-09-03 00:56:46,519 3776 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-1] come into HTMLMetatagFilter
INFO 2013-09-03 00:56:46,519 3776 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-1] meta tag viewport ==minimum-scale=1.0, width=device-width
INFO 2013-09-03 00:56:52,889 10146 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-1] come into EndecaHtmlParser getParse
INFO 2013-09-03 00:56:52,889 10146 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-1] come into HTMLMetatagFilter
INFO 2013-09-03 00:56:52,890 10147 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-1] meta tag viewport ==minimum-scale=1.0, width=device-width
INFO 2013-09-03 00:56:59,184 16441 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-2] come into EndecaHtmlParser getParse
INFO 2013-09-03 00:56:59,185 16442 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-2] come into HTMLMetatagFilter
INFO 2013-09-03 00:56:59,185 16442 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-2] meta tag viewport ==minimum-scale=1.0, width=device-width
INFO 2013-09-03 00:57:07,057 24314 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-2] come into EndecaHtmlParser getParse
INFO 2013-09-03 00:57:07,057 24314 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-2] come into HTMLMetatagFilter
INFO 2013-09-03 00:57:07,057 24314 com.endeca.eidi.web.parse.HTMLMetatagFilter [pool-1-thread-2] meta tag viewport ==minimum-scale=1.0, width=device-width
INFO 2013-09-03 00:57:07,058 24315 com.endeca.eidi.web.Crawler [main] Seeds complete.
INFO 2013-09-03 00:57:07,090 24347 com.endeca.eidi.web.Crawler [main] Starting crawler shut down
INFO 2013-09-03 00:57:07,095 24352 com.endeca.eidi.web.Crawler [main] Waiting for running threads to complete
INFO 2013-09-03 00:57:07,095 24352 com.endeca.eidi.web.Crawler [main] Progress: Level: Cumulative crawl summary (level)
INFO 2013-09-03 00:57:07,095 24352 com.endeca.eidi.web.Crawler [main] host-summary: www.liferay.com to depth 1
host depth completed total blocks
www.liferay.com 0 0 1 1
www.liferay.com 1 0 0 0
www.liferay.com all 0 1 1
INFO 2013-09-03 00:57:07,096 24353 com.endeca.eidi.web.Crawler [main] host-summary: total crawled: 0 completed. 1 total.
INFO 2013-09-03 00:57:07,096 24353 com.endeca.eidi.web.Crawler [main] Shutting down CrawlDb
INFO 2013-09-03 00:57:07,160 24417 com.endeca.eidi.web.Crawler [main] Progress: Host: Cumulative crawl summary (host)
INFO 2013-09-03 00:57:07,162 24419 com.endeca.eidi.web.Crawler [main] Host: www.liferay.com: 0 fetched. 0.0 mB. 0 records. 0 redirected. 4 retried. 0 gone. 0 filtered.
INFO 2013-09-03 00:57:07,162 24419 com.endeca.eidi.web.Crawler [main] Progress: Perf: All (cumulative) 23.6s. 0.0 Pages/s. 0.0 kB/s. 0 fetched. 0.0 mB. 0 records. 0 redirected. 4 retried. 0 gone. 0 filtered.
INFO 2013-09-03 00:57:07,162 24419 com.endeca.eidi.web.Crawler [main] Crawl complete.
~/oracle/endeca
-======================================
source code for parsefilter
package com.endeca.eidi.web.parse;
import java.util.Map;
import java.util.Properties;
import org.apache.hadoop.conf.Configuration;
import org.apache.log4j.Logger;
import org.apache.nutch.metadata.Metadata;
import org.apache.nutch.parse.HTMLMetaTags;
import org.apache.nutch.parse.Parse;
import org.apache.nutch.parse.ParseData;
import org.apache.nutch.parse.ParseFilter;
import org.apache.nutch.protocol.Content;
import de.jetwick.snacktory.ArticleTextExtractor;
import de.jetwick.snacktory.JResult;
public class HTMLMetatagFilter implements ParseFilter {
public static String METATAG_PROPERTY_NAME_PREFIX = "Endeca.Document.HTML.MetaTag.";
public static String CONTENT_TYPE = "text/html";
private static final Logger logger = Logger.getLogger(HTMLMetatagFilter.class);
public Parse filter(Content content, Parse parse) throws Exception {
logger.info("come into EndecaHtmlParser getParse");
logger.info("come into HTMLMetatagFilter");
//update the content with the main text in html page
//content.setContent(HtmlExtractor.extractMainContent(content));
parse.getData().getParseMeta().add("FILTER-HTMLMETATAG", "ACTIVE");
ParseData parseData = parse.getData();
if (parseData == null) return parse;
extractText(content, parse);
logger.info("update the content with the main text content");
return parse;
private void extractText(Content content, Parse parse){
try {
ParseData parseData = parse.getData();
if (parseData == null) return;
Metadata md = parseData.getParseMeta();
ArticleTextExtractor extractor = new ArticleTextExtractor();
String sourceHtml = new String(content.getContent());
JResult res = extractor.extractContent(sourceHtml);
String text = res.getText();
md.set("Endeca_Document_Text", text);
} catch (Exception e) {
// TODO: handle exception
public static void log(String msg){
System.out.println(msg);
public Configuration getConf() {
return null;
public void setConf(Configuration conf) {but it only extracts URLs from <A> (anchor) tags. I want to be able to extract URLs from <MAP> tags as wellGee, do you think you could modify the code to check for "Map" attributes as well.
Can someone maybe point a page containing info on the HTML toolkit for me?It's called the API. Since you are using the HTMLEditorKit and an ElementIterator and an AttributeSet, I would start there.
There is no such API that says "get me all the links", so you have to do a little work on your own.
Maybe you could use a ParserCallback and every time you get a new tag you check for the "href" attribute. -
Cannot get all updates from iTunes software
Hello. There is a strange problem.
Sometimes, when I open iTunes from my computer, a small number will be displayed after "Apps".
When I click the "Apps", I can also see that there are some updates available from the bottom link text.
But after I click that bottom link, I cannot get all programs which need to be update listed. When I update all listed, iTunes still says there are some apps to be updated, but when I click that bottom link, only a text "No updates are currently available. To check for updates for another Apple ID, sign in with that Apple ID."
At that time, I can get all updates from my iPhone - Apple Store. So all have to do, is update all apps from my iPhone and sync it back. But if some apps are not installed on this iPhone, I have no way to update it.
BTW, I've tried to click Store - Check for available downloads from iTunes on my computer. It's useless in this case.
Any solution? Thanks.It think its a bug. I got the same results under MX 7.0.2.
The topic of maxrows recently came up on another thread. I
did some searching and according to TechNote 18339 there was a
change with maxrow
"<cfquery maxrows=N> bug. ColdFusion MX (until ColdFusion
MX 7.0.1 CHF2) didn't pass maxrows to the underlying driver
(statement.setMaxRows())"
Given the results you're getting, it sounds like CF is
applying the maxrow to all of the resultsets, not just the one
where maxrows was declared. I suspect cfstoredproc's usage of
statement.setMaxRows() is incorrect. Thats just a guess though.
Bottom line, I think you'll need handle it manually.
Personally, I would recommend placing the row count logic in the
stored procedure (if possible). The overall results will be more
consistent and you won't have to worry about this kind of issue
again.
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_18339
http://livedocs.adobe.com/coldfusion/7/htmldocs/00000314.htm
http://www.remotesynthesis.com/blog/index.cfm/2006/3/23/Maxrows-Issue-in-CFQuery -
How can i get all links from html file ?
I tried some code:
List<string> metas = new List<string>();
string text = "";
string mys = "";
public List<string> LockedThreads(string filename)
HtmlWeb web = new HtmlWeb();
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.Load(filename, Encoding.UTF8);
var metaTags = doc.DocumentNode.SelectNodes("//meta");
if (metaTags != null)
foreach (var tag in metaTags)
if (tag.Attributes["name"] != null && tag.Attributes["content"] != null)
text = tag.Attributes["name"].Value;
mys = tag.Attributes["content"].Value;
var linksOnPage = from lnks in doc.DocumentNode.Descendants()
where lnks.Name == "a" &&
lnks.Attributes["href"] != null &&
lnks.InnerText.Trim().Length > 0
select new
Url = lnks.Attributes["href"].Value,
Text = lnks.InnerText
foreach (HtmlNode node in doc.DocumentNode
.SelectNodes("//a/@href | //img/@src"))
metas.Add(node.Name);
In the var linksOnPage i'm getting all the links but some of them not only links for example the first item i see:
[0] = { Url = "/", Text = " " }
Then the second item:
[1] = { Url = "http://rotter.net/cgi-bin/forum/dcboard.cgi?az=login", Text = "התחבר" }
Next i want to add another loop or variable that will contain only the links after im src for example:
<img
src="http://mysite.com"
border="0"></a></TD><TD
ALIGN="right"
VALIGN="TOP"
WIDTH="55%">
So to get only http://mysite.com
So in the end i will have two Lists:
First List will contain all links from the html file.
Second List only links that are in img srcOk i'm using regex now and i can get the links i need:
List<string> metas = new List<string>();
List<string> metas1 = new List<string>();
string text = "";
string mys = "";
public List<string> LockedThreads(string filename)
string[] fall = File.ReadAllLines(filename);
foreach (string hh in fall)
if (hh.Contains("http://rotter.net") && hh.Contains("locked")||
hh.Contains("locked_icon_general") ||
hh.Contains("locked_icon_anchor") ||
hh.Contains("icon_anchor") ||
hh.Contains("locked_icon_fire") ||
hh.Contains("locked_icon_sport")||
hh.Contains("locked_icon_camera")||
hh.Contains("locked_icon_movie"))
Regex linkParser = new Regex(@"\b(?:https?://|www\.)\S+\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
foreach (Match m in linkParser.Matches(hh))
metas.Add(m.Value);
So now in the metas i have in this case two links.
For example the first link is from this block in the file:
The link i got is : http://rotter.net/forum/Images/hot_icon_anchor.gif
And this is the right link from this block but now how do i get the text from this block and how i connect how do i know that this text belong to the link ? I need to add this text from this block to a new List. Before all that i counted on my own lines
and got the text but that's a bad idea.
I need somehow to get: שרשור תשדירי בחירות מרוכז:
To get the text between the ToolTip',' and the second ',' but not from all the html file only in places of this two links i extracted.
<TD ALIGN="RIGHT"
VALIGN="TOP">
<body onmousemove="overhere()">
<a onmouseover="EnterContent('ToolTip','שרשור תשדירי בחירות מרוכז:','<u><span style=color:#000099;>כתב: menahem בתאריך: 03.03.15
שעה: 08:51</span></u><br>1.<br>http://youtu.be/utUaqyiRkJ8<br><br><br>...'); Activate();"
onmouseout="deActivate()"
href="javascript:void(0)">
<img src="http://rotter.net/forum/Images/hot_icon_anchor.gif"
border="0"></a></TD><TD
ALIGN="right"
VALIGN="TOP"
WIDTH="55%">
<FONT CLASS='text15bn'><FONT
FACE="Arial">
<a href="http://rotter.net/cgi-bin/forum/dcboard.cgi?az=read_count&om=187966&forum=scoops1"><b>
<font color="red">שרשור תשדירי בחירות מרוכז:</b>
</a></font></TD> -
How can I get all photos from iPhoto to automatically back up to iCloud from my Mac OSX Version 10.6.8 operating system. Not enough memory to upgrade.
You can't. iCloud is not for general file backup from a Mac. It's for backup up and syncing data between mobile devices and and Macs and The following is from this Apple document: iCloud: Backup and restore overview.
iCloud automatically backs up the most important data on your (mobile) device using iOS 5 or later. Once you have enabled Backup on your iPhone, iPad, or iPod touch .....
What is backed up
You get unlimited free storage for:
Purchased music, movies, TV shows, apps, and books
Notes: Backup of purchased music is not available in all countries. Backups of purchased movies and TV shows are U.S. only. Previous purchases may not be restored if they are no longer in the iTunes Store, App Store, or iBookstore.
Some previously purchased movies may not be available in iTunes in the Cloud. These movies will indicate that they are not available in iTunes in the Cloud on their product details page in the iTunes Store. Previous purchases may be unavailable if they have been refunded or are no longer available in the iTunes Store, App Store, or iBookstore.
You get 5 GB of free iCloud storage for:
Photos and videos in the Camera Roll
Device settings (for example: Phone Favorites, Wallpaper, and Mail, Contacts, Calendar accounts)
App data
Home screen and app organization
Messages (iMessage, SMS, and MMS)
Ringtones
Visual Voicemails
But not from a Mac. If you want to backup your photos and other important files I suggest you get an external hard drive and use it with Time Machine.
OT -
Is there a way to excerpt all texts from the captivate course?
Hi all, can someone tell me whether there is a way to excerpt all texts from a captivate file? We need to convert all the texts on the screen to audio and insert the audio into each slide... Thank you for any inputs.
Hi there
Try clicking File > Export > Project Captions and Closed Captions. That should produce a Microsoft Word document.
Cheers... Rick
Helpful and Handy Links
Captivate Wish Form/Bug Reporting Form
Adobe Certified Captivate Training
SorcerStone Blog
Captivate eBooks -
Getting the text from a JTextArea...
hi, I'm making a perfect calculator program and I'm trying to add a Note Pad function to it, I also want to hide that so the other interface can be used; I can get it hided and come again but I'm wondering how could I get the text from the JTextArea INCLUSIVE the enters that are made withing it, so:
theString = jTextArea1.getText();only gives me the text and no enters; suggestions?I think I displayed it wrongTwo things to keep in mind...
Certain Swing components will just ignore newlines, so you have to be careful where/how you're displaying your multiline text strings. Some components will display it all as one line, some will only display the top line, some will even show \n instead of doing the newline. It all just depends.
And JTextArea does support word wrapping, so just because it looks like there's a newline, there may not be one. -
in our house we have 2 iphones but only since the upgrade to ios 5 my partner also gets all texts my firends who have iphones too.. how do i stop this from happening? I do not get messages he is sent though??
Please can you help and let me know what I need to do to fix this - thanks!you guys are using the same apple id in imessage seperate apple id and you wont have the problem
-
Hi guys,
I am developing an integration with EWS based on php. I am using a library I found https://github.com/jamesiarmes/php-ews
In my case users have various calendars hanging from the root, I get access to the default calendar by this:
$request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::CALENDAR;
$response = $ews->FindFolder($request);
I also get access to shared calendars by this:
$request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::PUBLIC_FOLDERS_ROOT;
$response = $ews->FindFolder($request);
But I am getting crazy to get all calendars hanging from the root. If I asked for all folders on the root I don't get those calendars. What service and params do I need to send to get all calendars from the root?
Thanks!!If you make a FindFolder Request set the Traversal to Deep and use a restriction on the FolderClass to IPF.Appointment that should return all the Calendar folders in a mailbox eg
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="
http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://sc
hemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xml
soap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013_SP1" />
</soap:Header>
<soap:Body>
<m:FindFolder Traversal="Deep">
<m:FolderShape>
<t:BaseShape>AllProperties</t:BaseShape>
</m:FolderShape>
<m:IndexedPageFolderView MaxEntriesReturned="1000" Offset="0" BasePoint=
"Beginning" />
<m:Restriction>
<t:IsEqualTo>
<t:FieldURI FieldURI="folder:FolderClass" />
<t:FieldURIOrConstant>
<t:Constant Value="IPF.Appointment" />
</t:FieldURIOrConstant>
</t:IsEqualTo>
</m:Restriction>
<m:ParentFolderIds>
<t:DistinguishedFolderId Id="msgfolderroot" />
</m:ParentFolderIds>
</m:FindFolder>
</soap:Body>
</soap:Envelope>
Cheers
Glen -
How can i get all values from jtable with out selecting?
i have one input table and two output tables (name it as output1, output2). Selected rows from input table are displayed in output1 table. The data in output1 table is temporary(means the dat wont store in database just for display purpose).
Actually what i want is how can i get all values from output1 table to output2 table with out selecting the data in output1 table?
thanks in advance.
rajaYou could set the table's data model to be the same:
output2.setModel( output1.getModel() ); -
How do I get all contacts from my iphone 4 to icloud?
how do I get all contacts from my iphone 4 to icloud? I've just got some of them.
All you have to do is enable iCloud on your phone and turn notes on. They should automatically appear on your phone.
-
How to use a regural expression to get all digit from a string.
Hi All,
Do you know how to use regural expression to get all digits from the following string via ABAP program?
"'Log Attributes 0 ( 0 ) ( 10 % Available )"
Thanks,
AndrewHi,
Try the code mentioned below:
DATA: STR_LEN LIKE SY-FDPOS,
RSTR_LEN LIKE SY-FDPOS,
OFF LIKE SY-FDPOS.
DATA: IDX LIKE SY-FDPOS, "mn B20K054003
CL LIKE SY-FDPOS. "mn B20K054003
DATA: RSTRING(40).
DATA: STRING(40). " value 'A,N,I,L'.
FIELD-SYMBOLS: <NLS_CHAR>. "mn B20K054003
MOVE I_REGUH-ZNME1 TO STRING.
MOVE SPACE TO RSTRING.
STR_LEN = STRLEN( STRING ).
DESCRIBE FIELD RSTRING LENGTH RSTR_LEN.
IF RSTR_LEN < STR_LEN. RAISE TOO_SMALL. ENDIF.
WHILE IDX < STR_LEN. "mn B20K054003
ASSIGN STRING+IDX(*) TO <NLS_CHAR>. "mn B20K054003
IF SY-LANGU EQ '2'. "mn B20K054003
CALL FUNCTION 'NLS_THAI_CHARLEN' "mn B20K054003
EXPORTING "mn B20K054003
THAI_STRING = <NLS_CHAR> "mn B20K054003
CHANGING "mn B20K054003
THAI_CHARLEN = CL. "mn B20K054003
ELSE. "mn B20K054003
CL = CHARLEN( <NLS_CHAR> ). "mn B20K054003
ENDIF. "mn B20K054003
IF IDX NE 0. "mn B20K054003
SHIFT RSTRING RIGHT BY CL PLACES."mn B20K054003
ENDIF. "mn B20K054003
RSTRING+0(CL) = STRING+IDX(CL). "mn B20K054003
IDX = IDX + CL. "mn B20K054003
ENDWHILE. "mn B20K054003
Regds,
Anil
Edited by: Matt on Jul 1, 2009 9:36 AM -added code tags -
How to get all images from folder in c#?
I am trying to get all images from folder. But it is not executing from following:
string path=@"C:\wamp\www\fileupload\user_data";
string[] filePaths = Directory.GetFiles(path,".jpg");
for (int i = 0; i < filePaths.Length; i++)
dataGridImage.Controls.Add(filePaths[i]);
Please give me the correct solution.How to display all images from folder in picturebox in c#?
private void Form1_Load(object sender, EventArgs e)
string[] files = Directory.GetFiles(Form1.programdir + "\\card_images", "*", SearchOption.TopDirectoryOnly);
foreach (var filename in files)
Bitmap bmp = null;
try
bmp = new Bitmap(filename);
catch (Exception e)
// remove this if you don't want to see the exception message
MessageBox.Show(e.Message);
continue;
var card = new PictureBox();
card.BackgroundImage = bmp;
card.Padding = new Padding(0);
card.BackgroundImageLayout = ImageLayout.Stretch;
card.MouseDown += new MouseEventHandler(card_click);
card.Size = new Size((int)(this.ClientSize.Width / 2) - 15, images.Height);
images.Controls.Add(card);
Free .NET Barcode Generator & Scanner supporting over 40 kinds of 1D & 2D symbologies.
Maybe you are looking for
-
Sales order PCA to be updated in WBS elemnet
Hi Experts, Can you please help me on below: We have PS and SD, we will create project for additonal work. we will create sales order and assign the project at line item level till here no issues. We are using sales order substitution (Materi PCA wit
-
I submitted a credit card to pay for Dreamweaver and got PhotoShop. How can I make an exchange?
-
NSMutableString getCString misbehaves, does not show some characters
Hi everyone, This is my first time here. I have written a small tool for Cocoa / MacOSX 10.5 and I am trying to save a text to a file, but some characters such as # appear as hex 0x0. Source: ----- int len = [results length] * sizeof(char); char *buf
-
HDMI 2 DVI cable -- can get 1080p...sometimes
I have a Westinghouse LVM42W2 1080p monitor. When I plug Apple TV into the HDMI input, I have an option for 1080p resolution (along with several others), but when I use an HDMI-->DVI cable I just have a choice between 1080i vs 720p. However, if I fir
-
I deleted Garage Band, iMovie and iDVD. I lack a DVD burner, do not edit videos (my Camcorder is VHS-C and I lakck A capture card) so I think its pointless to have these apps. I deleted Garage Band and all the Garage Band folders on my HD. I figure i